Repository navigation
Deprecate contrast for TextInput and Textarea - #8525
Conversation
🦋 Changeset detectedLatest commit: 3164406 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
contrast for TextInput and Textarea
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dcc70c7e-b01a-4abf-b3c3-f5251562a733
67837da to
3164406
Compare
|
There was a problem hiding this comment.
🟢 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.
|
Integration test results from github/github-ui PR: |
Refs github/primer#5545 and #4355.
contrastcan 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
contraston TextInput and Textarea, including inherited input props.Removed
Rollout strategy
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
contraston TextInput and Textarea; you'll see guidance to omit it. Existingcontrast={true}inputs should keep their background and remain editable. Check an inherited surface such as Autocomplete.Input as well.