Repository navigation
refactor: Always render the Input field wrapper - #5126
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new field styles override grouped-control corner rules, breaking joined Input and Autosuggest borders.
1 open finding
What changed in this PR
Refactors Input so its field wrapper consistently owns borders, state styling, and sizing.
Changes:
- Always renders the Input field wrapper.
- Updates Autosuggest sizing and outside-click handling.
- Expands tests for field styling and interaction states.
| File | Description |
|---|---|
src/input/internal.tsx |
Always renders the field wrapper. |
src/input/styles.scss |
Moves visual states onto the wrapper. |
src/internal/components/autosuggest-input/index.tsx |
Observes and tracks the input container. |
src/input/__tests__/adornments.test.tsx |
Tests wrapper behavior and styling. |
src/select/__tests__/filter.test.tsx |
Updates the border-radius assertion. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5126 +/- ##
==========================================
- Coverage 97.72% 97.72% -0.01%
==========================================
Files 995 995
Lines 32138 32129 -9
Branches 11861 11851 -10
==========================================
- Hits 31408 31399 -9
Misses 684 684
Partials 46 46 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bec6515 to
7c0f19f
Compare
7c0f19f to
099e036
Compare
099e036 to
d66035c
Compare
d66035c to
d1c0434
Compare
d1c0434 to
794b006
Compare
794b006 to
b2870c4
Compare
b2870c4 to
880690c
Compare
|
/override-visual-regression Expected: the four Input fixes listed in the description (focus states readonly/native-invalid/suffix/prefix entries, style-permutations #21); |


Description
Input now always renders a wrapper (
div.input-field) around the native<input>. The wrapper paints the field (border, background, shadow, all states); the native input is borderless and only owns text styles.Before, the native input painted the field on its own, and a separate container took over when prefix/suffix was set, so every state block existed twice in
styles.scss. Now there is one set of surface rules on the field and one set of text rules on the input. CSS is ~4 KB smaller.Public API and test-utils are unchanged. Two things to know:
Rendering matches main except four fixes that fall out of the change:
type=email/urlwith an invalid value shows its focus ring (.input:invalid { box-shadow: none }, meant for Firefox's glow, removed it too).styleprop with prefix/suffix behaves like a plain Input.How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.