-
Notifications
You must be signed in to change notification settings - Fork 648
ToggleSwitch: Add overflow: hidden to .StatusTextItem
#7399
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
Conversation
🦋 Changeset detectedLatest commit: 91a41f8 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-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Or, apply the |
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.
Pull request overview
This PR fixes a text overflow issue in the ToggleSwitch component by adding overflow: hidden to the .StatusTextItem CSS class when the element is hidden. This ensures label text does not overflow its container when the status text item is in a hidden state.
Key Changes:
- Adds
overflow: hiddenCSS property to.StatusTextItem:where([data-hidden='true'])selector
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/react/src/ToggleSwitch/ToggleSwitch.module.css | Adds overflow: hidden to prevent text overflow when .StatusTextItem is hidden |
| .changeset/swift-keys-thank.md | Documents the change as a patch release |
The changes look good! The CSS modification is minimal, targeted, and consistent with existing patterns in the file where overflow: hidden is already used in multiple places (lines 73 and 172). The changeset is properly formatted and correctly marked as a patch release. No issues were identified during the review.
Closes https://github.com/github/primer/issues/6256
Adds
overflow: hiddento ensure label text does not overflow.Changelog
New
overflow: hiddento.StatusTextItemwhen hiddenRollout strategy
Testing & Reviewing
Merge checklist