Sidebars are a primary UI that addons have used to provide persistent UI in Firefox. There are currently over 1,200 sidebar extensions on AMO, and while few have large user bases, their use indicates a level of popularity for this UI. We want to expand on the existing WebExtension APIs with new APIs that addon authors and users find appealing, sidebarAction would be our first implementation in this direction.
Opera has implemented a sidebarAction API that mirrors in large part the browserAction API. In the spirit of continuing cross browser support for extension APIs we'll use the same API that Opera has provided, though we will not support parts of the API that do not currently make sense in Firefox.
The initial implementation of the sidebar API is intended to be minimalist, enough that addons can provide a sidebar and that users can manage the sidebar.
Firefox currently supports webpanels in the sidebar through a fairly obtuse feature of bookmarks. sidebarAction will expand on that current support by making it available to addons. We'll also take advantage of the existing menu and toolbarbutton support for sidebars as the mechanism for users to manage which sidebar is visible.
- Basic compatibility with Opera
- Minimal or no change to existing Firefox UI, reuse what Firefox currently supports.
- No opinions on the UX should be made by the API, allowing for future UX changes without affecting sidebar addons.
Current bug: 1208596
Estimated merge: Firefox 53
Upon install of an addon that defines a sidebar, the sidebar will be automatically opened. Additionally the sidebar toolbarbutton will be placed into the toolbar above the sidebar upon install of only the first addon implementing a sidebar. Later installs will not place the button, allowing the user to remove the button if they prefer.
- Badged icons are unsupported as Firefox currently does not have UI to support this for sidebars.
- onBlur/onFocus events are unsupported. These can be handled in the sidebar itself using normal events.
- browser.sidebarAction.open/close/isOpen to support programmatic management of the sidebar. This is constrained by a requirement that the API calls happen within a user event, such as clicking on a button. An addon could provide a browserAction button whose handler toggles the sidebar.
There are features we do not intend to support in the initial sidebarAction API, however they may be implemented in the future depending on Firefox Product and UX goals.
- More than one sidebar
- Options for which side the sidebar appears on.
7 Total; 7 Open (100%); 0 Resolved (0%); 0 Verified (0%);
sidebarAction will be a desktop-only API at least initially.