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

Add reduced top navigation bar #5107

Merged
merged 19 commits into from
Jul 2, 2024
Merged

Add reduced top navigation bar #5107

merged 19 commits into from
Jul 2, 2024

Conversation

petesfrench
Copy link
Contributor

@petesfrench petesfrench commented Jun 4, 2024

Done

  • Moves the reduced and secondary navigation, found on u.com, over to Vanilla
  • Some refactoring to align better with Vanilla defaults and remove unneeded code
  • extracting sticky funtionality to it's own is-sticky class name

Fixes https://warthogs.atlassian.net/browse/WD-11789

QA

Note: This is part of the work to upstream meganav functionality and may not be fully functional on its own.

Currently we focus mostly on the styling of the reduced navigation on desktop screens, making sure it doesn't break on mobile, that search is opened, that the secondary navigation below it works.

The contents of the dropdowns opened by reduced navigation are not part of this, the dropdowns funcionality on mobile is also not part of this (the "sliding" navigation).

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 🎁, Breaking Change 💣, Bug 🐛, Documentation 📝, Maintenance 🔨.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix relesase (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) should be listed on the what's new page.

Screenshots

image

@webteam-app
Copy link

@bartaz bartaz marked this pull request as draft June 5, 2024 12:00
@bartaz bartaz changed the title Move reduced navigation from u.com to vanilla WIP: Move reduced navigation from u.com to vanilla Jun 5, 2024
@bartaz bartaz force-pushed the wd-11791 branch 2 times, most recently from 344f348 to 3227e6c Compare June 19, 2024 15:30
@bartaz bartaz added the Feature 🎁 New feature or request label Jun 19, 2024
@bartaz
Copy link
Member

bartaz commented Jun 19, 2024

@petesfrench @jmuzina @pastelcyborg While this is not fully ready for review (docs are missing), code should be more or less in required shape.

Please have a look if you get a chance and leave any comments, suggestions, questions that may arise. Pete has the most context, but all comments are welcome. This is just a part of a meganav, so techcally is not meant to be fully working (for example empty dropdowns), but let's make it as good as possible for Vanilla standard.

Copy link
Member

@jmuzina jmuzina left a comment

Choose a reason for hiding this comment

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

This needs a package.json minor version bump, as well as an entry in releases.yaml for release notes

@jmuzina jmuzina requested a review from pastelcyborg June 19, 2024 16:42
Copy link
Contributor

@pastelcyborg pastelcyborg left a comment

Choose a reason for hiding this comment

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

Thanks for doing this, @petesfrench!

High-level comment/question: I notice the reduced nav on mobile is positioned statically - it pushes page content down when opened. Just wanted to confirm this is desired functionality? Sometimes this shift can be quite jarring.

scss/_patterns_navigation-reduced.scss Show resolved Hide resolved
scss/_patterns_navigation-reduced.scss Show resolved Hide resolved
scss/_patterns_navigation-reduced.scss Outdated Show resolved Hide resolved
scss/_patterns_navigation.scss Outdated Show resolved Hide resolved
templates/docs/examples/patterns/navigation/reduced.html Outdated Show resolved Hide resolved
templates/docs/examples/patterns/navigation/reduced.html Outdated Show resolved Hide resolved
@bartaz bartaz changed the title WIP: Move reduced navigation from u.com to vanilla Add reduced top navigation bar Jun 26, 2024
@bartaz bartaz marked this pull request as ready for review June 26, 2024 13:03
@jmuzina jmuzina removed the Review: Percy needed This PR needs a review of Percy for visual regressions label Jun 26, 2024
@bartaz bartaz requested a review from jmuzina July 1, 2024 12:48
@jmuzina
Copy link
Member

jmuzina commented Jul 1, 2024

Is there meant to be so much whitespace between the topnav and the secondary nav on mobile when the topnav is expanded?

Screencast.from.07-01-2024.10.13.58.AM.webm

Edit: No, this scrolling is not intentional, seems like a bug with sidenav:

MM thread

@jmuzina jmuzina added Question ❓ Further information is requested Review: QA -1 and removed Question ❓ Further information is requested Review: QA +1 labels Jul 1, 2024
@bartaz
Copy link
Member

bartaz commented Jul 1, 2024

Is there meant to be so much whitespace between the topnav and the secondary nav on mobile when the topnav is expanded?

No, good catch. Looks like we have this issue with standard sliding nav as well. Body elements need to be set to overflow hidden (disabled scroll) when sliding nav is open. I need to figure out how to best do it (JS, CSS?).

Copy link
Member

@jmuzina jmuzina left a comment

Choose a reason for hiding this comment

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

Great work, that was quite an effort :)

Good to go pending design review

@lyubomir-popov
Copy link
Contributor

lyubomir-popov commented Jul 2, 2024

Looks good, a few small things:

  • this feels a bit unresolved - didn't we agree on a different alignment?
    image
  • can chevrons match the text colour:
    image
  • can we use real items here -
    image
  • small misalignment between breakpoints:
    image
  • Can we just say close? ideally, things shouldn't be shifting around between breakpoints, and "Menu" and "Close" are almost the same width

@bartaz
Copy link
Member

bartaz commented Jul 2, 2024

Looks good, a few small things:

  • this feels a bit unresolved - didn't we agree on a different alignment?

Sliding mobile navigation has not been part of this PR. Animating this (as discussed) will probably increase the scope, but I can try.

  • can chevrons match the text colour:

Icons in light/dark theme match default text colour. We don't have muted icons. This would be out of scope for this PR, we would need to solve it on theme level (and have 2x more icons defined - muted versions of everything).

  • can we use real items here -

Out of scope for this PR. This is about the navigation itself, not the dropdowns in meganav.

  • small misalignment between breakpoints:

This is caused by default Vanilla navigation breakpoint not being large enough for this. If we change it, it will change for everyone by default, as it's a settings level.
Unfortunately we can't change it per example. Not sure how to best address that.

  • Can we just say close? ideally, things shouldn't be shifting around between breakpoints, and "Menu" and "Close" are almost the same width

This is not a menu - you have search open. Search icon changes to X icon for that one.

@bartaz
Copy link
Member

bartaz commented Jul 2, 2024

As discussed in stand-up, we are merging this as-is for now, but the visual issues will be addressed in following updates.

@bartaz bartaz merged commit 20a5d7e into main Jul 2, 2024
15 checks passed
@bartaz bartaz deleted the wd-11791 branch July 2, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants