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

Dismiss nav dropdown on anchor click #426

Merged
merged 2 commits into from
Nov 16, 2021
Merged

Conversation

dstaley
Copy link
Contributor

@dstaley dstaley commented Nov 15, 2021

🎟️ Asana Task
πŸ” Preview Link


Description

Currently, when a dropdown nav menu item triggers a client-side navigation, the dropdown menu isn't dismissed. This PR updates the click handler for dropdown menu items to dismiss the menu when the clicked on element is an anchor tag with a truthy href property.

Before

2021-11-15.15-28-07.mp4

After

2021-11-15.15-30-52.mp4

PR Checklist πŸš€

Items in this checklist may not may not apply to your PR, but please consider each item carefully.

  • Add Asana and Preview links above.
  • Conduct thorough self-review.
  • Add or update tests as appropriate.
  • Conduct reasonable cross browser testing for both compatibility and responsive behavior (We have a Sauce Labs account for this, if you don't have access, just ask!).
  • Conduct reasonable accessibility review (use the WAS as a guide or an axe browser plugin until we establish more formal checks).
  • Identify (in the description above) and document (add Asana tasks on this board) any technical debt that you're aware of, but are not addressing as part of this PR.

@changeset-bot
Copy link

changeset-bot bot commented Nov 15, 2021

πŸ¦‹ Changeset detected

Latest commit: 7d2ad90

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hashicorp/react-subnav Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Nov 15, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

πŸ” Inspect: https://vercel.com/hashicorp/react-components/8iULGVbbQh5MvF2d3q87qU2CH7gW
βœ… Preview: https://react-components-git-dsdismiss-subnav-dropdown-hashicorp.vercel.app

Copy link
Contributor

@BRKalow BRKalow left a comment

Choose a reason for hiding this comment

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

πŸ‘

@kylemac
Copy link
Contributor

kylemac commented Nov 16, 2021

this makes me so happy

Copy link
Contributor

@jescalan jescalan left a comment

Choose a reason for hiding this comment

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

πŸ™Œ big wins

@dstaley dstaley merged commit 7a04f76 into main Nov 16, 2021
@dstaley dstaley deleted the ds.dismiss-subnav-dropdown branch November 16, 2021 18:58
@github-actions github-actions bot mentioned this pull request Nov 16, 2021
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.

None yet

4 participants