The AddonsSidebar macro does not behave as expected when viewing WebExtensions JavaScript API documentation. When visiting an API namespace page, the "JavaScript APIs" section in the left nav defaults to open, showing all of the available namespaces and highlighting the current page. But when viewing the documentation for a property of a namespace, the "JavaScript APIs" section is collapsed by default. This makes it difficult for users to orient themselves in the documentation or to find other related documentation.
Observe that the left navigation shows the Methods, Types, and Events available on this namespace.
Scroll up in the left navigation and observe that the "JavaScript APIs" group is expanded.
Navigate to any one of the child properties of this namespace, such as onBeforeNavigate.
Expected behavior
The left nav should still be expanded to the webNavigation namespace, providing easy access to other related methods, types, and events.
Actual behavior
The top level group named "JavaScript APIs" is collapsed.
Device
Desktop
Browser
Firefox
Browser version
Pre-release (e.g. Beta, Nightly or Canary)
Operating system
Mac OS
Screenshot
Anything else?
It appears that AddonsSidebar does not directly set the open property on the <details> element used for "JavaScript APIs". Near as I can tell, the details element's open state is set by build/extract-sidebar.ts. Unfortunately, I couldn't figure out how to debug this so I couldn't proactively fix it.
Summary
The
AddonsSidebar
macro does not behave as expected when viewing WebExtensions JavaScript API documentation. When visiting an API namespace page, the "JavaScript APIs" section in the left nav defaults to open, showing all of the available namespaces and highlighting the current page. But when viewing the documentation for a property of a namespace, the "JavaScript APIs" section is collapsed by default. This makes it difficult for users to orient themselves in the documentation or to find other related documentation.URL
Method: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/alarms/clear Type: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/management/ExtensionInfo Event: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webNavigation/onCommitted
Reproduction steps
Expected behavior
The left nav should still be expanded to the webNavigation namespace, providing easy access to other related methods, types, and events.
Actual behavior
The top level group named "JavaScript APIs" is collapsed.
Device
Desktop
Browser
Firefox
Browser version
Pre-release (e.g. Beta, Nightly or Canary)
Operating system
Mac OS
Screenshot
Anything else?
It appears that
AddonsSidebar
does not directly set theopen
property on the<details>
element used for "JavaScript APIs". Near as I can tell, the details element's open state is set bybuild/extract-sidebar.ts
. Unfortunately, I couldn't figure out how to debug this so I couldn't proactively fix it.Validations