Skip to content

Comments

Update to latest primitives version and add visual fix for toggleSwitch#7588

Open
lukasoppermann wants to merge 6 commits intomainfrom
lukasoppermann/primitives-dark-track-fix
Open

Update to latest primitives version and add visual fix for toggleSwitch#7588
lukasoppermann wants to merge 6 commits intomainfrom
lukasoppermann/primitives-dark-track-fix

Conversation

@lukasoppermann
Copy link
Contributor

Todo

  • add updates primitives package

This requires primer/primitives#1318

Before After
image image

Changelog

  • updates primitives
  • adjusts toggleSwitchKnob to have a 1px space to look fine with the new style

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

  • review storybook segmentedControl and toggleSwitch

Merge checklist

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Feb 24, 2026
@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.

@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2026

🦋 Changeset detected

Latest commit: c2c0706

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

@primer
Copy link
Contributor

primer bot commented Feb 24, 2026

🤖 Lint issues have been automatically fixed and committed to this PR.

@lukasoppermann lukasoppermann force-pushed the lukasoppermann/primitives-dark-track-fix branch from f82ce59 to 3637755 Compare February 24, 2026 14:29
@lukasoppermann lukasoppermann marked this pull request as ready for review February 24, 2026 14:29
@lukasoppermann lukasoppermann requested a review from a team as a code owner February 24, 2026 14:29
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 updates the @primer/primitives dependency from version 11.3.1 to 11.5.0 and adjusts the ToggleSwitch component's knob styling to accommodate visual changes introduced in the new primitives version. The changes ensure the ToggleSwitch knob has proper 1px spacing around it within the track.

Changes:

  • Updated @primer/primitives from 11.3.1 to 11.5.0 in package-lock.json
  • Adjusted ToggleSwitch knob positioning with 1px insets (top, bottom, left)
  • Modified border-radius calculation to use --borderWidth-thick instead of --borderWidth-thin
  • Updated translateX transform to account for 1px spacing on both sides

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
packages/react/src/ToggleSwitch/ToggleSwitch.module.css Adjusts knob positioning (1px insets), border-radius calculation, and transform to create proper spacing with the new primitives styling
package-lock.json Updates @primer/primitives dependency to 11.5.0

@primer
Copy link
Contributor

primer bot commented Feb 24, 2026

🤖 Lint issues have been automatically fixed and committed to this PR.

@github-actions github-actions bot temporarily deployed to storybook-preview-7588 February 24, 2026 14:43 Inactive
@github-actions github-actions bot requested a deployment to storybook-preview-7588 February 24, 2026 14:53 Abandoned
@primer
Copy link
Contributor

primer bot commented Feb 24, 2026

🤖 Lint issues have been automatically fixed and committed to this PR.

@francinelucca francinelucca added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Feb 25, 2026
@primer
Copy link
Contributor

primer bot commented Feb 25, 2026

🤖 Lint issues have been automatically fixed and committed to this PR.

@primer primer bot requested a review from a team as a code owner February 25, 2026 04:43
@github-actions github-actions bot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Feb 25, 2026
@primer
Copy link
Contributor

primer bot commented Feb 25, 2026

🤖 Lint issues have been automatically fixed and committed to this PR.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants