Skip to content

fix(apollo-wind): QuickFormField expression mode for selects, and a disabled prop - #1338

Open
BenGSchulz wants to merge 1 commit into
mainfrom
fix/quick-form-field-expressions-disabled
Open

BenGSchulz wants to merge 1 commit into
mainfrom
fix/quick-form-field-expressions-disabled

Conversation

@BenGSchulz

@BenGSchulz BenGSchulz commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two gaps in QuickFormField found while wiring up HITL quick forms.

  • Single-select and multi-select support expression mode. Every type now does, so the separate non-expression render path is gone.
    • Removed: the second InputGroup branch, the expression-to-literal coercion, and the checks that hid the mode menu for selects.
    • In expression mode a select shows the built-in monospace input, or the consumer's renderModeControl / renderExpressionEditor.
  • locked no longer blocks editing. It marks the value read-only for the person filling in the form. The author still edits it, so the lock is configuration, not a control state.
    • Removed: the plain-text display that replaced locked controls (and getLockedDisplayValue).
    • "Clear value" and Insert variable stay available while locked.
  • New disabled prop disables every built-in control:
    • the value control, the lock and the mode/actions menu
    • the header's type picker, Required switch, Insert variable and AI assist
    • headerActions are the consumer's to disable.
  • Custom controls get disabled too. renderModeControl and renderExpressionEditor receive it via a new exported QuickFormFieldControlProps type, which replaces two copies of the same inline type.
  • AI-assist hint now says "expression" when the field is in expression mode, rather than whenever the type supports one.
  • Deprecated, kept for compatibility: FIELD_TYPE_META.supportsExpression (now always true) and the trueLabel / falseLabel strings (no longer rendered).

Decisions worth a look

  • Behaviour change for locked. A consumer relying on locked to block edits now needs disabled. Shipped as fix because the only consumers we know of are HITL (which asked for this) and in-repo stories.
  • Lock copy unchanged. "Read-only" / "Editable" still describes the value for the person filling in the form.
  • Values a select can't show. A single-select value missing from options, or a multi-select value that isn't valid JSON, used to show as raw text while locked. In literal mode it now shows an empty select. Expression mode shows it.

Demo

Tested as dev package in hitl-schema to confirm that single-select/multi-select fields can render the expression editor and that fields are still editable while locked.

Before After
hitl-before.mov
hitl-after.mov

Test plan

  • apollo-wind: 2,602 tests pass, typecheck clean, biome clean on changed files
  • Rewrote the tests that asserted locked-means-read-only to cover disabled instead
  • New tests: select types in expression mode, locked fields staying editable, disabled covering every built-in control
  • Storybook: the new Disabled story reports every control disabled; a locked single-select in expression mode accepts typing

🤖 Generated with Claude Code

…isabled prop

Single-select and multi-select now support expression mode like every
other type, so the separate non-expression render path and the
expression-to-literal coercion are removed.

`locked` is now configuration only: it drives the lock toggle but no
longer makes the value read-only or swaps the control for plain text.
A new `disabled` prop disables the value control, lock, mode menu, and
header controls instead. Custom mode controls receive `disabled` via the
new exported QuickFormFieldControlProps type.

FIELD_TYPE_META.supportsExpression (now always true) and the
trueLabel/falseLabel strings are deprecated. The AI-assist output hint
now follows the current mode rather than the type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 12, 2026 22:13

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Apollo Coded App preview deployments are ready.

Project Status Preview Updated (PT)
apollo-design Ready Preview · Logs Oct 12, 2026, 03:20:48 PM
apollo-docs Ready Preview · Logs Oct 12, 2026, 03:20:48 PM
apollo-landing Ready Preview · Logs Oct 12, 2026, 03:20:48 PM
apollo-vertex Ready Preview · Logs Oct 12, 2026, 03:20:48 PM

@github-actions

Copy link
Copy Markdown
Contributor

Dependency License Review

  • ✅ 1951 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1721
ISC 88
Apache-2.0 56
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.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

@BenGSchulz
BenGSchulz added this pull request to stack #1340 October 12, 2026 22:16
@github-actions

Copy link
Copy Markdown
Contributor

Storybook visual diff

⚠️ Visual changes detected: 8 changed, 2 added (of 126 compared, 116 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 12, 2026, 03:28:38 PM

@github-actions

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.2% — 7.98 MB 31.42 MB ±0
@uipath/apollo-ui-icons — — 2.86 MB 6.97 MB ±0
@uipath/apollo-wind 77.4% 80.8% (21/26) 729.2 KB 4.26 MB −891 B
@uipath/ap-chat 85.8% — 40.36 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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants