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

fix: Don’t clip 'ConfirmationDialog' button outlines #1203

Merged
merged 3 commits into from
May 3, 2021

Conversation

smockle
Copy link
Member

@smockle smockle commented Apr 30, 2021

Fixes https://github.com/github/primer/issues/129

Previously Dialog had overflow: hidden, which caused focus rings to clip. This PR removes overflow: hidden, then updates the border-radius of ConfirmationDialog buttons to follow the curvature of their container.

Before After
before after

@changeset-bot
Copy link

changeset-bot bot commented Apr 30, 2021

⚠️ No Changeset found

Latest commit: 6923241

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Apr 30, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/primer-components/8vqXLpbL7zft9UKFqBeU34ovaQzM
✅ Preview: https://primer-components-git-confirmation-dialog-focus-ring-primer.vercel.app

Copy link
Member

@dgreif dgreif left a comment

Choose a reason for hiding this comment

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

Nice fix, looks so much better!!

Comment on lines +103 to +105
button:not(:first-of-type):not(:last-of-type) {
border-radius: 0;
}
Copy link
Member

Choose a reason for hiding this comment

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

Great coverage here for all cases except button:first-of-type:last-of-type if there is only 1 button. If we are assuming there will always be exactly 2 buttons, then this last section can be removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh interesting, great catch! I hadn’t considered a ConfirmationDialog with only one button. I’ll update this on Monday. 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in b2bdb66!

Before After
before after

@vercel vercel bot temporarily deployed to Preview May 2, 2021 19:42 Inactive
@smockle smockle requested a review from dgreif May 2, 2021 19:48
@vercel vercel bot temporarily deployed to Preview May 3, 2021 00:55 Inactive
@smockle smockle enabled auto-merge May 3, 2021 00:55
@smockle smockle merged commit 5296405 into main May 3, 2021
@smockle smockle deleted the confirmation-dialog-focus-ring branch May 3, 2021 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants