Repository navigation
feat(apollo-wind): give read-only Input a distinct visual state - #1360
andreea-ene wants to merge 2 commits into
Conversation
|
Apollo Coded App preview deployments finished with failures.
|
There was a problem hiding this comment.
🟡 Changes recommended
Inherited disabled state is not excluded from the new read-only styling.
1 open finding
What changed in this PR
Adds a distinct visual treatment for standalone read-only inputs.
Changes:
- Adds theme-aware read-only styling.
- Adds state, exclusion, and accessibility tests.
- Makes the inline-validation story editable.
| File | Description |
|---|---|
input.tsx |
Applies read-only visual classes. |
input.test.tsx |
Tests read-only behavior and accessibility. |
input.stories.tsx |
Updates validation and read-only examples. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Dependency License Review
License distribution
Excluded packages
|
460a4d3 to
dcf8a83
Compare
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
dcf8a83 to
ad9cd3f
Compare
Storybook visual diffBaseline is the deployed main Storybook, so changes merged to main after this branch was last updated can also appear here. Logs Updated (PT): Oct 20, 2026, 02:55:55 AM |
ad9cd3f to
7fc2a16
Compare
156924a to
b900004
Compare
b900004 to
e567932
Compare
5399871 to
af282b4
Compare
A read-only Input looked identical to an editable one apart from the cursor. It now sits on a muted fill instead of a border (bg-muted in light and dark, surface-raised in the Future themes, a step below the page), while the value keeps full contrast and the standard focus ring. Invalid read-only inputs keep the error border and ring. The style keys off the readOnly prop rather than :read-only, which also matches file inputs, and skips inputs that are effectively disabled (including through a disabled InputGroup) or inside an InputGroup, so QuickFormField is unchanged. The inline validation story no longer sets readOnly on an input that asks the user to edit it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In Light, --muted aliases --surface-overlay, the ghost variant's editable fill, so read-only ghost inputs looked unchanged. Ghost now steps down to surface-raised in every theme, and a story shows the combination. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5087ef0 to
2dbe115
Compare

A read-only
Inputlooked the same as an editable one: the only difference was the cursor on hover. Sighted users had no way to tell a field was read-only until they tried to type. This gives it its own visual state.Context: Slack thread
What's different
Design decisions
A muted fill instead of a border. Read-only sits on
bg-mutedin Light and Dark, and onsurface-raisedin the Future themes, one step below the page and quieter than the editablesurface-overlayfill. The value keeps full contrast and the field keeps the standard focus ring, because it is information the user is meant to read and it stays reachable by keyboard. That is what separates read-only from disabled, which dims the text and is skipped by Tab. Invalid read-only inputs keep the error border (Light, Dark) and error ring (Future). Ghost inputs already fill withsurface-overlay, whichmutedaliases in Light, so a read-only ghost steps down tosurface-raisedin every theme instead.Keyed off the
readOnlyprop, not:read-only. The:read-onlypseudo-class also matches file, color and range inputs, which do not takereadonlyat all.Scoped to standalone inputs. The style does not apply when the input is effectively disabled, by its own
disabledor by a disabledInputGrouparound it (it keeps the disabled look), or when it is the control inside anInputGroup, where the group draws the box.QuickFormField's locked fields render throughInputGroupInput, so they are unchanged.Inline validation story. It set
readOnlyon an input whose error asks the user to enter a unique name, only to silence React's controlled-input warning. It now usesdefaultValue, so the example stays editable.Testing
surface-raisedfill, the standard focus ring, the disabled andInputGroupexclusions, and an axe check.🤖 Generated with Claude Code