Skip to content
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

Merged

Conversation

rosschapman
Copy link
Collaborator

@rosschapman rosschapman commented Jul 5, 2024

Description

  • Adds support for a top level link
  • Adds separate rendering containers for Mobile and Desktop views
  • Discreetly separates styling for Mobile and Desktop views

@rosschapman rosschapman changed the title WIP Adds conditional rendering for single Header Link type and styles mobile nav Jul 6, 2024
@rosschapman rosschapman marked this pull request as ready for review July 8, 2024 16:53
@rosschapman rosschapman force-pushed the OUR415-87-header-nav-mobile-styling branch from bb0d44d to fd52f23 Compare July 8, 2024 16:54
@rosschapman rosschapman changed the title Adds conditional rendering for single Header Link type and styles mobile nav Adds conditional rendering for top level link and refactors Mobile and Desktop components into discreet renderers Jul 8, 2024
Comment on lines 62 to 71
const activatePushPanelButtonIcon = () => {
if (mobileNavigationSidebarIsOpen && mobileSubNavigationSidebarIsOpen) {
return "fa-arrow-left";
}
if (mobileNavigationSidebarIsOpen) {
return "fa-xmark";
}

return ` fa-bars`;
};
Copy link
Collaborator Author

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?

Copy link
Collaborator

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.

Copy link
Collaborator

@adriencyberspace adriencyberspace left a 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:

  1. 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.
  2. 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
image

@adriencyberspace
Copy link
Collaborator

I think we should hide mobile on desktop size screens. i.e. if I open it on a smaller screen, it should disappear when I make my screen larger.

image

@rosschapman
Copy link
Collaborator Author

@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

@adriencyberspace
Copy link
Collaborator

@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.

Actual:
image

Mockup:
image

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
Copy link
Collaborator

I also still think these links should be full container width:

image

@rosschapman
Copy link
Collaborator Author

rosschapman commented Jul 9, 2024

@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 react-burger-menu does make it trivial to change the interaction type to slide.

Copy link
Collaborator

@adriencyberspace adriencyberspace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Two minor visual QA changes before merging:

  1. Single tier item on mobile is not same font weight as two tiered
image 2. Single tier item on desktop does not have same hover color as two tiered

@rosschapman rosschapman merged commit 776e59f into OUR415-87-header-nav-base Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants