Skip to content

fix: fill the bordered container for read-only filled fields#1061

Draft
lmjabreu wants to merge 1 commit into
feat/readonly-field-subdued-borderfrom
fix/readonly-filled-bordered-fill
Draft

fix: fill the bordered container for read-only filled fields#1061
lmjabreu wants to merge 1 commit into
feat/readonly-field-subdued-borderfrom
fix/readonly-filled-bordered-fill

Conversation

@lmjabreu

@lmjabreu lmjabreu commented Jun 7, 2026

Copy link
Copy Markdown

No linked issue. Follow-up to #1060, stacked on feat/readonly-field-subdued-border (base of this PR). Review #1059 and #1060 first; this targets #1060's branch and will retarget main once those merge.

Short description

In the bordered variant, the container owns the border and padding while the field sits inside it. A read-only filled field put its grey on the inner field, so the fill showed up as an inset band that did not reach the border:

Before: grey band floating inside a white padded box.
After: the whole bordered box is filled, so a read-only field reads as one cohesive grey card.

The fill now lives on the container for the bordered variant. The default variant is unchanged, since its field already fills edge to edge.

Implementation notes

  • BaseField gains an internal readOnlyFilled signal (not part of the public field props). The field components pass readOnly && readOnlyVariant === 'filled'.
  • The container fill is scoped to .container.bordered.readOnlyFilled, so the default variant's container is never filled (only its inner field is, as before).
  • plain bordered read-only fields are unaffected: subdued border, no fill.

Scope

Separate from #1060 on purpose. #1060 refines the read-only border and hover for every field; this is a narrow appearance fix for one variant combination (bordered + filled + read-only).

PR Checklist

  • Added tests for bugs / new features
  • Updated docs (storybooks, readme)
  • Reviewed and approved Chromatic visual regression tests in CI

In the bordered variant the container owns the border and padding, so a
filled read-only field's grey sat on the inner field as an inset band
that didn't reach the border. Move the fill to the container for the
bordered variant so it reads as one cohesive read-only box. The default
variant is unchanged (its field already fills edge to edge).

BaseField gains an internal readOnlyFilled signal for this; the field
components pass it when readOnly and readOnlyVariant is 'filled'.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant