Skip to content

Remove styled-system usage - TextInputWrapper and related - #6666

Merged
mperrotti merged 24 commits into
mainfrom
mp/rm-sx/textinput+related
Sep 12, 2025
Merged

Remove styled-system usage - TextInputWrapper and related#6666
mperrotti merged 24 commits into
mainfrom
mp/rm-sx/textinput+related

Conversation

@mperrotti

@mperrottimperrotti commented Aug 25, 2025

Copy link
Copy Markdown
Contributor

Relates to https://github.com/github/primer/issues/5422

Changelog

New

Changed

Removed

Note

Reviewers: I misunderstood the scope of https://github.com/github/primer/issues/5422 when I started on it and also removed sx props. If we want to preserve those for now, I can revert those changes.

  • sx prop from
    • Select
    • Textarea
    • TextInput
    • TextInputWithTokens
    • TextInputWrapper
  • width, minWidth, and maxWidth props from TextInputWrapper
  • styled-system dependencies

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

changeset-botBot commented Aug 25, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: eb29047

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

This PR includes changesets to release 2 packages
NameType
@primer/reactMajor
@primer/styled-reactMajor

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

Copy link
Copy Markdown
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-actionsgithub-actionsBot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Aug 25, 2025
@github-actions

github-actionsBot commented Aug 25, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js89.49 KB (-0.13% 🔽)
packages/react/dist/browser.umd.js89.5 KB (-0.22% 🔽)

@mperrotti
mperrotti marked this pull request as ready for review August 25, 2025 19:05
CopilotAI review requested due to automatic review settings August 25, 2025 19:05
@mperrotti
mperrotti requested a review from a team as a code ownerAugust 25, 2025 19:05

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 pull request removes styled-system usage from TextInputWrapper and related input components as part of the migration away from styled-system dependencies. The changes eliminate the sx prop and width-related props from multiple input components and their wrapper.

  • Removes styled-system imports and SxProp usage from input components
  • Eliminates deprecated width, minWidth, and maxWidth props from TextInputWrapper
  • Updates component type definitions to remove styled-system prop references

Reviewed Changes

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

Show a summary per file
FileDescription
packages/react/src/internal/components/TextInputWrapper.tsxRemoves styled-system imports, width props, and sx prop from TextInputBaseWrapper
packages/react/src/Textarea/Textarea.tsxRemoves SxProp import and sx prop usage
packages/react/src/TextInputWithTokens/TextInputWithTokens.tsxRemoves sx and width-related props from component
packages/react/src/TextInput/TextInput.tsxRemoves sx and width props from TextInput component and type definitions
packages/react/src/TextInput/TextInput.docs.jsonRemoves documentation for deprecated width-related props
packages/react/src/TextInput/TextInput.dev.stories.tsxReplaces sx prop usage with CSS classes and updates story structure
packages/react/src/Select/Select.tsxRemoves sx prop usage from Select component
packages/react/src/Overlay/Overlay.features.stories.tsxMigrates from sx props to CSS modules and semantic components
packages/react/src/Overlay/Overlay.features.stories.module.cssAdds CSS module styles to replace inline sx styling
.changeset/gold-dingos-sneeze.mdDocuments the major version change for removing styled-system usage
Comments suppressed due to low confidence (1)

packages/react/src/internal/components/TextInputWrapper.tsx:1

  • The style prop is being destructured from props but removed from the component signature. This will cause the prop to be included in restProps and passed to the underlying component, but it's no longer in the type definition. Either remove it from destructuring or add it back to the type definition.
import React, {type ComponentProps} from 'react'

@github-actions
github-actionsBot requested a deployment to storybook-preview-6666 August 25, 2025 19:11 Abandoned
@github-actions
github-actionsBot requested a deployment to storybook-preview-6666 August 25, 2025 19:14 Abandoned
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6666 August 25, 2025 19:24 Inactive
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6666 September 12, 2025 13:49 Inactive
@mperrotti
mperrotti added this pull request to the merge queueSep 12, 2025
Merged via the queue into main with commit 71382dcSep 12, 2025
43 checks passed
@mperrotti
mperrotti deleted the mp/rm-sx/textinput+related branch September 12, 2025 14:11
@primerprimerBot mentioned this pull request Sep 12, 2025
@primer-integration

Copy link
Copy Markdown

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

@primer-integration

Copy link
Copy Markdown

🔴 ci completed with status failure.

@github-actionsgithub-actionsBot added integration-tests: failing Changes in this PR 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 labels Sep 12, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: failingChanges in this PR cause breaking changes in gh/gh

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@mperrotti@jonrohan@joshblack@francinelucca