Repository navigation
Add adaptive menu presentations - #5654
rubyycheung merged 42 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
xinzi-bot
left a comment
There was a problem hiding this comment.
Visual review — presentation matrix
Captured from PR head a2d8f81e using the exact docsite preview and a locally built Storybook:
- Docsite screenshots — DropdownMenu, ContextMenu, MoreMenu
- Storybook screenshots — DropdownMenu, ContextMenu, MoreMenu
Each set covers:
popoverat 1280×900 with a fine pointerbottom-sheetat 390×844 with a coarse pointeradaptiveat both sizes/pointer modes
The adaptive branch resolves to the anchored popover on desktop and the BottomSheet on compact touch for all three components in both surfaces. No visual blockers found.
ddb8ad7 to
af0f2c9
Compare
xinzi-bot
left a comment
There was a problem hiding this comment.
Thanks for pushing this. ContextMenu bottom-sheet/adaptive still renders nested items through the normal flyout submenu path, unlike DropdownMenu's sheet drill-in. On compact touch, a nested action opens a cursor-style flyout inside the sheet instead of a reachable sheet view, so the new presentation doesn't work for the API it advertises. Please route ContextMenu data submenus through the sheet drill-in path too.
[Automated review]
…eraction' into feat/adaptive-menu-presentation # Conflicts: # packages/core/src/DropdownMenu/DropdownMenu.test.tsx
|
Fixed in 4364c00. Data-driven ContextMenu bottom-sheet/adaptive presentations now use the same touch action-list and drill-in navigation as DropdownMenu, including a back affordance, focus transfer to the submenu heading, and reset on close. Added a regression test covering nested selection without opening a flyout. ContextMenu + DropdownMenu focused suites pass (144 tests), ESLint and core typecheck pass. |
xinzi-bot
left a comment
There was a problem hiding this comment.
Prior ContextMenu sheet submenu blocker is resolved, and I found no blocking regressions in the exact base→head range. @imdreamrunner, this looks ready for your approval.
[Automated review]
* feat: add adaptive selector presentations * fix: refine selector bottom sheet interactions * refactor(selector): use shared adaptive policy * fix(selector): preserve focus without touch rings * fix selectors bottom sheet focus target
e1fcd4c
into
fix/dropdown-menu-responsive-interaction
Summary
popover,bottom-sheet, andadaptivepresentation policies toDropdownMenuMoreMenuand support it inContextMenuMenuBottomSheetframe across DropdownMenu and ContextMenu; MoreMenu inherits it through DropdownMenuadaptiveselects the BottomSheet at 768px and below when the primary pointer is coarse. The default remainspopoverfor compatibility. There is no item-count heuristic.This PR is stacked on #5395 so the adaptive behavior can be reviewed separately from the responsive popover fit changes.
Architecture
BottomSheetremains the single primitive for dialog lifecycle, focus return, gestures, safe areas, scrolling, animation, and height.MenuBottomSheetowns only the shared menu-family frame and spacing. DropdownMenu and ContextMenu retain their distinct interaction controllers.Test plan
pnpm exec vitest run packages/core/src/DropdownMenu/DropdownMenu.test.tsxpnpm exec vitest run packages/core/src/ContextMenu/ContextMenu.test.tsxpnpm exec vitest run packages/core/src/MoreMenu/MoreMenu.test.tsxpnpm -F @astryxdesign/core typecheckpnpm check:repo