Skip to content

fix(cli): on a one-family base, a body font set alone keeps empty-state titles on the heading font - #13233

Merged
josephfarina merged 1 commit into
feature/theme-editorfrom
theme-editor-heading-titles-body-font
Nov 21, 2026
Merged

josephfarina merged 1 commit into
feature/theme-editorfrom
theme-editor-heading-titles-body-font

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

On a base theme that draws headings and body in one family (neutral, butter, gothic, y2k), the theme editor keeps the base heading font when only the body font changes (set <theme> font Georgia --on body, or an exact --font-family-body). An empty state's title is drawn as a heading element but inherits the body's family, so it alone switched to the new body font while every other heading kept the heading font.

What the editor writes now, for the parts drawn as a heading element that inherit the body's family:

  • After a heading font (font … --on heading): the heading font when the two families then differ (as before).
  • After a body font set alone, by the dial or an exact --font-family-body, on a one-family base: the heading font when the two families then differ (new).
  • On a base with two families (chocolate, matcha, stone), a body font set alone leaves that title in the body's family, as the base draws it; a heading font still gives it the heading font.
  • A plain font set on the title itself (font-family … --on empty-state-title), or on the empty state around it, is kept. Before, a heading font set after it overwrote it. A font set on the title under --when styles only those titles; the plain title still follows the rules above.
  • One font for the whole theme is one family: nothing extra is written.

Record change

New AST-050 DEC-20 (its number follows the theme-editor decisions already open): a part drawn as a heading element that takes the body's family gets the heading font when the heading and body families differ after a heading font, or after a body font set alone on a one-family base; on a two-family base a body font set alone leaves it in the body's family (a heading font still gives it the heading font); a plain font on the part, or on a part containing it, is kept.

Writing rubric results

R1 narration: none; DEC-20 states what the editor writes, in the present tense.
R2 research: none in the record.
R3 evidence: no evidence cells.
R4 rejected alternatives: one, inside DEC-20, one line.
R5 change references: none.
R6 open questions: none.
R7 project status: none.

Evidence

  • theme-dials-reach-parts.test.mjs: on neutral, a body font by the dial and by the exact token both leave the title on var(--font-family-heading), also when an exact body font sits beside a whole-theme font; a whole-theme font writes no heading-font title rule; a plain font on the title stays after a body font and after a heading font; a font on the empty state reaches its title; a font on the title under --when variant:compact leaves the plain title on the heading font; on matcha (two families) a body font writes no heading-font title rule, and a heading font gives the title the heading font.
  • A replay of one-line theme asks, graded by rendering every part in light and dark, against main: every body-font ask whose only miss was the empty state title now comes out fully themed, and no ask comes out worse.

Changeset

[experimental] patch for @astryxdesign/cli.

replay: worse 0 at 6e00370

preflight: pass 6e00370

@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 21, 2026 7:16am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 21, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 21, 2026
@astracat-bot

astracat-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 7:24 AM UTC

…te titles on the heading font

On a base that draws headings and body in one family, the editor keeps the
base heading font when only the body font is set, but an empty state's title
inherits the body's family, so it alone took the new body font. After a
heading font, or after a body font or an exact body font token on such a
base, the parts drawn as a heading element now take the heading font when
the two families then differ. On a base with two families a body font set
alone leaves the title in the body's family. A plain font-family set on the
title, or on a part around it, is kept (after a heading font too, where it
was overwritten before). AST-050 DEC-20 records the rule.

[skip ci]
@josephfarina
josephfarina force-pushed the theme-editor-heading-titles-body-font branch from e4c8c84 to 6e00370 Compare November 21, 2026 07:02
@josephfarina

Copy link
Copy Markdown
Contributor Author

