Skip to content

fix(apollo-react): restore label error colour, free field-adornment icon buttons from fixed boxes - #1024

Open
fikewa-olatunji wants to merge 2 commits into
mainfrom
fix/apollo-react-restore-mui5-baseline
Open

fix(apollo-react): restore label error colour, free field-adornment icon buttons from fixed boxes#1024
fikewa-olatunji wants to merge 2 commits into
mainfrom
fix/apollo-react-restore-mui5-baseline

Conversation

@fikewa-olatunji

@fikewa-olatunji fikewa-olatunji commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Why

apollo-design-system#5354 makes these themes the single source of truth for apollo-mui5, so every place apollo-react's overrides drift from what Portal ships today becomes a visual change for Portal. Design review of that drift (storybook-diff of the bumped apollo-mui5 against its master baseline) identified two things to fix here; the rest of the reviewed drift was confirmed as intended apollo-react behaviour and stays documented in #5354.

What

Two commits:

  1. Labels (MuiFormLabel, MuiInputLabel): error-state input labels and the required asterisk are colorErrorText again; form labels return to regular foreground. apollo-react had kept error labels de-emphasized, so invalid fields gave no colour signal on the label. MuiInputLabel renders through MuiFormLabel, so the restored .MuiFormLabel-asterisk.Mui-error rule covers input-label asterisks too.
  2. Icon buttons (MuiIconButton): Autocomplete popup/clear indicators and the datepicker calendar button live inside a field's adornments; the fixed per-size box misaligned the combobox chevron and shifted the field's right edge. Adornment icon buttons keep MUI's natural padding-driven geometry; the fixed boxes stay for standalone icon buttons.

Reviewed and kept as-is (intentional divergence from apollo-mui5)

Earlier revisions of this PR also moved links, text fields, and a datepicker token to the apollo-mui5 baseline. Review resolved all three the other way:

  • Links: hover-only underline is intentional apollo-react design (matches the ApLink web component); Portal picks it up via #5354 as a documented change.
  • Text fields: the filled background, 3px radius, and 2px colorErrorText error border stay; the small drift vs Portal is accepted and documented in #5354.
  • Datepicker selected day: keeps colorForegroundOnAccent. It is identical to the baseline's colorForegroundInverse in all four classic themes and is the correct, accessible token on the accent background in future-light, where the two diverge.

Verification

Two sbdiff runs on this exact branch state:

apollo-mui5 vs its master baseline (local apollo-mui5 build carrying these overrides, all 519 comparable stories, four themes):

Stories Result
controls-combobox--* (12) pass, pixel-identical (was changed)
controls-date-picker--* (8) pass, pixel-identical (was changed; the label fix plus the adornment fix fully account for it)
link (3), text-field (12), alert, checkbox, radio, stepper, tab, tooltip, icon-button sizing changed; intentional, documented drift for #5354 sign-off

apollo-react's own storybook vs deployed main: 4 changed of 196. Two are text-field--variants at 0.047% showing exactly the intended red error label and asterisk; two are the known flaky sankey story. Chat, links, and all other stories: no change.

tsc --noEmit and biome are clean on the touched files.

Follow-up

Once this releases, apollo-design-system#5354 bumps apollo-react; its diff against the Portal baseline should then show only the documented, intentionally-kept drift.

… labels

apollo-react kept error-state labels de-emphasized and forced the
asterisk to inherit, so invalid fields gave no colour signal on the
label. apollo-mui5 (what Portal ships) colours the input label and the
required asterisk with colorErrorText, and uses regular foreground for
form labels. Restore that behaviour.
Copilot AI review requested due to automatic review settings August 6, 2026 20:51
Comment thread packages/apollo-react/src/material/theme/overrides/MuiDatepicker.ts Outdated
Comment thread packages/apollo-react/src/material/theme/overrides/MuiLink.ts
Comment thread packages/apollo-react/src/material/theme/overrides/MuiTextField.ts
Comment thread packages/apollo-react/src/material/theme/overrides/MuiTextField.ts
Comment thread packages/apollo-react/src/material/theme/overrides/MuiTextField.ts

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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates Apollo React’s MUI theme overrides to align form controls and interactive elements with semantic palette tokens and improve adornment icon button sizing.

