PLACEHOLDER: Modify design/copy of failed sidebar injection alert
Part of Onboarding Squad Sprint 3. We'd like to modify the design/copy of the sidebar injection failure alert to be more inviting to first-time users.
Related: https://github.com/pixiebrix/pixiebrix-extension/pull/517
More context in:
- https://github.com/pixiebrix/pixiebrix-extension/issues/4124
Design-wise, it can only be an alert() if the error happens in the background page.
If it's in the content script we generally use the on-page notifications, especially because the error might appear several seconds later.
If the sidebar appears but the content script fails to connect, we can additionally display a "sidebar not connected" message inside the sidebar itself.
To make incremental progress, we're thinking we can modify the text of the alert in the case where the user clicks the extension toolbar button on a page where it cannot do anything. In future issues, we're going to investigate whether we can use a popover instead of an alert and look at other ways to behave the way users expect and avoid the need for errors or alerts altogether.
For this issue, our hypothesis is that new users may be experiencing unexpected behavior with the extension toolbar button and interpret it as "PixieBrix doesn't work" and not know how to move forward. We used to have an error, so we are making progress, but now we want to give the user information on how to get beyond the alert.
Current alert text: Title: PixieBrix - Development Body: Extensions cannot run on web store and other special browser vendor pages Button: OK
Proposed change: Title: Page not supported by extension Body: PixieBrix cannot modify this page and other special browser pages. If you want to use existing blueprints or open PixieBrix in DevTools (Cmd+Opt+I), first navigate to the page you want to modify. Button: OK (Note: Show appropriate shortcut based on OS.)
Since this behavior changed recently, please review @twschiller @fregante @mnholtz @BLoe. There appear to be cases now where we don't see the alert but only see the Blueprints page? When on the Blueprints page, that is Issue #4179 .
If this issue is exclusively about "Chrome web store" pages and not about actual injection failure, what about aligning the behavior of the browser action button to what we already do for chrome:// pages?
We have 3 behaviors now:
-
http://pages: open sidebar -
chrome://pages: open options - web store: show error
If the intent is to make PixieBrix more welcoming, we should probably avoid showing an error message telling the user what they can't do. Instead:
- http:// pages: open sidebar
- chrome:// and web store pages: open options
Since the change is so small, I opened a proposal PR for this: https://github.com/pixiebrix/pixiebrix-extension/pull/4188
Feel free to close or discuss further in the current issue.
I think this works for now if we couple @fregante 's approach PR #4188, which will take people to the Blueprints page, with #4179 which responds when the user clicks that toolbar button while on the Blueprints page. With these two combined, something useful always happens when they click that button.
We have more to do to clean up these flows, but I'm good with this for this week's sprint. Thanks!
Closing in favor of #4188