Skip to content

Conversation

@francinelucca
Copy link
Member

This is not going to play well with our useSlots strategy, reverting and will fix up for next release

@francinelucca francinelucca requested a review from a team as a code owner October 3, 2025 13:41
@changeset-bot
Copy link

changeset-bot bot commented Oct 3, 2025

⚠️ No Changeset found

Latest commit: eea3868

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the staff Author is a staff member label Oct 3, 2025
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 reverts the removal of sx prop support from the FormControl component and its subcomponents. The revert is necessary because the previous change would conflict with the existing useSlots strategy implementation.

Key Changes

  • Restores sx prop support to FormControl and all its subcomponents (Caption, Label, LeadingVisual, Validation)
  • Reverts from CSS modules back to styled-components for FormControlLeadingVisual
  • Re-adds FormControl to styled-react package exports

Reviewed Changes

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

Show a summary per file
File Description
packages/styled-react/src/index.tsx Re-exports FormControl from @primer/react and removes local FormControl implementation
packages/styled-react/src/components/FormControl.tsx Removes the entire styled-react FormControl wrapper component
packages/react/src/index.ts Removes FormControl type exports that were added in the reverted change
packages/react/src/experimental/SelectPanel2/SelectPanel.examples.stories.tsx Replaces CSS class usage with sx prop for FormControl styling
packages/react/src/experimental/SelectPanel2/SelectPanel.examples.stories.module.css Removes FormControl CSS class definition
packages/react/src/tests/snapshots/exports.test.ts.snap Updates test snapshot to reflect removed type exports
packages/react/src/FormControl/index.ts Removes FormControl type exports
packages/react/src/FormControl/FormControlLeadingVisual.tsx Reverts from CSS modules to styled-components and adds sx prop support
packages/react/src/FormControl/FormControlLeadingVisual.module.css Removes CSS module file
packages/react/src/FormControl/FormControlLabel.tsx Adds sx prop support back to FormControlLabel
packages/react/src/FormControl/FormControlCaption.tsx Adds sx prop support and BoxWithFallback wrapper
packages/react/src/FormControl/FormControl.tsx Adds sx prop support and BoxWithFallback wrappers
packages/react/src/FormControl/FormControl.docs.json Adds sx prop documentation for all FormControl components
.changeset/grumpy-lobsters-obey.md Removes the changeset for the reverted FormControl changes

@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 Oct 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2025

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

@TylerJDev TylerJDev merged commit 503a592 into main Oct 3, 2025
42 of 43 checks passed
@TylerJDev TylerJDev deleted the chore/revert-6681 branch October 3, 2025 13:50
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 staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants