Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddonSidebar is renders as collapsed when viewing WebExtensions methods docs #11613

Open
3 tasks done
dotproto opened this issue Aug 8, 2024 · 2 comments
Open
3 tasks done
Labels
🐛 bug Something isn't working, or isn't working as expected idle layout Issues related to alignment, positioning and spacing/margin/padding macros tracking issues related to kumascript macros on hold Waiting on something else before this can be moved forward. p2 We want to address this but may have other higher priority items. sidebar/toc Sidebar and table of contents

Comments

@dotproto
Copy link

dotproto commented Aug 8, 2024

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

  1. Visit https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webNavigation
  2. Observe that the left navigation shows the Methods, Types, and Events available on this namespace.
  3. Scroll up in the left navigation and observe that the "JavaScript APIs" group is expanded.
  4. 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

Screenshot 2024-08-08 at 15-01-40 webNavigation - Mozilla MDN

Screenshot 2024-08-08 at 15-03-00 webNavigation onBeforeNavigate - Mozilla MDN

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.

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Aug 8, 2024
@dotproto
Copy link
Author

dotproto commented Aug 8, 2024

Tagging @Rob--W and @rebloor for visibility.

@github-actions github-actions bot added the idle label Sep 7, 2024
@caugner caugner added 🐛 bug Something isn't working, or isn't working as expected p2 We want to address this but may have other higher priority items. on hold Waiting on something else before this can be moved forward. macros tracking issues related to kumascript macros sidebar/toc Sidebar and table of contents layout Issues related to alignment, positioning and spacing/margin/padding and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. idle labels Sep 10, 2024
@caugner
Copy link
Contributor

caugner commented Sep 10, 2024

We will fix this once rari has landed in yari.

@github-actions github-actions bot added the idle label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working, or isn't working as expected idle layout Issues related to alignment, positioning and spacing/margin/padding macros tracking issues related to kumascript macros on hold Waiting on something else before this can be moved forward. p2 We want to address this but may have other higher priority items. sidebar/toc Sidebar and table of contents
Projects
None yet
Development

No branches or pull requests

2 participants