feat(admin): make the main navigation menu scrollable#4073
Merged
Conversation
3 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4073 +/- ##
=======================================
Coverage 98.10% 98.10%
=======================================
Files 348 348
Lines 9083 9083
=======================================
Hits 8911 8911
Misses 172 172 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
On small screens and on installations with many admin modules the lower menu items could not be reached because the navigation column had no way to scroll. The column is now a flex layout whose navigation area scrolls within the space left by the logout entry, sized with the dynamic viewport height so mobile browser chrome no longer hides the bottom. Because a scroll container clips its content, the hover flyouts (a module's label or its sub navigation) are lifted out of the clip by a per-entry web component that fixes them to the viewport and keeps them anchored to their entry with Floating UI.
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.
What is this pull request for?
On small screens and on installations with many admin modules the lower main
navigation items could not be reached — the menu column had no way to scroll.
The left menu is now a flex column: the navigation area scrolls within the space
left by the logout entry (pinned at the bottom by the layout rather than by
absolute positioning), and its height uses the dynamic viewport unit so mobile
browser chrome no longer hides the bottom of the list.
The tricky part is that a scroll container clips its content, which would cut off
the hover flyouts (a module's label or its sub navigation) that reach out to the
right of the collapsed column. Each entry is now a small web component
(
alchemy-main-navi-entry) that, while its flyout is open, lifts it out of theclip by fixing it to the viewport and keeps it anchored to the entry with Floating
UI (already a dependency). Closed flyouts default to
position: fixedso they nolonger inflate the column's scrollable height.
Closes #3816
Notable changes (remove if none)
No behavioural change for existing browsers beyond the menu now scrolling. The
100vh/100dvhpair on#left_menuis intentional:100vhis a fallback forbrowsers that predate
dvhsupport, some of which still run the admin.Checklist