-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adds conditional rendering for top level link and refactors Mobile and Desktop components into discreet renderers #75
Adds conditional rendering for top level link and refactors Mobile and Desktop components into discreet renderers #75
Conversation
bb0d44d
to
fd52f23
Compare
app/components/ui/Navigation.tsx
Outdated
const activatePushPanelButtonIcon = () => { | ||
if (mobileNavigationSidebarIsOpen && mobileSubNavigationSidebarIsOpen) { | ||
return "fa-arrow-left"; | ||
} | ||
if (mobileNavigationSidebarIsOpen) { | ||
return "fa-xmark"; | ||
} | ||
|
||
return ` fa-bars`; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adriencyberspace I'm ok with multiple returns, what about you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me. You could also use a switch
but not a big deal with only 3 cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently blocked on being able to create a 2-tiered navigation but a couple of things I'm seeing right now:
- If you have two dropdown menus, they both open no matter which top level link you click. I think only the selected menu should open.
- Also a style issue is that the links don't extend the full width of the menu but should, which is noticeable on hover or focus
@adriencyberspace my latest commit fixes the issues with multiple Navigation Menu types in the nav. Regarding #75 (comment) I propose we consider that in a polish phase. I'd like to better understand the scenario of a user resizing their browser that much. Please take another look thank you! Monosnap.screencast.2024-07-09.11-09-06.mp4 |
@rosschapman Off the bat, I'm seeing that the top level and single level links do not have uniform styling but do in the mockup. Aside from that, can you make the mobile absolute positioned? I know it came in from SF Service Finder, but I can't recall seeing a mobile nav that pushes content over on any other site and I think it affects UX. |
@adriencyberspace These smaller style issues are fixed with 7d5efd2:
Regarding doing a slide-out vs push-out nav...hmmm. That will be a bit more involved. Let's park that for another iteration. I'll need to get some more design guidance on that to figure out how the overlay control looks/works. Although |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description