Repository navigation
how: no rounding anywhere squares the pill radius too - #13167
Conversation
… so every pill and circle goes square; a radio's mark keeps its circle
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Changes are needed on the two points below, and approval also waits on an owner decision about direction.
No current spec record says whether an ask like "no rounding anywhere" should square the parts drawn as circles (avatars, calendar days, citations, slider thumbs, step dots). Main currently keeps them round, and this change reverses that. An engineering owner records the decision, and the clause that governs it, by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner.
- The
everywherecheck inpackages/cli/api/theme-edit/_how-question.mjs(lines 20036-20042) fires on "too", "as well" or "pill" anywhere in the question and on any clause that names a pill part, so asks such as "square corners and bigger buttons too" or "square corners and red badges" now add--radius-full 0pxand square every circle; limit it to the scope the description states and add test rows for those asks. - The description's user impact says main left every part drawn with the pill radius round, but main already squares badges, switch tracks and progress tracks under square corners, and the switch thumb stays round after this change because Core draws it at 50%; narrow the wording to the circles this change squares, and fix the matching code comment.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: on main the dial left every part drawn with the pill radius round. False: main squares badges, switch tracks and progress tracks; only the circles stayed round, and the switch thumb stays round on both.
- Claim: the corners dial does not move
--radius-full. Verified: the dial re-points pills to the element radius and leaves that token alone. - Claim: writing
--radius-full 0pxbeside the dial squares those shapes, as the editor did before. Verified on head and in the editor's earlier version. - Claim: the trigger is anywhere, everywhere, everything, at all, or a pill part named with "too". False: it also fires on a bare "too", "as well" or "pill", and on a pill part named without "too".
- Claim: a part kept by an except keeps its shape. Verified: the avatar's corner tokens are pinned after the theme-wide step.
- Claim: before, "no rounding anywhere, badges and switches too" wrote only the dial and avatars stayed round. Verified on main.
- Claim: after, it writes the dial and
--radius-full 0px. Verified. - Claim: "square badges" and "square corners on everything but avatars" behave as before for the badge and the avatar. Verified.
- Claim: rows in three test files cover the change. Verified; they pass on head.
- Claim: the whole theme-edit test directory passes. Partly checked: the five affected test files pass; the full directory was not run in CI at this head.
- Claim: no new public API. Verified.
- Changeset: an experimental patch note saying the ask writes the dial plus
--radius-full 0px, circles included, with radio marks kept round. Verified for the listed triggers; the code fires on more (first finding). - File
.changeset/experimental-theme-rounding-anywhere-pills.md: clear. - File
packages/cli/api/theme-edit/_how-question.mjs: both findings; also a stale doc comment abovepillsSquareand pinned radio marks listed among the squared parts on an older Core (non-blocking). - File
packages/cli/api/theme-edit/theme-how.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-thick-borders-chain-reaches.test.mjs: clear. - File
packages/cli/api/theme-edit/theme-together-rounding-anywhere-reaches.test.mjs: clear, apart from the missing rows in the first finding.
| const everywhere = | ||
| /\b(?:anywhere|everywhere|everything|at all|pills?|too|as well)\b/.test( | ||
| question.toLowerCase(), | ||
| ) || | ||
| clauses.some( | ||
| o => !o.except && o.parts.some(p => pills.includes(one(p.on))), | ||
| ) | ||
| )) | ||
| return null; | ||
| const kept = circles.filter(p => !named.includes(p)); | ||
| ); |
There was a problem hiding this comment.
This now writes a theme-wide --radius-full 0px (lines 20047-20051), but it fires on "too", "as well" or "pill" anywhere in the question, and on any clause that names a pill part for any aspect. So "square corners and bigger buttons too", "square corners and red badges" and "square corners but pill buttons" each add --radius-full 0px and square every avatar, calendar day, citation, slider thumb and step dot. "Square corners, avatars too" squares all circles instead of the avatar alone. The description scopes it to anywhere, everywhere, everything, at all, or a pill part named with "too". Test only those whole-theme words against the question, take "too"/"as well" only from a clause that names a pill part, and add rows for the asks above.
| // ("no rounding anywhere", "… badges and switches too": the corners dial | ||
| // leaves the parts drawn with --radius-full round, so that token goes | ||
| // square too, as before; a radio's mark keeps its circle.) |
There was a problem hiding this comment.
The corners dial at square already re-points the styling-choice pills to var(--radius-element) (_settings.mjs:7301-7320), so it does not leave every part drawn with --radius-full round; only the circles stay round. Suggested: "The corners dial keeps a circle drawn with --radius-full round. An ask for no rounding anywhere squares that token too. A radio's mark keeps its circle."
| ] | ||
| : named.map(m => set('corners', 'square', {on: m})), | ||
| said: everywhere | ||
| ? `and --radius-full 0px for the parts drawn as pills and circles (${[...pills, ...circles].slice(0, 6).join(', ')}${pills.length + circles.length > 6 ? ` and ${pills.length + circles.length - 6} more` : ''})${radios.length ? `; the radio marks keep their circle (${radios.join(', ')})` : ''}` |
There was a problem hiding this comment.
Non-blocking: pillShapes counts a radio mark as a circle, so on a Core that draws the mark with the pill token this list names the pinned marks among the parts that go square, then says they keep their circle. Leave out radios and what they hold, as pillParts does (_check.mjs:3157-3163).
Reviewed pull request #13167, merged into the theme working branch. It reaches main with the branch's next landing.
Reviewed pull request #13167, merged into the theme working branch. It reaches main with the branch's next landing.
- #13190 perf(cli): the first how ask compiles only the lexicon patterns it can match - #13167 how: no rounding anywhere squares the pill radius too - #13234 set: a text size for a part with several text pieces goes to its largest - #13248 docs(changeset): #13190's release note states no pattern count - #13039 fix(cli): experimental theme editor - controls share one height at each size - #13040 feat(cli): experimental theme editor - a badges setting styles the status and category badges in the theme's colors - #13285 set: a part that holds other parts has no main text for a size - #13260 how: no rounding anywhere reads its scope word on the corner ask alone - #12723 experimental theme how: a mood said beside an ask is named as not used, never dropped
|
Landed on main in #13315. |
User impact
"No rounding anywhere, badges and switches too" set the corners dial to square but left every part drawn with the pill radius round: avatars, switch thumbs, tokens and other circles stayed round although the ask said anywhere.
Problem and solution fit
The corners dial does not move
--radius-full, the token the pill and circle shapes read. The reading wrote only the dial (plus per-part lines for circles it named), so those shapes kept their radius. Writing--radius-full 0pxalongside the dial squares them, as the editor did before.Expected behavior and authority
The editor's earlier answer for this ask:
corners squareand--radius-full 0px, with a radio's mark pinned to its circle where it reads the pill token.Smallest restoration
pillsSquare writes
--radius-full 0px(and the radio pin) when the ask says anywhere, everywhere, everything, at all, or names a pill part with "too"; a part kept by an except keeps its shape.Evidence
corners squareonly; avatars stay round.corners squareand--radius-full 0px.corners square --on badge; "square corners on everything but avatars" keeps the avatar.Scope
Components: cli/api/theme-edit (how)
Testing
vitest run packages/cli/api/theme-edit(the whole theme-edit directory) passes.preflight: pass 489fd9b (review deferred to batch)
replay: worse 0 at 489fd9b
replay: worse 0 at 489fd9b