Skip to content

Use the IconButton for the close button on Dialog - #5066

Merged
jonrohan merged 5 commits into
mainfrom
use_iconbutton_for_close_dialog
Oct 4, 2024
Merged

Use the IconButton for the close button on Dialog#5066
jonrohan merged 5 commits into
mainfrom
use_iconbutton_for_close_dialog

Conversation

@jonrohan

Copy link
Copy Markdown
Member

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 ownerOctober 4, 2024 16:58
@changeset-bot

changeset-botBot commented Oct 4, 2024

Copy link
Copy Markdown

🦋 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
NameType
@primer/reactPatch

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-actionsgithub-actionsBot added the staff Author is a staff member label Oct 4, 2024
@github-actions

github-actionsBot commented Oct 4, 2024

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js96.73 KB (-0.01% 🔽)
packages/react/dist/browser.umd.js97 KB (-0.14% 🔽)

@jonrohanjonrohan added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Oct 4, 2024
@primer
primerBot requested a review from a team as a code ownerOctober 4, 2024 17:21
@github-actionsgithub-actionsBot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Oct 4, 2024
@github-actions
github-actionsBottemporarily deployed to storybook-preview-5066 October 4, 2024 17:24 Inactive
@jonrohan
jonrohan added this pull request to the merge queueOct 4, 2024
Merged via the queue into main with commit 702ba5cOct 4, 2024
@jonrohan
jonrohan deleted the use_iconbutton_for_close_dialog branch October 4, 2024 17:43
@primerprimerBot mentioned this pull request Oct 4, 2024
@primerprimerBot mentioned this pull request Oct 18, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

staffAuthor is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jonrohan@joshblack