Covers AST-050 DEC-20 (the owner's ruling): a part drawn as a heading that takes the body's family (an empty state's title) takes the heading font in a theme the editor makes whenever the heading and body families differ after a heading font, or after a body font set alone on a base that draws headings and body in one family; on a two-family base a body font set alone leaves it in the body's family; a plain font-family set on the part, or on a part that contains it, is kept.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 6e00370

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 21, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this head yet.

The theme editor now keeps an empty state's title on the heading font when only the body font changes on a one-family base, leaves two-family bases as they draw it, and keeps a font set on the title or on the empty state around it. The new test fails on main and passes here, every case matches the approved new decision in the app themes record, and the related theme editor tests pass. Nothing else is needed from you.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: on neutral, butter, gothic and y2k, a body font set alone, by the font dial or the exact body token, keeps the empty state title on the heading font. Verified: test cases at theme-dials-reach-parts.test.mjs:74-108, and the same result on butter, gothic and y2k.
  • Claim: before this change, that title alone took the body font. Verified: the new test fails on main at line 78, and of the heading elements the editor styles, only the empty state title sets font-family: inherit in Core.
  • Claim: on chocolate, matcha and stone, a body font set alone leaves the title in the body's family, and a heading font still gives it the heading font. Verified: test lines 147-152, and the same result on chocolate and stone.
  • Claim: a plain font-family on the title, or on the empty state around it, is kept, also after a heading font, which overwrote it before. Verified: test lines 110-143; on main a heading font replaced the title's own font in either order.
  • Claim: a font on the title under --when styles only those titles, and the plain title still follows the rules. Verified: test lines 120-127.
  • Claim: one font for the whole theme writes nothing extra. Verified: test lines 90-95.
  • Claim: the editor keeps the base heading font when only the body font changes. Verified: _settings.mjs:7924-7931, unchanged.
  • Claim: the new decision states the rule as described, in the present tense, with one rejected alternative and no open questions or project status. Verified: spec.md:754-769.
  • Claim: the listed test cases exist. Verified: each case is in the test file.
  • Claim: a replay of one-line theme asks against main comes out no worse. Not checkable here: no replay output is attached, and the review does not rely on it.
  • Claim: an experimental patch release note for the CLI. Verified: the changeset front matter.
  • File .changeset/experimental-theme-body-font-keeps-heading-titles.md: clear.
  • File docs/specs/AST-050-app-themes/spec.md: clear; the knowledge check reports the records aligned.
  • File packages/cli/api/theme-edit/_settings.mjs: clear.
  • File packages/cli/api/theme-edit/theme-dials-reach-parts.test.mjs: clear; it agrees with the release note, the record and the code comment.

Automated review (maintainer link)

@josephfarina
josephfarina changed the base branch from main to feature/theme-editor November 21, 2026 08:10
@josephfarina
josephfarina merged commit bd14d6a into feature/theme-editor Nov 21, 2026
13 checks passed
josephfarina added a commit that referenced this pull request Nov 21, 2026
…te titles on the heading font (#13233)

Reviewed pull request #13233, merged into the theme working branch. It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…te titles on the heading font (#13233)

Reviewed pull request #13233, merged into the theme working branch. It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…te titles on the heading font (#13233)

Reviewed pull request #13233, merged into the theme working branch. It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…te titles on the heading font (#13233)

Reviewed pull request #13233, merged into the theme working branch. It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
- #13225 experimental theme: a whole-theme border color reaches the fields' edge at the nearest shade that keeps 3:1...
- #13186 fix(cli): a color said with a tint word fills with that color again
- #13091 experimental theme: a kept palette stays as saved through hand edits and undo
- #13233 fix(cli): on a one-family base, a body font set alone keeps empty-state titles on the heading font
- #13256 fix(cli): the fields-at-3:1 note prints its exact-color command in full, with the color quoted
- #13044 feat(cli): experimental theme how: readings held back from round 15
- #13241 experimental theme: a text color on an option row reaches the tokens its label and description read
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed on main in #13276.

@github-actions
github-actions Bot deleted the theme-editor-heading-titles-body-font branch November 22, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 6e003705 Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant