Skip to content

Deprecate contrast for TextInput and Textarea - #8525

Merged
tay1orjones merged 1 commit into
mainfrom
tay1orjones-contrast-prop-deprecation
Oct 15, 2026
Merged

tay1orjones merged 1 commit into
mainfrom
tay1orjones-contrast-prop-deprecation

Conversation

@tay1orjones

Copy link
Copy Markdown
Contributor

Refs github/primer#5545 and #4355.

contrast can make enabled inputs look disabled. Deprecate it on TextInput and Textarea and recommend omitting it. Existing styling stays available while consumers migrate.

Changelog

New

Changed

  • Deprecate contrast on TextInput and Textarea, including inherited input props.

Removed

Rollout strategy

  • No changes needed in github/github-ui
  • Needs changes in github/github-ui
  • Ships with feature flag(s)
  • Not sure
  • None

Ship as a minor release. Consumer migration and removal remain follow-ups. SelectPanel still enables contrast internally; Select's docs and Storybook/Figma mappings also need cleanup.

Testing & Reviewing

Check editor hover for contrast on TextInput and Textarea; you'll see guidance to omit it. Existing contrast={true} inputs should keep their background and remain editable. Check an inherited surface such as Autocomplete.Input as well.

@changeset-bot

changeset-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3164406

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 Minor

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

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 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. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

@tay1orjones tay1orjones changed the title deprecate contrast for TextInput and Textarea Deprecate contrast for TextInput and Textarea Oct 9, 2026
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8525 October 9, 2026 19:33 Inactive
@github-actions github-actions Bot 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 Oct 14, 2026
@tay1orjones
tay1orjones added this pull request to stack #8546 October 14, 2026 18:12
@primer primer deleted a comment from primer-integration Bot Oct 14, 2026
@tay1orjones tay1orjones removed the integration-tests: failing Changes in this PR cause breaking changes in gh/gh label Oct 14, 2026
@tay1orjones
tay1orjones marked this pull request as ready for review October 14, 2026 18:53
@tay1orjones
tay1orjones requested a review from a team as a code owner October 14, 2026 18:53
@tay1orjones
tay1orjones requested review from liuliu-dev and a balanced review from Copilot October 14, 2026 18:53
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dcc70c7e-b01a-4abf-b3c3-f5251562a733
@tay1orjones
tay1orjones force-pushed the tay1orjones-contrast-prop-deprecation branch from 67837da to 3164406 Compare October 14, 2026 18:53
@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 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 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. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

Copilot AI 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.

🟢 Approval recommended

The changes consistently document the deprecation without altering runtime behavior, and no blocking issues were identified.

0 open findings

What changed in this PR

Deprecates contrast on TextInput and Textarea while preserving existing styling during consumer migration.

Changes:

  • Adds deprecation annotations and guidance to omit the prop.
  • Adds regression tests for true, false, and omitted values.
  • Includes a minor-release changeset.
File Description
packages/​react/​src/​TextInput/​TextInput.test.tsx Tests existing contrast behavior.
packages/​react/​src/​TextInput/​TextInput.docs.json Documents prop deprecation.
packages/​react/​src/​Textarea/​Textarea.tsx Adds the deprecation annotation.
packages/​react/​src/​Textarea/​Textarea.test.tsx Tests existing contrast behavior.
packages/​react/​src/​Textarea/​Textarea.docs.json Documents prop deprecation.
packages/​react/​src/​internal/​components/​TextInputWrapper.tsx Deprecates the shared, inherited prop.
.changeset/​deprecate-input-contrast.md Records the minor-release deprecation.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@primer-integration

primer-integration Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Integration test results from github/github-ui PR:

Waiting  Changes   Waiting
Passed  CI   Passed
Running  VRT   Running
Waiting  Projects   Waiting

@github-actions github-actions Bot 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 Oct 14, 2026
@tay1orjones tay1orjones added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed 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 labels Oct 14, 2026

@liuliu-dev liuliu-dev 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.

:shipit:

@tay1orjones
tay1orjones added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit 013ab30 Oct 15, 2026
64 checks passed
@tay1orjones
tay1orjones deleted the tay1orjones-contrast-prop-deprecation branch October 15, 2026 15:26
@primer primer Bot mentioned this pull request Oct 15, 2026

This branch was successfully deployed

1 active and 1 inactive deployments
storybook-preview-8525 — 3164406a Deployed Oct 14, 2026 by github-actions[bot]
github-pages — 3164406a Deployed Oct 14, 2026 by tay1orjones via deploy-preview #33699
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants