-
Notifications
You must be signed in to change notification settings - Fork 129
Hide tooltip when popover (ActionMenu) is activated #3823
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
Conversation
🦋 Changeset detectedLatest commit: 40269a8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
There was a problem hiding this 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.
| (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 |
Copilot
AI
Dec 23, 2025
There was a problem hiding this comment.
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.
|
@TylerJDev is there a linked issue for this? |
|
@francinelucca, this will get us to parity with PRC (https://github.com/github/primer/issues/6003) |
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
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
What approach did you choose and why?
Prevents tooltip from appearing when popover is activated.
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.