Skip to content

fix: vertically align helper-text error icons in inputs - #880

Open
adrienzheng-cb wants to merge 4 commits into
masterfrom
adrien/cds-2622-helper-text-icon-alignment
Open

fix: vertically align helper-text error icons in inputs#880
adrienzheng-cb wants to merge 4 commits into
masterfrom
adrien/cds-2622-helper-text-icon-alignment

Conversation

@adrienzheng-cb

Copy link
Copy Markdown
Contributor

What changed? Why?

Fixes CDS-2622. The error icon in HelperText (used by TextInput, Select, and other inputs) sat off the text baseline on both web and mobile.

Root cause (required for bugfixes)

  • Web: The icon wrapper was display: inline-block, so it inherited label2 line-height (20px) around a 12px icon and baseline-aligned that taller box with the text.
  • Mobile: The nested icon Text used a fixed height/width of 12px while still inheriting label2 line-height (16px), which clipped and shifted the glyph.

The web wrapper is now inline-flex with vertical-align: middle. Mobile sizes the glyph with fontSize/lineHeight and tokenized end padding instead of a clipped box.

This covers every input that renders HelperText, including TextInput, Select, and alpha Select/Combobox.

UI changes

iOS Old iOS New
pending visreg pending visreg
Android Old Android New
pending visreg pending visreg
Web Old Web New
pending visreg pending visreg

Figma spec (negative helper text): icon optically centered with “Error message”.

Testing

How has it been tested?

  • Unit tests
  • Interaction tests
  • Pseudo State tests
  • Manual - Web
  • Manual - Android (Emulator / Device)
  • Manual - iOS (Emulator / Device)

Testing instructions

  1. Storybook → Components/Inputs/HelperText → MessageAreaColor (fgNegative) and CustomColor.
  2. Storybook → Components/Inputs/TextInput → Variants (negative).
  3. Repeat on mobile Storybook/Expo for TextInput and Select negative helper text.
  4. Confirm the info icon sits on the same visual midline as the helper text, including wrapped copy.

Illustrations/Icons Checklist

N/A

Change management

type=routine
risk=low
impact=sev5

automerge=false

Made with Cursor

@cb-heimdall

cb-heimdall commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 1
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1
CODEOWNERS 🟡 See below

🟡 CODEOWNERS

Code Owner Status Calculation
ui-systems-eng-team 🟡 0/1
Denominator calculation
Additional CODEOWNERS Requirement
Show calculation
Sum 0
0
From CODEOWNERS 1
Sum 1

@linear

linear Bot commented Sep 10, 2026

Copy link
Copy Markdown

CDS-2622

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

cb-ekuersch
cb-ekuersch previously approved these changes Sep 11, 2026
adrienzheng-cb and others added 3 commits September 11, 2026 16:42
The negative-variant icon sat off the text baseline because web used an
inline-block wrapper with inherited line-height, and mobile clipped the
glyph in a fixed-size box. Align it with the helper text on both platforms.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cb-ekuersch
cb-ekuersch force-pushed the adrien/cds-2622-helper-text-icon-alignment branch from f43613d to db13cf0 Compare September 11, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants