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

WS2-2029: Anchor Menu links do not properly highlight the active area #435

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

juanmitriatti
Copy link
Contributor

Description

Description of problem

Anchor Menu links do not properly highlight the active area

Solution

Removed Bootstrap scrollspy from anchor-menu.js and I added a new custom functionality

Links

Checklist

  • Design updates match Web Standards and Unity Design System
  • Solution is documented on the Jira ticket
  • QA steps to verify have been included on the Jira ticket
  • No new PHP or JS errors
  • No accessibility issues are introduced with this update
  • Added/updated README.md files, if relevant
  • Confirm that any yaml files included have a matching update hook

Verified in browsers

  • Chrome
  • Safari
  • Firefox
  • Edge

Screenshots

Note: Sections that are not applicable for this issue can be removed.

@juanmitriatti juanmitriatti requested a review from a team May 17, 2024 16:06
@mlsamuelson
Copy link
Contributor

Visit Site

Created multidev environment pr-435 for webspark-ci.

@tbutterf tbutterf changed the base branch from sprint-60 to WS2-sprint-61 May 21, 2024 20:21
@mlsamuelson
Copy link
Contributor

I've asked @davidornelas11 to do a first pass on this one since it was fairly recently he helped with switching to scrollspy and then ported that over to UDS. Want to make sure there's not a simpler or different approach that might make sense.

Copy link
Contributor

@davidornelas11 davidornelas11 left a comment

Choose a reason for hiding this comment

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

So unfortunately this is a known issue with scrollspy as it targets the element with that id that matches the nav item. I played around with it a bit and got it work a lot better by modifying the threshold of the intersectionObserver config in scrollspy but it still has that "dead space" when there is a long paragraph. Juan Pablo's code targets the text so it always stays on until it hits the next section, and if that's the functionality we want then this would be a valid fix

@mlsamuelson
Copy link
Contributor

I will be creating a ticket for UDS to eventually use this approach.

@mlsamuelson mlsamuelson merged commit 5237c30 into WS2-sprint-61 Jun 7, 2024
3 checks passed
@mlsamuelson mlsamuelson deleted the WS2-2029 branch June 7, 2024 21:01
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.

3 participants