Repository navigation
fix(core): Field labels draw in a bolder face than their description - #12428
josephfarina wants to merge 4 commits into
Conversation
A medium (500) label resolves to the regular face in the common system fonts, which have no medium face, so the label drew at the same weight as its description. Semibold resolves up to a bold face with every font stack.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
|
Owner decision (engineering owner, covering this pull request): a field label draws in a bolder face than its description, through the label weight token, so a form's labels read as labels in every official theme. The label weight stays a theme token, so a theme that sets its own label weight keeps it. The Field and FieldLabel records set no local look beyond shared tokens, so no record changes. |
|
/approve-spec 14c2f5e |
There was a problem hiding this comment.
Approval waits on an owner decision about label weight, and the release note needs one fix either way.
No current record settles whether every Field, standalone CheckboxInput and Switch label should move from medium to semibold on fonts that already have a medium face (the Apple and Android system fonts and the first-party theme fonts), where this change makes labels one step heavier instead of restoring a lost step. An engineering owner records that decision by commenting /approve-spec 14c2f5e0e542243f1c6024f84bd54606c0679576 on this pull request, which the author may do as an engineering owner.
Blocking
.changeset/field-label-semibold.md:5says the common system fonts have no medium face and so labels drew in the regular face, but the Apple and Android system fonts and the first-party theme fonts have one, so reword the note to name the fonts it fixes, say that labels on fonts with a medium face become one step heavier, and mention that CheckboxInput and Switch labels change too.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim, changeset: labels use the semibold weight. Verified (
FieldLabel.tsx:73; computed weight 600 in the captures). - Claim, changeset: the common system fonts have no medium face, so a medium label drew in the regular face. False as written: true for fonts with no 500 face (reproduced with DejaVu Sans), but the Apple and Android system fonts in the default stack and every first-party theme font have one, and with such a font the base label already renders medium.
- Claim, changeset: a semibold label draws in a bolder face with every font stack. Verified (bold face with DejaVu Sans, the 600 instance with Noto Sans).
- Claim, description: Arial, Helvetica, Liberation Sans and Segoe UI have no 500 face, and CSS falls back to the regular face. Consistent with CSS font matching and reproduced with DejaVu Sans, which has the same faces; those four fonts were not available to render.
- Claim, description: 600 resolves up to a heavier face. Verified in the captures.
- Claim, description: the FieldLabel and Field records say no design record governs component-local visual tuning. Verified in both records' Design relationships.
- Claim, description: the change keeps the label's existing intent of being heavier than its description. No current record states that intent; it is the open owner decision.
- Claim, description: no record is edited. Verified from the diff.
- Claim, description: no theme sets a label weight, so every theme moves the same way. Verified at source, but with a theme's own font loaded the move is from medium to semibold, which the description's Liberation Sans evidence does not show.
- Claim, description: with a variable font such as Noto Sans the label moves from the 500 to the 600 instance. Verified.
- Claim, description: description, status, Optional/Required text, disabled colour and hidden labels are unchanged. Verified (their rules keep the normal weight; the disabled rule sets colour and cursor only).
- Claim, description: a theme that styles the label target keeps its own weight. Not exercised; consistent with how targets compose.
- Claim, description: appearance only, with no API, behaviour or layout change. Verified: the built public surface shows no change.
- Claim, description: public text has no internal context. Verified.
- Claim, description: the new test pins the declaration and fails on the old style. Verified (it fails on the base and passes on the head).
- Claim, description: the named test run passes with 929 tests. Verified (929 passed).
- Claim, description: a template sweep over 82 pages found no regressions. Not verified: no evidence is attached, and the description held a placeholder when this review began.
- Claim, description: the stable visual check shows the label stories as changed. Not verified on this head (CI had not run it); the captures here show those stories change.
- File
.changeset/field-label-semibold.md: blocking finding (overbroad claim). - File
packages/core/src/Field/FieldLabel.tsx: the weight waits on an owner decision; non-blocking comment-style suggestion. - File
packages/core/src/Field/FieldLabel.test.tsx: clear.
|
Owner decision update (engineering owner, covering this pull request at its current head): on fonts with no medium face (such as Arial, Helvetica, Liberation Sans and Segoe UI), field labels move from the regular face to the bold face. On fonts that have a medium face (the Apple and Android system fonts and the first-party theme fonts), labels become one step heavier. CheckboxInput and Switch labels change the same way. |
|
/approve-spec 3f06826 |
There was a problem hiding this comment.
Changes requested: one sentence in the release note needs correcting.
The label weight move itself is settled: an engineering owner decided on this pull request that field labels draw heavier than their description in every official theme, including fonts that already have a medium face.
Blocking
.changeset/field-label-semibold.md:5says the label now draws in the bold face of Arial, Helvetica, Liberation Sans and Segoe UI, but Segoe UI has a semibold (600) face, so Windows users get Segoe UI Semibold; please reword it, for example "The label now draws in the next heavier face: semibold in Segoe UI, bold in Arial, Helvetica and Liberation Sans." (this corrects the wording the previous review suggested).
Non-blocking: the description's "the bold face of a static font" has the same Segoe UI slip, and the comment at FieldLabel.tsx:69-72 still joins two facts in its first sentence (inline suggestion).
Claims and files checked
Review mode: incremental; reason: none
- Changed rules since the last review (0): none.
- Claim, changeset: Field labels use the semibold weight. Verified (
FieldLabel.tsx:73; computed weight 600 in the captures). - Claim, changeset: Arial, Helvetica, Liberation Sans and Segoe UI have no medium face, so a medium label drew in their regular face, at its description's weight. Verified for the mechanism (CSS font matching; reproduced with DejaVu Sans, which has the same regular and bold faces); those four fonts were not available to render.
- Claim, changeset: the label now draws in their bold face. False for Segoe UI, which has a semibold face that a 600 label matches; true for Arial, Helvetica and Liberation Sans.
- Claim, changeset: with fonts that have a medium face, such as the Apple and Android system fonts and the first-party theme fonts, labels become one step heavier. Verified (each theme loads its body font at 500 and 600; Noto Sans goes from 500 to 600 in the captures).
- Claim, changeset: CheckboxInput and Switch labels use the same label style and change too. Verified (both render FieldLabel; the CheckboxInput label goes from 500 to 600 in the captures).
- Claim, description: those four fonts have no 500 face, CSS resolves a missing 500 to the regular face, and the label then matches its description. Verified as above.
- Claim, description: a 600 label draws bolder with every font stack, in the bold face of a static font or the 600 instance of a variable font. Bolder with every stack is verified; the bold face is false for Segoe UI, a static font with a semibold face.
- Claim, description: the FieldLabel and Field records leave component-local visual tuning to shared tokens, and no record is edited. Verified.
- Claim, description: the record owner's review settles the tuning. Settled by an engineering owner's decision on this pull request.
- Claim, description: no theme sets a label weight, so every theme moves the same way. Verified (no first-party theme sets a weight on the label parts).
- Claim, description: Liberation Sans moves from regular to bold, and a variable font from its 500 to its 600 instance. Consistent with the captures (DejaVu Sans regular to bold, Noto Sans 500 to 600); Liberation Sans was not available here.
- Claim, description: description, status, Optional and Required text, disabled colour and hidden labels are unchanged, and a theme that styles the label part keeps its weight. Verified at source and in the captures; the theme override was not exercised.
- Claim, description: appearance only, with no API, behaviour or layout change, and no internal context in public text. Verified.
- Claim, description: the new test pins the weight and fails on the old style. Verified (passes on the head, fails on the base).
- Claim, description: the named Field, FormLayout, CheckboxList, RadioList and theming test run passes with 929 tests. Verified on the head (929 passed).
- Claim, description: a template sweep and a look gate across themes and widths found no regressions. Not reproduced.
- Claim, description: the stable visual check shows the label stories as changed. Not verified: that check has not run on this head.
- File
.changeset/field-label-semibold.md: blocking finding (Segoe UI result). - File
packages/core/src/Field/FieldLabel.tsx: weight change owner-decided; non-blocking comment-style suggestion. - File
packages/core/src/Field/FieldLabel.test.tsx: clear.
| // Arial, Helvetica, Liberation Sans, and Segoe UI have no 500 face, and | ||
| // CSS resolves a missing 500 to the regular face. Semibold resolves up to | ||
| // a heavier face, so the label stays heavier than its description with | ||
| // every font. |
There was a problem hiding this comment.
Non-blocking (comment style): the first sentence still carries two facts. One fact per sentence:
// Arial, Helvetica, Liberation Sans and Segoe UI have no 500 face. CSS then
// draws a 500 label in the regular face. A 600 label draws in the next
// heavier face, so the label stays heavier than its description.|
/approve-spec 9445bd0 |
There was a problem hiding this comment.
Changes requested: the new weight test should call the shared StyleX read-back helper instead of carrying its own copy.
The label weight move is settled by an engineering owner's decision on this pull request, and the release note now describes Segoe UI correctly.
Blocking
- Miss:
declarationsOfatpackages/core/src/Field/FieldLabel.test.tsx:22-48re-implementsdeclaredValuefrompackages/core/src/__tests__/stylexDeclarations.ts, so please delete it and assertexpect(declaredValue(label as Element, 'font-weight')).toBe('var(--font-weight-semibold)'), which still fails on the old style (the helper has been in the test since the first revision, and the earlier reviews missed it).
Non-blocking: the comment at FieldLabel.tsx:69-72 still joins two facts in its first sentence (see the open inline suggestion).
Claims and files checked
Review mode: incremental; reason: none
- Changed rules since the last review (0): none.
- Release note: Field labels use the semibold weight. Verified (
FieldLabel.tsx:73; computed weight 600 in the captures). - Release note: Arial, Helvetica, Liberation Sans and Segoe UI have no medium face, so a medium label drew in their regular face, at its description's weight. Verified (CSS font matching; reproduced with DejaVu Sans, which has only regular and bold faces).
- Release note: the label now draws semibold in Segoe UI and bold in Arial, Helvetica and Liberation Sans. Verified (a 600 request takes the 600 face or the next heavier one; DejaVu Sans draws bold in the captures; Segoe UI is not available to render).
- Release note: fonts with a medium face, such as the Apple and Android system fonts and the first-party theme fonts, draw labels one step heavier. Verified (every theme loads its body font at 500 and 600; Noto Sans goes from 500 to 600 in the captures).
- Release note: CheckboxInput and Switch labels change too. Verified (both render FieldLabel; their labels go from 500 to 600 in the captures).
- Description: no knowledge record changes, one style line. Verified.
- Description: local visual tuning is not governed by a design record, and the label uses shared tokens. Verified (FieldLabel and Field records, Design relationships).
- Description: the label is meant to be heavier than its description and the control text. Verified at the base (500 against 400).
- Description: a 600 label draws bolder with every font stack: Segoe UI Semibold, the bold face of Arial, Helvetica and Liberation Sans, or the 600 instance of a variable font. Verified as above.
- Description: the record owner's review settles the tuning. Settled instead by an engineering owner's decision on this pull request.
- Description: no theme sets a label weight, so every theme moves the same way. Verified (no first-party theme sets a weight on the label parts).
- Description: description, status, Optional and Required text, disabled colour and hidden labels are unchanged, and a theme that styles the label part keeps its weight. Verified at source and in the captures; the theme override was not exercised, and the composition order is unchanged.
- Description: appearance only, with no API, behaviour or unrelated layout change, and no internal context in public text. Verified (no API rows; no internal context found).
- Description: the new test pins the weight and fails on the old style. Verified (fails on the base, passes on the head).
- Description: the named Field, FormLayout, CheckboxList, RadioList and theming test run passes with 929 tests. Verified on the head (929 passed).
- Description: before and after pictures with Liberation Sans, and its platform-font readout. Not reproduced (Liberation Sans is not available here); the Noto Sans 500 to 600 part matches the captures.
- Description: the automated look check, the template sweep and the look gate found no regressions. Not reproduced; the captures of the stories checked agree.
- Description: the stable visual check shows the label stories as changed. Not verified: that check had not finished on this head.
- File
.changeset/field-label-semibold.md: clear (the Segoe UI wording is fixed). - File
packages/core/src/Field/FieldLabel.tsx: owner-decided weight change; non-blocking comment-style suggestion. - File
packages/core/src/Field/FieldLabel.test.tsx: blocking (copies the shared StyleX read-back helper).
|
/approve-spec 9c54ee4 |
There was a problem hiding this comment.
Approved pending CI: Lint, the CLI smoke test and the spec owner gate pass on this head, but the CI run stopped because CI was at capacity, so it needs a re-run.
The label weight move is settled by an engineering owner's decision recorded on this pull request at this head, and the weight test now calls the shared StyleX read-back helper, which resolves the earlier blocking finding.
Non-blocking: the comment at FieldLabel.tsx:69-72 still joins two facts in its first sentence (see the open inline suggestion).
Claims and files checked
Review mode: incremental; reason: none
- Changed rules since the last review (0): none.
- Release note: Field labels use the semibold weight. Verified (
FieldLabel.tsx:73; computed weight 600 in the captures). - Release note: Arial, Helvetica, Liberation Sans and Segoe UI have no medium face, so a medium label drew in their regular face, at its description's weight. Verified (CSS font matching; reproduced with DejaVu Sans, which has only regular and bold faces).
- Release note: the label now draws semibold in Segoe UI and bold in Arial, Helvetica and Liberation Sans. Verified by CSS font matching (a 600 request takes the 600 face or the next heavier one); DejaVu Sans draws bold in the captures; Segoe UI is not available to render.
- Release note: fonts with a medium face, such as the Apple and Android system fonts and the first-party theme fonts, draw labels one step heavier. Verified (every theme loads its body font at 500 and 600; the fallback font goes from 500 to 600 in the captures).
- Release note: CheckboxInput and Switch labels change too. Verified (both render FieldLabel; their labels go from 500 to 600 in the captures).
- Description: no knowledge record changes, one style line. Verified.
- Description: local visual tuning is not governed by a design record, and the label uses shared tokens. Verified (FieldLabel and Field records, Design relationships).
- Description: the label is meant to be heavier than its description and the control text. Verified at the base (500 against 400).
- Description: a 600 label draws bolder with every font stack. Verified as above.
- Description: the record owner's review settles the tuning. Settled instead by an engineering owner's decision recorded on this pull request at this head.
- Description: no theme sets a label weight, so every theme moves the same way. Verified (no first-party theme styles the label parts).
- Description: description, status, Optional and Required text, disabled colour and hidden labels are unchanged, and a theme that styles the label part keeps its weight. Verified at source and in the captures; the composition order is unchanged, and a theme override was not exercised.
- Description: appearance only, with no API, behaviour or unrelated layout change, and no internal context in public text. Verified (no API rows; no internal context found).
- Description: the new test pins the weight and fails on the old style. Verified (fails on the base, passes on the head).
- Description: the named Field, FormLayout, CheckboxList, RadioList and theming test run passes with 929 tests. Verified on the head (929 passed).
- Description: before and after pictures with Liberation Sans, and its platform-font readout. Not reproduced (Liberation Sans is not available here); DejaVu Sans shows the same regular-to-bold move.
- Description: the automated look check, the template sweep and the look gate found no regressions. Not reproduced; the captures of the stories checked agree.
- Description: the stable visual check shows the label stories as changed. Not verified: that check has not run on this head.
- File
.changeset/field-label-semibold.md: clear. - File
packages/core/src/Field/FieldLabel.tsx: owner-decided weight change; non-blocking comment-style suggestion. - File
packages/core/src/Field/FieldLabel.test.tsx: clear (calls the shared StyleX read-back helper).
- #12252 docs(cli): agent docs name the prop names that differ from other libraries Author: Joey Farina <[email protected]> - #12154 fix(core): a numeric typography weight builds through an extended base's adaptation rules Author: Joey <[email protected]> - #12092 fix(cli): theme build reads the Core it builds with for variant declarations, and names the build command alone Author: Joey Farina <[email protected]> - #12316 fix(core): a shorthand never follows its own longhand in one style merge Author: josephfarina <[email protected]> - #12357 fix(core): a Table stays the scroll region when a host scrolls every table's parent Author: Joey Farina <[email protected]> - #12349 fix(core): end a mouse drag a sandboxed frame never saw released Author: josephfarina <[email protected]> - #12425 fix(cli): use a stored doc parse only with the zod release that made it Author: Joey <[email protected]> - #12396 fix(AppShell): with the standard width points, a server-rendered shell hides its inline side nav on a phone before its script runs Author: Joey <[email protected]> - #12438 fix(charts): end dots draw whole and a thinned axis keeps its last label Author: Joey Farina <[email protected]> - #12448 fix(cli): upgrade outside a project names the project, not --from Author: Joey Farina <[email protected]> - #12459 fix(templates): the dashboard scorecard fits a phone screen Author: Joey Farina <[email protected]> - #12428 fix(core): Field labels draw in a bolder face than their description Author: Joey Farina <[email protected]> - #12435 fix(theme-matcha): dark menus, popovers and muted fills take the theme's deep gray neutral Author: Joey <[email protected]> - #12432 fix(templates): dashboard chart labels show whole instead of clipped by the chart edge Author: Joey Farina <[email protected]> - #12441 fix(cli): mark icon-set generated calls pure so apps drop unused icons Author: Joey Farina <[email protected]> - #12472 fix(MetadataListItem): a value breaks only a word longer than its line Author: Joey <[email protected]>
|
Landed in #12718. |
Summary: no knowledge record changes. One style line: the FieldLabel label weight goes from medium to semibold, within FieldLabel's current record (local visual tuning is not governed by a design record).
Look check: in all seven themes, the automated look check (every control state, light and dark, desktop and phone, with a visual judge) finds nothing new. It removes three "labels no bolder than their descriptions" findings per theme. Its other findings are the same on the build without this change. Before/after pictures, a pinning test and a template sweep are below.
User impact
In forms built with
Field(text inputs, selectors, checkbox and radio lists), the label is meant to be one step heavier than the description and the control text. With some widely used fonts it is not: Arial, Helvetica, Liberation Sans and Segoe UI have no 500 (medium) face, and CSS font matching resolves a missing 500 to the regular face. The label then draws at the same weight as its description and as the body text, and a form reads flat next to a hand-written page with bold labels.This PR moves the label to
--font-weight-semibold. CSS resolves 600 up to the next heavier face, so the label draws bolder with every font stack: Segoe UI Semibold, the bold face of Arial, Helvetica and Liberation Sans, or the 600 instance of a variable font. With fonts that have a medium face (the Apple and Android system fonts, the first-party theme fonts), labels become one step heavier. CheckboxInput and Switch use the same label, so their labels change too.Visual authority
DDrow reused or amended.Design decisionstable by a team design owner.docs/design/.component:FieldLabelandcomponent:Fieldsay no design record governs component-local visual tuning, and the label uses shared semantic type tokens. This change stays inside that: one shared weight token for another. It keeps the label's existing intent (heavier than its description) and makes that intent render with fonts that have no medium face. No record is edited. The FieldLabel record owner's review settles the tuning.Before and after
Chromium,
FormLayoutmixed-controls story, Liberation Sans as the system sans-serif font. Each image: phone (390px) light and dark, desktop (1280px, left half) light and dark; before on the left, after on the right.Neutral

Butter

Chocolate

Gothic

Matcha

Stone

Y2K

State matrix
LiberationSans(regular) at 500 in every theme; afterLiberationSans-Boldat 600 in every theme. With a variable sans-serif (Noto Sans), the label moves from the 500 to the 600 instance.field-labeltarget keeps its own weight.Scope
Components: FieldLabel
Testing
FieldLabel.test.tsx: a new test reads the label's injected CSS and pinsfont-weight: var(--font-weight-semibold). It fails on the old style.CI=1 vitest run packages/core/src/Field packages/core/src/FormLayout packages/core/src/CheckboxList packages/core/src/RadioList packages/core/src/theme/themingTargets.test.ts(929 passed).field-labeltarget keeps its weight, with identical pixels before and after. Sheets: https://github.com/meta/astryx/tree/68f78f559b1794ad4b7367b7d9f752ca09f53f52/look-gate