Skip to content

Conversation

@TylerJDev
Copy link
Member

@TylerJDev TylerJDev commented Dec 30, 2025

Closes https://github.com/github/primer/issues/6256

Adds overflow: hidden to ensure label text does not overflow.

Changelog

New

  • Adds overflow: hidden to .StatusTextItem when hidden

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

Merge checklist

@changeset-bot
Copy link

changeset-bot bot commented Dec 30, 2025

🦋 Changeset detected

Latest commit: 91a41f8

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 staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Dec 30, 2025
@github-actions
Copy link
Contributor

👋 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 integration-tests: skipped manually label to skip these checks.

@TylerJDev TylerJDev marked this pull request as ready for review December 30, 2025 15:45
@TylerJDev TylerJDev requested a review from a team as a code owner December 30, 2025 15:45
@github-actions github-actions bot requested a deployment to storybook-preview-7399 December 30, 2025 15:46 Abandoned
Copy link
Contributor

Copilot AI left a 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: hidden CSS 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.

@TylerJDev TylerJDev added the integration-tests: skipped manually Changes in this PR do not require an integration test label Dec 30, 2025
@TylerJDev TylerJDev added this pull request to the merge queue Dec 30, 2025
Merged via the queue into main with commit 06c8320 Dec 30, 2025
62 checks passed
@TylerJDev TylerJDev deleted the tylerjdev/toggle-switch-overflow-fix branch December 30, 2025 21:51
@primer primer bot mentioned this pull request Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm integration-tests: skipped manually Changes in this PR do not require an integration test staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants