Skip to content

feat(apollo-wind): give read-only Input a distinct visual state - #1360

Open
andreea-ene wants to merge 2 commits into
mainfrom
feat/read-only-state
Open

andreea-ene wants to merge 2 commits into
mainfrom
feat/read-only-state

Conversation

@andreea-ene

@andreea-ene andreea-ene commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

A read-only Input looked 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

pr-1360-before-after

Design decisions

A muted fill instead of a border. Read-only sits on bg-muted in Light and Dark, and on surface-raised in the Future themes, one step below the page and quieter than the editable surface-overlay fill. 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 with surface-overlay, which muted aliases in Light, so a read-only ghost steps down to surface-raised in every theme instead.

Keyed off the readOnly prop, not :read-only. The :read-only pseudo-class also matches file, color and range inputs, which do not take readonly at all.

Scoped to standalone inputs. The style does not apply when the input is effectively disabled, by its own disabled or by a disabled InputGroup around it (it keeps the disabled look), or when it is the control inside an InputGroup, where the group draws the box. QuickFormField's locked fields render through InputGroupInput, so they are unchanged.

Inline validation story. It set readOnly on an input whose error asks the user to enter a unique name, only to silence React's controlled-input warning. It now uses defaultValue, so the example stays editable.

Testing

  • Unit tests cover the Light/Dark and Future fills, the error border and ring, the ghost variant's surface-raised fill, the standard focus ring, the disabled and InputGroup exclusions, and an axe check.
  • Input, InputGroup and QuickFormField suites pass (280 tests), and the type check is clean.
  • Checked visually in Light, Dark, Future Light and Future Dark, at rest and with an error.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 13, 2026 12:59
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Apollo Coded App preview deployments finished with failures.

Project Status Preview Updated (PT)
apollo-design Ready Preview · Logs Oct 15, 2026, 09:04:03 AM
apollo-docs Ready Preview · Logs Oct 15, 2026, 09:04:03 AM
apollo-landing Failed Logs Oct 15, 2026, 09:04:03 AM
apollo-vertex Ready Preview · Logs Oct 15, 2026, 09:04:03 AM

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread packages/apollo-wind/src/components/ui/input.tsx Outdated
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Dependency License Review

  • ✅ 1957 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1721
ISC 91
Apache-2.0 57
BSD-3-Clause 28
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
CC0-1.0 4
MIT-0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.3.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Future-themed read-only inputs lose their error border when invalid.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Comment thread packages/apollo-wind/src/components/ui/input.tsx Outdated
Copilot AI balanced review requested due to automatic review settings October 13, 2026 13:05
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core — — 42.02 MB 50.17 MB ±0
@uipath/apollo-react 51.7% — 8.01 MB 31.60 MB ±0
@uipath/apollo-ui-icons — — 2.86 MB 6.97 MB ±0
@uipath/apollo-vertex — — — — —
@uipath/apollo-wind 79.1% 100.0% (1/1) 787.6 KB 4.57 MB +110 B
@uipath/ap-chat 85.8% — 40.37 MB 45.58 MB ±0

"Coverage" is each package's own coverage.include scope (e.g. apollo-core instruments only scripts/). "Packed"/"Unpacked" come from npm pack --dry-run and only cover built packages — "—" means not measured this run (package not affected / not built). "vs main" is the packed (gzipped) delta against the last successful main build (the package-sizes artifact from the Release workflow); "—" there means no main baseline was available this run. The baseline is main's latest build, not this PR's exact merge-base, so it includes any drift since the branch diverged. Packages with no vitest config are omitted.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation is narrowly scoped, consistent with existing class-merging behavior, and comprehensively tested.

1 open finding

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 13, 2026 13:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The scoped styling is correctly prioritized and comprehensively tested across relevant states.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Storybook visual diff

⚠️ Visual changes detected: 11 changed, 2 added (of 528 compared, 515 unchanged). View report

Baseline 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

Copilot AI balanced review requested due to automatic review settings October 13, 2026 14:40
@andreea-ene
andreea-ene force-pushed the feat/read-only-state branch 2 times, most recently from ad9cd3f to 7fc2a16 Compare October 13, 2026 14:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation is correctly scoped, preserves existing state precedence, and includes comprehensive tests.

0 open findings

🧠 Review effort: Balanced

@andreea-ene
andreea-ene marked this pull request as draft October 13, 2026 14:46
Copilot AI balanced review requested due to automatic review settings October 14, 2026 09:39
@github-actions
github-actions Bot temporarily deployed to preview/apollo-landing October 19, 2026 12:51 Destroyed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused styling change has regression coverage and no identified blocking issues.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 19, 2026 16:46
@github-actions
github-actions Bot temporarily deployed to preview/apollo-vertex October 19, 2026 16:47 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-design October 19, 2026 16:47 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-docs October 19, 2026 16:47 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-landing October 19, 2026 16:47 Destroyed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Light-theme ghost inputs still look identical when editable and read-only.

1 open issue

Review effort: Balanced

Comment thread packages/apollo-wind/src/components/ui/input.tsx Outdated
Copilot AI balanced review requested due to automatic review settings October 20, 2026 09:24
@github-actions
github-actions Bot temporarily deployed to preview/apollo-vertex October 20, 2026 09:24 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-design October 20, 2026 09:25 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-landing October 20, 2026 09:25 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-docs October 20, 2026 09:25 Destroyed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The localized changes have focused test coverage and no unresolved findings; tests were not executed during this review.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@github-actions github-actions Bot added size:L 100-499 changed lines. and removed size:M 30-99 changed lines. labels Oct 20, 2026
andreea-ene and others added 2 commits October 20, 2026 12:35
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>
Copilot AI balanced review requested due to automatic review settings October 20, 2026 09:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused styling change has targeted regression coverage and no unresolved blocking findings.

No open issues 🎉

Review effort: Balanced

This branch was successfully deployed

4 active deployments
preview/apollo-landing — 2dbe1151 Deployed Oct 20, 2026 by github-actions[bot]
preview/apollo-design — 2dbe1151 Deployed Oct 20, 2026 by github-actions[bot]
preview/apollo-vertex — 2dbe1151 Deployed Oct 20, 2026 by github-actions[bot]
preview/apollo-docs — 2dbe1151 Deployed Oct 20, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:apollo-wind size:L 100-499 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants