question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Masthead]: Add a logic that highlights the current and parent menu items within the Masthead dropdown + Mega Menu based on the URL

See original GitHub issue

The problem

  • The current dds-masthead-container component does not have a logic in place that highlights the current and parent menu items according to the current URL of the page.
  • There’s a style in place for the active state, however, this attribute should be updated/applied in the shadow Dom where we’re rendering the menu items.
  • As part of the Unified Cloud Masthead + Megamenu project, we’d like to ensure that users understand where within the page that are on especially when you’re navigating 2 to 3 levels down.

Example

IBM_Cloud_cost_estimator___IBM

Purposed solution

  • Add a script that executes and compares the href of each menu link to the current page URL starting after the domain name and assigns the correct active styling to the appropriate menu item.
  • I know that this request might be a bit tricky, so I’m open to suggestions.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
RobertaJHahncommented, Oct 21, 2021

All linked issues are closed.

0reactions
shixiedesigncommented, Sep 9, 2021

Summarizing the decisions in a bit more visual format. Notice the difference between desktop & mobile usage of selected state styles:

image image

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Masthead] React: Change component to include logic that ...
[Masthead] React: Change component to include logic that highlights the current and parent menu items within the Masthead dropdown + Mega Menu based...
Read more >
IBM CIO Enterprise Internal - Percy | Visual testing as a service
#6937 feat(masthead): Add a logic that highlights the current and parent menu items within the Masthead dropdown + Mega Menu based on the...
Read more >
Fly-out Menus | Web Accessibility Initiative (WAI)
Use fly-out (or drop-down) menus to provide an overview of a web site's page ... Indicate navigation menu items with submenus visually and...
Read more >
Menu Item Options – Getting Started Guide
A guide explaining the various menu item options available in Max Mega Menu. ... To adjust the mega menu settings for an item,...
Read more >
Elementor Nav Menu: Powerful WordPress Menu Builder
Elementor Menu widget allows you to create professional menus in minutes, without having to edit CSS. Learn all about Elementor WordPress ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found