Skip to content

Add infoTooltip prop to FieldContainer and Field - #6262

Draft
VPS-thodax wants to merge 4 commits into
mainfrom
claude/serene-galileo-aw8507
Draft

Add infoTooltip prop to FieldContainer and Field#6262
VPS-thodax wants to merge 4 commits into
mainfrom
claude/serene-galileo-aw8507

Conversation

@VPS-thodax

@VPS-thodax VPS-thodax commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Motivation

Form fields sometimes need a short explanation beyond their label (e.g. what a value is used for, or a formatting requirement), but Field/FieldContainer have no way to show one. FormSection already solves this for section headlines with an infoTooltip prop, so the same need exists one level down, at the individual field.

Solution

FieldContainer gets an infoTooltip prop that renders an info icon with a Tooltip next to the field's label, following the same API shape as FormSection's existing infoTooltip prop (a string, a ReactNode, or { title, description }). Field forwards the prop to FieldContainer, so every Field-based component (TextField, SelectField, …) gets it for free. The icon is overridable via iconMapping.infoTooltip, consistent with how SectionHeadline exposes its tooltip icon.

Icon size (16px) and spacing (4px gap) are matched to the design system's Label component (screenshot below), which places the info icon inline right after the label/asterisk with a 4px gap — the same 4px already themed on MuiFormLabel's asterisk — and the label's own 16px font-size.

Screenshots/screencasts

Default Tooltip open

Live in Storybook:

Further information

Editors and developers repeatedly asked for a way to add explanatory
text to form fields beyond the label. FormSection already supports an
infoTooltip prop with an established pattern (Info icon + Tooltip), so
FieldContainer now follows the same convention, and Field forwards it
so every Field-based component (TextField, SelectField, ...) gets it
for free.
@VPS-thodax VPS-thodax self-assigned this Aug 29, 2026
@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

claude added 3 commits August 29, 2026 22:05
The Label component in the Figma design system (COMET DXP Library,
Input page) places the info icon inline with a 4px gap and a fixed
16px size, matching the label text's own 16px font-size and the
existing 4px asterisk margin already themed on MuiFormLabel. Adjust
FieldContainer's info tooltip icon accordingly instead of reusing
FormSection's 10px/12px values, which were sized for a larger headline.

Also add PR screenshots for COM-1646 for reviewers to compare against
the Figma reference without needing to run Storybook locally.
Adds the Label component screenshot from the COMET DXP Library (Input
page) for reviewers to compare the info tooltip's spacing and icon
size against the design directly in the PR.
…xport

The previous export was cropped exactly to the design file's own frame
bounds, which has no left/right padding around the label, making it
look clipped when embedded in the PR. Re-exported at 3x scale and
added white padding around it so the content reads clearly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants