Repository navigation
experimental theme: a whole-theme border color reaches the fields' edge at the nearest shade that keeps 3:1... - #12763
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Needs an owner decision, and two fixes either way. No current record governs the theme editor writing a 3:1 field edge into the shared --color-border-emphasized token, and architecture:theme-tokens INV13 and DEC-2 give fields a dedicated --color-border-control and rejected raising --color-border-emphasized to 3:1 because other parts darken with it (on a neutral-based theme, --color-border #e5e7eb moves it from #d4d4d4 to #939498 for blockquote, card, divider, kbd key and others). An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. If the shared write stays, the "fields kept at 3:1" note should also name those other parts.
Blocking findings:
- The branch is built on an older copy of
theme-r15-p22: it conflicts with the base in five files and carries 21 commits already on it, so rebase the field-edge commit onto the current base, where it applies cleanly. - The note's exact-color line (
packages/cli/api/theme-edit/_settings.mjs:7871) has noastryx experimental theme editorprefix and leaves the hex unquoted, so pasted into a shell#e5e7ebstarts a comment and the command runs with no value; build it withPandquoteCommandArgumentlike the file's other command lines.
Claims and files checked
Review mode: full; reason: no-earlier-review
- A whole-theme border color moves the fields' edge to the color or its nearest 3:1 shade in each mode: verified (
_settings.mjs:7857-7873; the new field-edge test passes). - The result names the shade with a line that gives fields the exact color: false as a runnable line (
_settings.mjs:7871drops its value in a shell). - A field edge the theme sets itself keeps its value: verified (
pinnedcheck at_settings.mjs:7858; the test that keeps a set field edge passes). - One undo takes both back: verified (field-edge test).
- The change is five files and touches nothing outside the theme-edit folder: false for this compare, which has 33 files from 21 carried commits, two CLI docs and a test-timing file among them.
- The listed tests pass: verified (3 files, 14 tests at this head).
- The theme-edit suite fails only what its base fails, and lint and formatting are clean: not rechecked.
- The six carried changesets (bar height, checkbox size, corners, picture traits, plural looks, page color) belong to commits already on the base and were not judged here.
- Files:
_settings.mjs(the exact-color line finding, plus the note that follows the owner decision);_check.mjs,_how-question.mjs,theme-checks-size.test.mjs,.changeset/experimental-theme-how-checks-size.md(conflicts); the field-edge changeset and its three tests: clear; the other 24 files: clear here, identical to commits already on the base.
| putTok(edge.token, shade, m); | ||
| if (shade.toLowerCase() !== String(border).toLowerCase()) | ||
| (ctx.compileNotes ??= []).push( | ||
| `fields kept at 3:1: their edge (${edge.token}) is ${shade} in ${m} mode, the nearest shade of ${border} that reads on their fill; for the exact color: \`set ${data.name} ${edge.token} ${border}${data.mode === 'both' ? ` --mode ${m}` : ''}\``, |
There was a problem hiding this comment.
This line is not runnable as printed: it has no astryx experimental theme editor prefix (the other ${P} set lines in this file include it), and the unquoted hex starts a shell comment, so set p --color-border-emphasized #e5e7eb --mode light runs with no value. Suggest ${P} set ${data.name} ${edge.token} ${quoteCommandArgument(border)}${...}.
| if (!fill) continue; | ||
| const shade = shadeAt(border, String(fill), 3); | ||
| if (!shade) continue; | ||
| putTok(edge.token, shade, m); |
There was a problem hiding this comment.
putTok writes the shade theme-wide. On today's Core the field-edge token is --color-border-emphasized, which blockquote, calendar day, card, clickable card, kbd key, divider and the dropdown-menu radio also read, so they darken too (on a neutral-based theme, #d4d4d4 to #939498 for --color-border #e5e7eb), while the note says only "fields". Whether that is intended is an owner decision (architecture:theme-tokens INV13/DEC-2); either scope the write to fields or name those parts in the note.
81fa0fd to
b12e2d7
Compare
8d14a0a to
edd42ef
Compare
…ge at the nearest shade that keeps 3:1 on their fill
User impact
astryx experimental theme editor set <theme> --color-border <color>: a whole-theme border color also moves the edge the fields draw (the token the census reads for their border color, today--color-border-emphasized) to that color where it reads at 3:1 on the field's fill, else to the nearest shade of it that does, in each mode, so "thin light gray borders" reach inputs and selectors while they keep a boundary people can see. The result names the shade ("fields kept at 3:1"), with the line that gives fields the exact color; a field edge the theme sets itself keeps its value; one undo takes both back.Problem and solution fit
The theme editor is experimental. Each change is one behaviour of its
setorhowcommands, with its own test, and touches nothing outsidepackages/cli/api/theme-edit.Smallest restoration
Evidence
Tests on this layer (CI=1, applied on its base in order):
packages/cli/api/theme-edit/theme-border-follows.test.mjspackages/cli/api/theme-edit/theme-field-edge-follows-border.test.mjspackages/cli/api/theme-edit/theme-token-family-follows-fills.test.mjsThe whole
packages/cli/api/theme-editsuite on the top of this stack fails only what its base fails in the same environment (app-copy and compile-check fixtures); eslint and prettier are clean on the changed files.Scope
Components: theme editor (CLI, experimental)
preflight: pass f67054e (review deferred to batch: subagent cap)