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

Navbar mobile refactored design #1568

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

mertbagt
Copy link
Collaborator

@mertbagt mertbagt commented Jun 7, 2024

Summary

closes #1390

https://www.figma.com/file/IyRpfsVrU2pg3rysLauvQR/Navigation-V2?type=design&node-id=4356-14&mode=design

Checklist

  • On the frontend, I've made my strings translate-able.
  • If I've added shared components, I've added a storybook story.
  • I've made pages responsive and look good on mobile.

Screenshots

image

image

image

image

image

Known issues

  1. the dropdown menus are grey instead of black in the Figma. The coloring is pretty hardwired into Bootstrap's theming and is resistant to being overwritten. Likely, not worth dropping the themeing and doing the entire nav bar's coloration by hand.

  2. The Figma wants the expanded Collapse element to fill up the whole screen below the navbar. For some reason, anytime I tried to set height with either Bootstrap or styled.components, the browser would just ignore that. I know we are trying to move away from inline styling but in this specific case, it's the only thing the browser seems to respect, so it's one-off exception, barring a better solution being found.

  3. like the Desktop view, a General Search function needs to be developed and then can be added to both this and the desktop view

Steps to test/reproduce

  1. make sure your viewport is < 768px wide
  2. click on the various navbar elements, including the center logo, and make sure they all respond as expected

image

Copy link

vercel bot commented Jun 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
maple-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 7, 2024 7:02pm
maple-prod 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jun 7, 2024 7:02pm

Copy link
Collaborator

@Mephistic Mephistic left a comment

Choose a reason for hiding this comment

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

LGTM

  • 100% agree on pushing for Bootstrap's theming rather than fighting it - we can have a bigger discussion with design in a dev/design sync about standardizing on color palettes if need be.
  • I vote to push back on the design here - we may actually need this, but this is a great case to confirm with design that we want to fight the natural flow of our UX library. Super weird that styled components doesn't accept the height (since we use that to set height in other components) - I'll keep an eye out for that going forward.

const BlackCollapse = styled(() => {
return (
<Navbar.Collapse id="basic-navbar-nav" className="bg-black mt-2 ps-4">
{/* while MAPLE is trying to do away with inline styling, *
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, sadly setting specific heights aren't covered by bootstrap. Weird that styled-components aren't respecting that - not worth digging into here, but thanks for the heads up to look out for this issue in the future.

That said, why do we need to set a specific height here? Shouldn't the menu just be the height of the links list, whichever set of links we're dealing with?

</Navbar.Collapse>
)
})`
.bg-black {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Could this just use the bootstrap provided bg-dark and save some boilerplate? IMO we should probably start pushing designs to standardize on our bootstrap theme colors anyway.

const toggleNav = () => setIsExpanded(!isExpanded)
const closeNav = () => setIsExpanded(false)
const toggleSite = () => {
if (isExpanded && whichMenu == "profile") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: for these toggles, if we're setting menu to the same value in both branches, should we move the setMenu call outside the branch?

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.

Create Mobile Nav Accordion Component
2 participants