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

Dialog: Show Tooltip on "close" button #5436

Merged
merged 8 commits into from
Mar 20, 2025

Conversation

TylerJDev
Copy link
Member

@TylerJDev TylerJDev commented Dec 13, 2024

Part of https://github.com/github/primer/issues/3726

Removes unsafeDisableTooltip from IconButton in Dialog, and removes eslint disable along with it.

Dialog component showcasing the dialog's close button with a tooltip. The tooltip is positioned above the button, with the text 'Close'.

Changelog

Removed

  • Removed unsafeDisableTooltip

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Copy link

changeset-bot bot commented Dec 13, 2024

🦋 Changeset detected

Latest commit: bdfdc66

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

This PR includes changesets to release 1 package
Name Type
@primer/react 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

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Dec 13, 2024
Copy link
Contributor

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

Copy link
Contributor

github-actions bot commented Dec 13, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 105.94 KB (+0.04% 🔺)
packages/react/dist/browser.umd.js 106.23 KB (+0.09% 🔺)

@TylerJDev
Copy link
Member Author

Some of the snapshots look a bit odd due to the tooltip placement, but I believe this is just something with how the snapshots were taken (maybe timing?) and not an actual issue with the tooltip, as it cannot be produced locally.

@TylerJDev TylerJDev marked this pull request as ready for review December 13, 2024 16:55
@TylerJDev TylerJDev requested review from a team as code owners December 13, 2024 16:55
Copy link
Contributor

@langermank langermank left a comment

Choose a reason for hiding this comment

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

@TylerJDev those snapshots are kind of scary! Could we maybe adjust the test to add a short delay? Do you think that's the issue? 🤔

@broccolinisoup
Copy link
Member

@TylerJDev @langermank sorry to barge in 🙃 I saw the Slack notification and wanted to mention that we have one open issue regarding Tooltip misplacement on Dialogs that we probably need to fix it first 😬 #4734

server-mm404

This comment was marked as spam.

Copy link
Contributor

github-actions bot commented Mar 9, 2025

Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days.

@github-actions github-actions bot added the Stale label Mar 9, 2025
@TylerJDev TylerJDev removed the Stale label Mar 10, 2025
@TylerJDev TylerJDev force-pushed the tylerjdev/remove-unsafetooltip-dialog branch from a3c0fcf to 94a8eb0 Compare March 17, 2025 23:06
@@ -137,7 +137,7 @@ export const WithSx = ({width, height, subtitle}: DialogStoryProps) => {
{buttonType: 'danger', content: 'Delete the universe', onClick: onDialogClose},
{buttonType: 'primary', content: 'Proceed'},
]}
sx={{borderColor: 'accent.emphasis', borderWidth: '1px', borderStyle: 'solid'}}
sx={{borderColor: 'accent.emphasis', borderWidth: '1px', borderStyle: 'solid', animation: 'none !important'}}
Copy link
Member Author

Choose a reason for hiding this comment

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

There was a very small difference between the dev component snapshots (0.02 pixel difference). It seems like this was caused by the animation, but only affected the colorblind theme.

It would sometimes pass/fail, so I marked it off as being flaky via the custom CSS. It never affected the non-dev stories.

@TylerJDev TylerJDev requested a review from langermank March 19, 2025 16:52
Copy link
Contributor

@langermank langermank left a comment

Choose a reason for hiding this comment

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

Excellent work solving this very weird, annoying problem!

@TylerJDev TylerJDev added this pull request to the merge queue Mar 20, 2025
Merged via the queue into main with commit 11b8d4c Mar 20, 2025
44 checks passed
@TylerJDev TylerJDev deleted the tylerjdev/remove-unsafetooltip-dialog branch March 20, 2025 21:12
@primer primer bot mentioned this pull request Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants