fix: scroll long table Column visibility and Group by menus - #13183
fix: scroll long table Column visibility and Group by menus#13183tiensonqin wants to merge 2 commits into
Conversation
Keep dropdown and context-menu submenus inside the viewport with a capped max-height and overflow-y auto, including left/right placements. Co-authored-by: Tienson Qin <[email protected]>
Co-authored-by: Tienson Qin <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The updated menu max-height rule applies --available-height to Radix menu content, which can regress viewport-fitting for long Radix menus without using Radix’s available-height variables.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR addresses an accessibility/usability issue in Logseq’s Table View menus by ensuring long “Column visibility” / “Group by” submenus remain reachable via height-capping and vertical scrolling, and adds unit coverage to guard the shared styling behavior.
Changes:
- Introduce a shared
popup-max-height/popup-scroll-styleupdate in SHUI components and applystickypositioning for submenu positioners. - Update
resources/css/shui.cssto apply consistentmax-height+ overflow scrolling rules to dropdown/context menus and their submenus. - Add CLJS unit tests validating the shared scroll style and the presence of the new submenu CSS selectors.
File summaries
| File | Description |
|---|---|
deps/shui/src/logseq/shui/components.cljs |
Adds shared max-height constant, applies scroll styles, and enables sticky submenu positioners. |
resources/css/shui.css |
Unifies menu/submenu overflow + max-height styling to ensure long menus can scroll. |
src/test/logseq/shui/components_test.cljs |
Adds unit tests covering popup scroll style and submenu CSS presence. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| .ui__dropdown-menu-content, | ||
| .ui__dropdown-menu-sub-content, | ||
| .ui__context-menu-content, | ||
| .ui__context-menu-sub-content, | ||
| div[data-radix-menu-content], | ||
| .ui__select-content { |
Fixes logseq/db-test#1159
Problem
In Table View, Column visibility and Group by submenus do not scroll when there are more options than fit on screen. Left/right submenu placements were not height-capped, so items below the viewport were unreachable.
Change
min(var(--available-height, 100vh), calc(100vh - 16px))andoverflow-y: autoon both the popup and its positioner..ui__dropdown-menu-sub-contentand.ui__context-menu-sub-contentfor every side, not onlydata-side=top|bottom.stickypositioning so they shift into view and then scroll.Test plan