Skip to content

Docs: document the menu option in the Menu options table - #43140

Merged
julien-deramond merged 2 commits into
twbs:mainfrom
ump45nose:docs/menu-option
Oct 21, 2026
Merged

julien-deramond merged 2 commits into
twbs:mainfrom
ump45nose:docs/menu-option

Conversation

@ump45nose

@ump45nose ump45nose commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Description

  • Adds the missing menu row to the Options table in the Menu docs.
  • It sits between floatingConfig and placement, the same order as in Default.

Motivation & Context

  • Menu accepts a menu option, and it is not documented.
  • js/src/menu.ts:113 declares it in the component config type (menu: HTMLElement | null), :128 sets menu: null in Default, :143 types it as '(null|element)', and :184 uses it: this._menu = (this._config.menu || this._findMenu()).
  • Without it, _findMenu() (:296-303) looks for .menu after the toggle, then before it, then inside the wrapper. So a menu that is not a sibling of the toggle, or a wrapper that holds more than one .menu, cannot be handled from the config.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint) — see the note below
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Notes on verification

  • I ran the docs lint rule that covers this file with the repo config: markdownlint --config .markdownlint.json site/src/content/docs/components/menu.mdx → exit 0.
  • docs-prettier-check does not apply: .prettierignore lists site/src/content/**/*.mdx.
  • I could not run the full npm run lint / npm run docs-build here — this checkout has no node_modules installed. So the checkbox above is left unticked on purpose.
  • No dist files touched; the change is one line in the MDX source.

Related issues

None. I found the gap by comparing the Options table with Default / DefaultType in js/src/menu.ts.

This PR was prepared with AI assistance (Claude Code). I verified each citation against the source myself and own the wording.

Menu accepts a menu element, but the options table omits it. Users have no way to
find out they can point a toggle at a menu that is not its sibling.
@julien-deramond julien-deramond added v6 v6, the main branch docs Documentation site and its content labels Oct 21, 2026
@julien-deramond
julien-deramond self-requested a review October 21, 2026 17:17
@github-project-automation github-project-automation Bot moved this to Inbox in v6.0.0 Oct 21, 2026

@julien-deramond julien-deramond left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ump45nose, good catch!

@julien-deramond
julien-deramond merged commit 0a7d442 into twbs:main Oct 21, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation site and its content v6 v6, the main branch

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants