Repository navigation
fix(cli): on a one-family base, a body font set alone keeps empty-state titles on the heading font - #13233
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
…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]
e4c8c84 to
6e00370
Compare
|
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. |
|
/approve-spec 6e00370 |
There was a problem hiding this comment.
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: inheritin 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-familyon 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
--whenstyles 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.
- #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
|
Landed on main in #13276. |
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:
font … --on heading): the heading font when the two families then differ (as before).--font-family-body, on a one-family base: the heading font when the two families then differ (new).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--whenstyles only those titles; the plain title still follows the rules above.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 onvar(--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:compactleaves 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.Changeset
[experimental]patch for@astryxdesign/cli.replay: worse 0 at 6e00370
preflight: pass 6e00370