Skip to content

Conversation

@TylerJDev
Copy link
Member

Authors: Please fill out this form carefully and completely.

Reviewers: By approving this Pull Request you are approving the code change, as well as its deployment and mitigation plans.
Please read this description carefully. If you feel there is anything unclear or missing, please ask for updates.

What are you trying to accomplish?

Ensures tooltip isn't shown if a popover (e.g. ActionMenu) is opened.

Screenshots

Before After
Screen.Recording.2025-12-23.at.10.51.34.AM.mov
Screen.Recording.2025-12-23.at.10.50.56.AM.mov

Integration

List the issues that this change affects.

N/A

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?

Prevents tooltip from appearing when popover is activated.

Merge checklist

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

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

Copilot AI review requested due to automatic review settings December 23, 2025 15:55
@TylerJDev TylerJDev requested a review from a team as a code owner December 23, 2025 15:55
@changeset-bot
Copy link

changeset-bot bot commented Dec 23, 2025

🦋 Changeset detected

Latest commit: 40269a8

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR prevents tooltips from appearing when a popover (such as an ActionMenu) controlled by the same button is open, improving the user experience by avoiding overlapping UI elements.

Key Changes

  • Added state tracking for when a control's popover is open or closed
  • Modified tooltip visibility logic to prevent showing when popover is active
  • Refined hiding conditions to only trigger when a popover opens (not closes)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +259 to +264
(event.type === 'mouseenter' ||
// Only show tooltip on focus if running in headless browser (for tests) or if focus ring
// is visible (i.e. if user is using keyboard navigation)
(event.type === 'focus' && (navigator.webdriver || this.control.matches(':focus-visible')))) &&
// Don't show tooltip if the control's popover is open (e.g. an ActionMenu)
!this.#isControlsPopoverOpen
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

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

The new behavior preventing tooltips from showing when a popover (ActionMenu) is open lacks test coverage. Consider adding a system test that verifies the tooltip is hidden when a control's popover opens, and reappears after the popover closes. This is especially important given the existing comprehensive tooltip test coverage in test/system/alpha/tooltip_test.rb.

Copilot uses AI. Check for mistakes.
@francinelucca
Copy link
Member

@TylerJDev is there a linked issue for this?

@TylerJDev
Copy link
Member Author

@francinelucca, this will get us to parity with PRC (https://github.com/github/primer/issues/6003)

@TylerJDev TylerJDev enabled auto-merge December 23, 2025 21:20
@TylerJDev TylerJDev disabled auto-merge December 23, 2025 21:25
@TylerJDev TylerJDev added this pull request to the merge queue Dec 30, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 30, 2025
@TylerJDev TylerJDev added this pull request to the merge queue Dec 30, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 30, 2025
@francinelucca francinelucca added this pull request to the merge queue Dec 31, 2025
Merged via the queue into main with commit 954596a Dec 31, 2025
33 of 35 checks passed
@francinelucca francinelucca deleted the hide-tooltip-action-menu branch December 31, 2025 02:02
@primer primer bot mentioned this pull request Dec 31, 2025
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.

3 participants