Skip to content

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

Merged
lukasoppermann merged 10 commits into
mainfrom
lukasoppermann/primitives-dark-track-fix
Mar 3, 2026
Merged

Update to latest primitives version and add visual fix for toggleSwitch#7588
lukasoppermann merged 10 commits into
mainfrom
lukasoppermann/primitives-dark-track-fix

Conversation

@lukasoppermann

Copy link
Copy Markdown
Contributor

Todo

  • add updates primitives package

This requires primer/primitives#1318

BeforeAfter
imageimage

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-actionsgithub-actionsBot 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
Copy Markdown
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

changeset-botBot commented Feb 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cfb3e99

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
@primer/reactPatch

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

primerBot commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

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

@lukasoppermann
lukasoppermannforce-pushed the lukasoppermann/primitives-dark-track-fix branch from f82ce59 to 3637755CompareFebruary 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 ownerFebruary 24, 2026 14:29

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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.

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

@primer

primerBot commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions
github-actionsBottemporarily deployed to storybook-preview-7588 February 24, 2026 14:43 Inactive
@github-actions
github-actionsBot requested a deployment to storybook-preview-7588 February 24, 2026 14:53 Abandoned
@primer

primerBot commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

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

@francineluccafrancinelucca added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Feb 25, 2026
@primer

primerBot commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

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

@primer
primerBot requested a review from a team as a code ownerFebruary 25, 2026 04:43
@github-actionsgithub-actionsBot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Feb 25, 2026
@primer

primerBot commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

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

@primer

primerBot commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions
github-actionsBot requested a deployment to storybook-preview-7588 February 25, 2026 18:00 Abandoned
@primer-integration

Copy link
Copy Markdown

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/14743

@primer-integration

Copy link
Copy Markdown

Integration test results from github/github-ui:

Passed CI  Passed
Passed VRT  Passed
Passed Projects  Passed

All checks passed!

@lukasoppermann
lukasoppermann added this pull request to the merge queueMar 3, 2026
Merged via the queue into main with commit e649da3Mar 3, 2026
65 of 66 checks passed
@lukasoppermann
lukasoppermann deleted the lukasoppermann/primitives-dark-track-fix branch March 3, 2026 14:21
@primerprimerBot mentioned this pull request Mar 3, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommendedThis 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.

5 participants

@lukasoppermann@francinelucca@aplural@TylerJDev