Some extensions require to open sidebars automatically based on the URL the user is on or other criteria. See https://addons.mozilla.org/firefox/addon/mdn-documentation-tester for example. Therefore, there should be a way to toggle sidebars from within the extension. This could either happen via a manifest property holding a regular expression for URL-matching, or, to be more flexible, via an API like in the Add-on SDK. Sebastian  https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/ui_sidebar
Created attachment 8844117 [details] WebNotification-Options.PNG This seams to be very powerful, and potentially annoying for people. And it seams that the example could well work without the sidebar being opened automatically. If we intend to do this, it should be an optional permission that the user has to grant once before the sidebar can be opened, and an option to easily revoke that permissions from the open sidebar. Similar to how we implemented Web Notifications - see attachment.
Hi Sebastian, this has been added to the agenda for the April 25 WebExtensions Triage meeting. Would you be able to join us to discuss the bug? Call-in info and time: https://wiki.mozilla.org/Add-ons/Contribute/Triage#Details_.26_How_to_Join Agenda: https://docs.google.com/document/d/1WScwIH2D5tiL7vT4_lC44oFigR53xatWsUEwyjWvs7k/edit#
I'm highly inclined to dup this to bug 1341126.
Thanks for the invitation, Caitlin! Can't promise, but I'll try to be there that day. Sebastian
(In reply to Shane Caraveo (:mixedpuppy) from comment #3) > I'm highly inclined to dup this to bug 1341126. Skimming that bug quickly my issue looks to be covered by it, yes. So, it exposes a function toggleSidebar() allowing to open and close the sidebar, right? I'd still be happy to discuss this shortly in the triage meeting. Sebastian
As mentioned here https://bugzilla.mozilla.org/show_bug.cgi?id=1341126#c9 there should be an API allowing to read the current state (opened, closed) of the sidebar in a specific window. Then together with the toggle function it should be complete.
(In reply to Sebastian Zartner [:sebo] from comment #5) > (In reply to Shane Caraveo (:mixedpuppy) from comment #3) > > I'm highly inclined to dup this to bug 1341126. > > Skimming that bug quickly my issue looks to be covered by it, yes. So, it > exposes a function toggleSidebar() allowing to open and close the sidebar, > right? I'd still be happy to discuss this shortly in the triage meeting. > > Sebastian It only allows it based on user action, so it doesn't cover this use case exactly.