From MozillaWiki
Jump to: navigation, search

sidebarAction API

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.

Initial Implementation

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

Sidebar UX

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.

Differences from the Opera sidebarAction API

  • 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.

Future possibilities

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.


Full Query
ID Priority Status Summary
1328776 P5 NEW Provide ability to show multiple sidebar contents parallelly
1368220 P5 NEW Improve how the URL is handled for the sidebar
1373590 P5 UNCONFIRMED Sidebar list should be ordered alphabetically by title
1373608 P3 NEW Loading sidebar flashes dark background or Windows 10 accent color
1380271 P5 UNCONFIRMED Installing a sidebar should only open it in the current window rather than all windows
1408761 P5 NEW Support sidebarAction badge related methods

6 Total; 6 Open (100%); 0 Resolved (0%); 0 Verified (0%);

Platform support

sidebarAction will be a desktop-only API at least initially.