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

Fix issue preventing expansion and collapse of nav list items with tooltips #2765

Merged
merged 3 commits into from
Apr 10, 2024

Conversation

camertron
Copy link
Contributor

@camertron camertron commented Apr 10, 2024

What are you trying to accomplish?

NavList items with tooltips currently cannot be expanded or collapsed.

Screenshots

Here's a video showing that NavList sub items can be expanded and collapsed even when they have the truncate_text: :show_tooltip option set.

tooltip_nav_item.mov

Integration

No changes necessary in production.

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

What approach did you choose and why?

Our JS code identifies the sub list via nextElementSibling, which may instead be the tooltip element. The solution is to move the tooltip element to a different part of the rendered output.

Accessibility

  • No new axe scan violation - This change does not introduce any new axe scan violations.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Copy link

changeset-bot bot commented Apr 10, 2024

🦋 Changeset detected

Latest commit: e6adcdd

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

This PR includes changesets to release 1 package
Name Type
@primer/view-components Patch

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

@camertron camertron marked this pull request as ready for review April 10, 2024 22:48
@camertron camertron requested a review from a team as a code owner April 10, 2024 22:48
@camertron camertron requested review from joshblack, thesnowrose and jonrohan and removed request for a team and joshblack April 10, 2024 22:48
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.

2 participants