Repository navigation
LH-144, LH-149, LH-150, LH-151: shared page sizes, half steps of the type scale, whole ratios, drawn metric color in validate - #1016
Closed
michaeljgrimm wants to merge 2 commits into
Closed
michaeljgrimm wants to merge 2 commits into
michaeljgrimm wants to merge 2 commits into
Conversation
…ratios, drawn metric color in validate Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… whole ratios Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four sizing fixes of the layout harvest (
docs/programs/layout-harvest/), from PR #767's slide-design audit (mapping inC:/opf-work/pr767/mapping.md, rows N3, N4, N5) and #1009. Status for the catalog (burndown.md not edited, as the wave rules ask): LH-149 done (FAQ), partial for the dense comparison (see below); LH-144 done; LH-150 done; LH-151 done.LH-149: half steps of the type scale for fitted body text
Rule (one rule, documented in
docs/layout-templates.mdand atscaleStepincomposition.ts): fitted body text takes LH-17's steps and the half step between each two (the floor times (28/16)^(k/8), rounded to whole reference px): 16, 17, 18, 20, 21, 23, 24, 26, 28, 30, 32 px at the default floor. LH-17's scale stays the backbone (every old step is still a step; sizes stay few and are shared by siblings); a set of siblings sized jointly now loses at most half a step of what it fits, not a whole one.half-steps, first inGUARDED_RULES(so inCORE_RULES), fired when a fit or a joint trial (stack, grid rows, paragraph columns, long-text rows, parallel regions with the block below, the LH-17 snap insharePeerSizes) settles on a half step. Reason: a joint trial at a half step gives the rows other heights than the full step under it, and on b03 s39 and the hero slides an unguarded version set some blocks smaller (28 to 26, 18 to 17). Guarded, no block is smaller anywhere (sweep below).HALF_STEPPED) and counted at the LH-17 step under it in every comparison of arrangements:trackQuality(so the guard's rule sets, LH-07's step badges, LH-80/LH-49 tracks, LH-48 growth) and LH-83's recompose-at-floor (wholeStepSmallest, andbodyReadability's at-floor test). A gain of half a step alone (16 to 17 px) keeps the slide's arrangement: agenda 3 and 4 long keep their template and step badges (identical to main), and the hero slides b10 s49 and b14 s02 keep their recomposition at 18 px. A paginated page withmaxFontSizedecides its step badges on the slide without the cap, as its first page did.candidates/faq/short-6-before).LH-144: the pages of one paginated slide share their type sizes
composition.maxFontSize(reference px, 8 to 200, inherited by groups likeminFontSize; schema,docs/schema-reference.md,docs/dynamic-composition.md, the layout skill's geometry reference). Paragraphs, lists, quotes, metrics and timelines are never set larger: no block grows past it (LH-48'sfillLone, LH-41/LH-129's timeline growth), and a block composed larger is laid out again in its own box at the cap (capSizesaftersharePeerSizes; a timeline by offsetting every role until its largest label fits; a list in columns keeps the columns its role size chose and is set at the cap). Never underminFontSize. Headings, tables, code and charts keep their sizes.paginate(and so the export'scontinueOverfull, LH-90) writes it on every page after the first: the largest size the first page draws for the kinds of block that page holds. Breaks are chosen as before (a cap only lowers sizes, so a page that fits fits with it). One number per page, so a kind the first page does not have is capped with the others (documented).LH-150: a ratio never breaks at its slash
line-break.ts: a figure, a spaced slash and a figure ("4.6 / 5", "$2 / $3", the division and fraction slashes) is one token for the breaker,bindNoBreakwrites both spaces as U+00A0 for PowerPoint (table cells and native text) andunbindNoBreakgives them back; an unspaced ratio ("3/4") is not cut beside its slash inside an over-long word. "Q1 / Q2", "and/or" are untouched.oneFigure), in the metric layout and inreadsAsWellFigure's split count.columns/homogeneous-table-3col: "4.6 / 5" now draws on one line (was "4.6 /" over "5"). The fixture intable-content-widths.test.mjstakes 24 px instead of 25 to keep the ratio whole (the next size down for a split figure, as the wave 6 size guard allows); updated.LH-151: text-contrast judges a metric value in the drawn color
rules-accessibility.tscalls core'smetricValueColor(the function the preview'srenderMetricand the PPTXaddMetricPayloadcall) with the primary, the card fill (neutrals.card) or slide/emphasis background, and the text color, for the value and an inline unit. The audit'shomogeneous-metric-2col,homogeneous-metric-3col,mixed-quote-metric-textand bothscorecarddecks no longer report "#2874A6 on #172C52, 2.73:1"; a pale accent on a light slide still warns (test).Evidence
Sheet:
C:/opf-work/harvest/wave6/lh-149/sheet.png(before = main, after = this branch, Claude Design where it exists; for the LH-144 rows the third column is the slide's first page). Rows: agenda 3 and 4 long (review fix, identical to main); narrative n14, n23, n30; corpus b07 s07, b08 s26, b03 s06; PR767 FAQ short-6 and dense options (office fonts); paginated process 6 long p5, agenda 5 long p3, table 6 long p5; PR767 homogeneous-table-3col. Nothing new is drawn, so no PowerPoint COM export.Size-guard sweep (976 slides: 844 corpus + narrative 44+1 AR, mixed 48+2 AR, charts 35+2 AR; catalogs dropped, estimated measurement)
half-stepsfired.Goldens and pinned files
OPF_UPDATE_GOLDENS=1): no area or region line changes against main (agenda 3 and 4 long are identical to main); sizes move in agenda-split 3, 4 long, list 3, 4 long, faq 4 long, pillars 5 long (same size, other row heights), metrics 5, 6 long, chart 5, 6 long, chart-beside 6 long, code 5 long, table 5, 6 long, table-beside 5, 6 long: every moved size goes up (16 to 17, 18 to 20, 21 to 23, 24 to 26). No case gained a finding.goldenworkflow must run (not regenerated here): renderlayout-template-goldensmoves 25 of 468 slides locally (main moves 0 here): 18 template slides (the half steps: agenda-split 3, text 4, list 3, pillars 5, comparison 4, timeline 4, metrics 5, image-beside 4, chart 4 and 5, chart-beside 4, table 4 and 5, table-beside 4 and 5, code 4 and 5, hero 6, all long) and 7 paginated pages (LH-144).golden.mjs/golden-gate.mjsmove 3 example slides: grid-spans slide 2 (32 to 37/35 px), product-roadmap-decision-review slide 6 and airline-disruption-recovery-review slide 6 (24 to 26 px).check:catalog-free,check:examples,check:examples-convert,check:stabilitypass).changes/lh-149-sizing-fixes.md(drawing:lists the layouts whose template goldens move).Checks
pnpm check:changed: build, biome, typecheck, catalog-free, changes, examples, examples-convert, font-hotlinks, registry-golden, schema-docs, schema-examples, schema-strict, skill-commands, skill-glossary, spec and stability pass. Fail as known on Windows:check:browser-safe(path separator),check:text(docs/evidencenot in the blobless checkout). Core tests stopped attable-content-widths(fixed, see LH-150).*.test.mjspassed before the last four updates (sibling-sizesandfloor-recomposefollow the half steps,overfull-continuationexpects the page cap,finding-text-rulesthe larger size); they pass now; onlyscript-width-estimatesfails (docs/evidence). Every other core test script passes.golden.mjs,golden-gate.mjs,layout-template-goldens.mjs: the golden workflow); pptx 193 of 194 (keynote-registry-runtime, symlink EPERM); gallery 13 of 13.measure-web-deliveryneeds Playwright's headless shell,harfbuzz-measurement-browserreadsdocs/evidence, as on waves 3 to 5), pptx 2 of 2. Core has no browser suite.packages/javascript/test/lh-149-sizing-fixes.test.mjs(16 cases, left to right and right to left; 13 of them fail on main; the agenda case guards the review fix). After the review fix: core 3431 of 3432*.test.mjs(script-width-estimates,docs/evidence), every core test script passes.🤖 Generated with Claude Code