Allow to open an close sidebars automatically

NEW
Unassigned

Status

()

Toolkit
WebExtensions: Untriaged
--
enhancement
2 months ago
14 hours ago

People

(Reporter: sebo, Unassigned)

Tracking

(Depends on: 1 bug, {dev-doc-needed})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [design-decision-needed], URL)

Attachments

(1 attachment)

(Reporter)

Description

2 months ago
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[1].

Sebastian

[1] https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/ui_sidebar
(Reporter)

Updated

2 months ago
Keywords: dev-doc-needed

Updated

2 months ago
Whiteboard: [design-decision-needed]
See Also: → bug 1341126

Updated

2 months ago
Depends on: 1329022
No longer depends on: 1208596
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.
(Reporter)

Comment 4

5 days ago
Thanks for the invitation, Caitlin! Can't promise, but I'll try to be there that day.

Sebastian
(Reporter)

Comment 5

5 days ago
(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

Comment 6

4 days ago
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.
You need to log in before you can comment on or make changes to this bug.