Changes:

  • Adjusts TextField, InputLabel, and FormLabel error/read-only styling behavior.
  • Updates Link focus-visible styling to use semantic focus indicator color.
  • Ensures IconButtons inside input adornments keep natural sizing to avoid field misalignment.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/apollo-react/src/material/theme/overrides/MuiTextField.ts Simplifies TextField root overrides and changes focused read-only outline width
packages/apollo-react/src/material/theme/overrides/MuiLink.ts Reworks focus-visible and active styling for links
packages/apollo-react/src/material/theme/overrides/MuiInputLabel.ts Changes error label color and removes asterisk slot overrides
packages/apollo-react/src/material/theme/overrides/MuiIconButton.ts Exempts adornment icon buttons from fixed size box to prevent misalignment
packages/apollo-react/src/material/theme/overrides/MuiFormLabel.ts Changes base label color and reworks error asterisk color styling
packages/apollo-react/src/material/theme/overrides/MuiDatepicker.ts Updates selected-day text token to semantic inverse foreground

Comment thread packages/apollo-react/src/material/theme/overrides/MuiLink.ts Outdated
Comment thread packages/apollo-react/src/material/theme/overrides/MuiInputLabel.ts
Comment thread packages/apollo-react/src/material/theme/overrides/MuiFormLabel.ts
Comment thread packages/apollo-react/src/material/theme/overrides/MuiTextField.ts
Comment thread packages/apollo-react/src/material/theme/overrides/MuiTextField.ts Outdated
Autocomplete popup/clear indicators and the datepicker calendar button
are IconButtons living inside a field's adornments, so the fixed
per-size box misaligns the chevron and shifts the field's right edge.
Let them keep MUI's natural padding-driven geometry; the rule sits
after the size blocks so it wins at equal specificity.
Copilot AI review requested due to automatic review settings August 7, 2026 01:44
@fikewa-olatunji
fikewa-olatunji force-pushed the fix/apollo-react-restore-mui5-baseline branch from 06abcfa to 4b1336a Compare August 7, 2026 01:44
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Apollo Coded App preview deployments are ready.

Project Status Preview Updated (PT)
apollo-design Ready Preview · Logs Aug 06, 2026, 06:56:23 PM
apollo-docs Ready Preview · Logs Aug 06, 2026, 06:56:23 PM
apollo-landing Ready Preview · Logs Aug 06, 2026, 06:56:23 PM
apollo-vertex Ready Preview · Logs Aug 06, 2026, 06:56:23 PM

@github-actions github-actions Bot added the size:S 10-29 changed lines. label Aug 7, 2026
@fikewa-olatunji fikewa-olatunji changed the title fix(apollo-react): restore apollo-mui5 baseline for labels, links, text fields, datepicker, and field-adornment icon buttons fix(apollo-react): restore label error colour, free field-adornment icon buttons from fixed boxes Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1950 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1720
ISC 89
Apache-2.0 55
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.2 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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@github-actions

github-actions Bot commented Aug 7, 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 43.84 MB 57.45 MB ±0
@uipath/apollo-react 39.1% — (12 untracked) 7.51 MB 28.87 MB +2.7 KB
@uipath/apollo-wind 420.5 KB 2.73 MB −15 B
@uipath/ap-chat 85.8% 43.46 MB 56.05 MB +12.0 KB

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

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Storybook visual diff

⚠️ Visual changes detected: 3 changed (of 196 compared, 193 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): Aug 06, 2026, 07:03:26 PM

root: {
color: palette.semantic.colorForegroundDeEmp,
'&.Mui-error': { color: palette.semantic.colorForegroundDeEmp },
color: palette.semantic.colorForeground,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we still changed this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it was intentional: it's part of restoring the apollo-mui5 baseline for the label which the sbdiff shows now match Portal exactly.

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

Labels

pkg:apollo-react size:S 10-29 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants