-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix styling issues of meganav on small screens #5110
Conversation
Reduced nav example now defaults to being opened, which removes the non-opened nav from visual testing coverage. is this intended? |
templates/docs/examples/patterns/navigation/_full-width-dropdown.jinja
Outdated
Show resolved
Hide resolved
templates/docs/examples/patterns/navigation/_full-width-dropdown.jinja
Outdated
Show resolved
Hide resolved
templates/docs/examples/patterns/navigation/_full-width-dropdown.jinja
Outdated
Show resolved
Hide resolved
Good catch. I made it open in the dropdown full width example, but it doesn't have to be open in reduced example. Updated. |
Could we add a couple |
I hacked in some spacing there. This should hopefully add a bit of space there and help with the 100vh address bar issue (because there should be enough spacing to scroll past the height of address bar). Solution is ugly, but I couldn't find any better way. The way the sliding panels are structured and how the scroll works there is a mystery. And I don't think we can do much better without some significant changes there. |
Clicking the "LXCFS -> Nested Layer" dropdown on the sliding dark example and then clicking nested layer dropdown multiple times causes the takeover overlay to disappear while the navigation is still open - this seems unexpected Screen.Recording.2024-08-08.at.12.28.46.PM.movHowever this happens on |
Good catch @jmuzina . Not ideal for sure, and not expected, but this is an edge case that doesn't happen in production (we don't use nested dropdowns like these in prod). It's an old example from the times when we did have support for sliding navigation on mobile, but not full meganav dropdowns. Maybe it will make sense to drop them now. But I'd rather ignore it in this PR, and address separately. |
Created #5288 to tackle that issue separately! |
Done
Addresses styling and scrolling issues in mobile version of mega navigation
Fixes: https://warthogs.atlassian.net/browse/WD-13787
QA
https://vanilla-framework-5110.demos.haus/docs/examples/patterns/navigation/dropdown-full-width?theme=light
QA Note
In Vanilla examples view the bottom toolbar is covering some space on the bottom of the screen. In normal view it would not be there and there will be more of the dropdown visible.
Implementation note
This PR introduces 2 new class names required by JS.
js-navigation-sliding-panel
needs to be added on the elements withp-navigation__dropdown
CSS class name (so that they are correctly targeted when selecting a dropdown to activate), it also needs to be added on a top levelp-navigation__items
element (the one containing first level of mobile sliding navigation items)js-navigation-dropdown-toggle
needs to be added on elements withp-navigation__item--dropdown-toggle
class name.