-
Notifications
You must be signed in to change notification settings - Fork 578
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
Bug fix: ButtonGroup with Tooltips #5123
Conversation
🦋 Changeset detectedLatest commit: d30f6fb 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 |
👋 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! |
size-limit report 📦
|
f08156b
to
8621b12
Compare
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.
I was pointed here from #5452, and just wanted to make a small suggestion: instead of wrapping each item in a container, it might be easier and safer to just switch to using first-of-type
and last-of-type
selectors - something like &:is(button, a):last-of-type
.
@iansan5653 I attempted to do that here #5343 and that caused these bugs I think cause it's not always all |
Uh oh! @jonrohan, the image you shared is missing helpful alt text. Check #5123 (comment). Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.
|
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/355518 |
🟢 golden-jobs completed with status |
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.
🥇
@@ -83,6 +104,7 @@ const ButtonGroup = React.forwardRef<HTMLElement, ButtonGroupProps>(function But | |||
forwardRef, | |||
) { | |||
const enabled = useFeatureFlag('primer_react_css_modules_ga') | |||
const buttons = React.Children.map(children, (child, index) => <div key={index}>{child}</div>) |
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.
One alternative idea I had here was to check when the child is the last item, we could add a special classname to re-round the corners, thinking it might be more predictable than relying on direct children selectors. But this also works and I'm fine with it getting out like this.
Closes #4129
Related:
Changelog
Made CSS a bit more specific
New
Changed
Removed
Rollout strategy
Testing & Reviewing
Merge checklist