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

Use the IconButton for the close button on Dialog #5066

Merged
merged 5 commits into from
Oct 4, 2024

Conversation

jonrohan
Copy link
Member

@jonrohan jonrohan commented Oct 4, 2024

Fixes an issue when the feature flag is enabled for CSS module buttons the close button looses it's hover state. I fixed this issue by removing the styled component DialogCloseButton and used IconButton instead. The only downside is I needed to use unsafeDisableTooltip to remove the Tooltip like the existing functionality. If we want to remove this we should talk to design about allowing a tooltip here.

Changelog

Changed

DialogCloseButton is using IconButton directly

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

Visit the storybook story for Dialog and toggle the primer_react_css_modules_staff feature flag on. Then hover over the close x.

Merge checklist

@jonrohan jonrohan requested a review from a team as a code owner October 4, 2024 16:58
Copy link

changeset-bot bot commented Oct 4, 2024

🦋 Changeset detected

Latest commit: 38d89ff

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 staff Author is a staff member label Oct 4, 2024
Copy link
Contributor

github-actions bot commented Oct 4, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 96.73 KB (-0.01% 🔽)
packages/react/dist/browser.umd.js 97 KB (-0.14% 🔽)

@primer primer bot requested a review from a team as a code owner October 4, 2024 17:21
@jonrohan jonrohan added this pull request to the merge queue Oct 4, 2024
Merged via the queue into main with commit 702ba5c Oct 4, 2024
32 checks passed
@jonrohan jonrohan deleted the use_iconbutton_for_close_dialog branch October 4, 2024 17:43
@primer primer bot mentioned this pull request Oct 4, 2024
@primer primer bot mentioned this pull request Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants