Skip to content

Conversation

francinelucca
Copy link
Member

@francinelucca francinelucca commented Oct 17, 2025

Changelog

New

  • add type ThemeColorPaths, type ThemeShadowPaths

Removed

  • remove sx, SxProp, exports from @primer/react

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

Copy link

changeset-bot bot commented Oct 17, 2025

🦋 Changeset detected

Latest commit: 2af81e5

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

This PR includes changesets to release 2 packages
Name Type
@primer/react Major
@primer/styled-react Major

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 Oct 17, 2025
Copy link
Contributor

👋 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!

@github-actions github-actions bot requested a deployment to storybook-preview-7032 October 17, 2025 16:55 Abandoned
@github-actions github-actions bot requested a deployment to storybook-preview-7032 October 17, 2025 17:00 Abandoned
@primer-integration
Copy link

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

@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm integration-tests: failing Changes in this PR cause breaking changes in gh/gh labels Oct 17, 2025
@primer-integration
Copy link

🟢 ci completed with status success.

@francinelucca francinelucca marked this pull request as ready for review October 18, 2025 00:04
@francinelucca francinelucca requested a review from a team as a code owner October 18, 2025 00:04
Copy link
Contributor

@Copilot 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 implements a cleanup of the sx prop functionality by reorganizing its location and removing certain exports from the main @primer/react package. The changes are part of a deprecation strategy where sx prop functionality is being consolidated in the @primer/styled-react package while being removed from the primary React package.

Key changes:

  • Moves sx prop implementation from @primer/react to @primer/styled-react package
  • Removes sx, SxProp, merge, and related type exports from @primer/react
  • Adds ThemeColorPaths and ThemeShadowPaths type exports to @primer/react

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/styled-react/src/sx.ts Replaces simple re-export with full sx prop implementation including types and utilities
packages/styled-react/src/styled-props.ts Removes BetterSystemStyleObject export that's now available from sx.ts
packages/styled-react/src/index.tsx Updates exports to include merge and BetterSystemStyleObject from local sx module
packages/styled-react/src/components/*.tsx Updates import statements to use local sx and SxProp instead of importing from @primer/react
packages/react/src/sx.ts Removes merge import and export since it's no longer needed
packages/react/src/index.ts Removes sx related exports and adds theme type exports
packages/react/src/__tests__/__snapshots__/exports.test.ts.snap Updates snapshot to reflect removed and added exports
.changeset/mean-kangaroos-count.md Documents the breaking changes for versioning

import {CircleBadge as PrimerCircleBadge, type CircleBadgeProps as PrimerCircleBadgeProps} from '@primer/react'
import styled from 'styled-components'
import {type ForwardRefComponent} from '../polymorphic'
import sx, {type SxProp} from '../sx'
Copy link

Copilot AI Oct 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import should use named import for consistency. Change import sx, {type SxProp} to import {sx, type SxProp} to match the pattern used in other component files.

Suggested change
import sx, {type SxProp} from '../sx'
import {sx, type SxProp} from '../sx'

Copilot uses AI. Check for mistakes.

@francinelucca francinelucca added this pull request to the merge queue Oct 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 20, 2025
@francinelucca francinelucca added this pull request to the merge queue Oct 20, 2025
Merged via the queue into main with commit 9fce541 Oct 20, 2025
44 checks passed
@francinelucca francinelucca deleted the chore/cleanup-sx-prop branch October 20, 2025 12:17
@primer primer bot mentioned this pull request Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants