fix(menu): typeahead in ContextMenu + NavHeadingMenu (re-land #3432)#3446
Closed
cixzhang wants to merge 1 commit into
Closed
fix(menu): typeahead in ContextMenu + NavHeadingMenu (re-land #3432)#3446cixzhang wants to merge 1 commit into
cixzhang wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-lands the ContextMenu + NavHeadingMenu typeahead wiring from #3432.
Why this exists
#3432 was merged into its stacked base branch (`navi/feat/use-typeahead`) instead of `main`, so its content never reached `main`. This PR reapplies that same change (commit c7cc818) on top of current `main`, which already includes the merged a11y fixes to these components (e.g. the ContextMenu label rename and `useLongPress` work).
Dependency
This wiring depends on the shared `useTypeahead` hook (`packages/core/src/hooks/useTypeahead.ts`), which is not yet in `main` — it lands separately via #3431 (approved, awaiting merge). This PR must merge after #3431.
Verified locally with the hook present (simulating #3431 landed):
Without the hook in `main`, `tsc` reports `Cannot find module '../hooks/useTypeahead'` — this resolves once #3431 merges. The hook is intentionally not included here to avoid duplicating #3431.
What it does
ContextMenu and NavMenu heading menus now support first-character typeahead (type a letter to jump to the matching item), via the shared `useTypeahead` hook — matching DropdownMenu. MoreMenu inherits it through DropdownMenu.
Ref #3343.