Update @nldd/design-system to 0.8.77 and adapt to it #219
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "deps/nldd-0877"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Takes
@nldd/design-systemto^0.8.77, with the two code changes that upgrade needs. Replaces #212, which held the bare bump. Rebased on currentmain(which now carries the bundled dependency round from #218).A full risk sweep ran across six axes (tokens, component APIs, shadow DOM, upstream changelog, runtime/a11y, packaging) covering all seven releases; every candidate finding was then adversarially verified by an independent pass. 35 candidates, 10 confirmed, 25 refuted.
Why the bare bump could not be merged
0.8.75 removed the four
--primitives-font-family-*-fallbacktokens.frontend/src/styles/tokens.css:46pointed the family chain at them deliberately, because we may not use RijksSans (the licensing note is in that file). Thevar()reference goes invalid at computed-value time, which takes out--primitives-font-family-sans-serif,-bodyand-display, and with them thefontshorthand onbody.Measured in Chromium on the built bundle:
font-familysystem-ui, sans-serifTimessystem-ui, sans-seriffont-sizeline-heightCustom properties inherit into shadow roots, so this is not only the document font: 39 NLDD component stylesheets lose their whole
fontshorthand including weight. Measured on the components' own rules,nldd-taggoes 16px/18px/475 to 16px/normal/400. The--primitives-font-size-*primitives survive, so the unpatched result is an incoherent mix rather than a uniformly smaller page.The two changes
1.
frontend/src/styles/tokens.css- an explicitsystem-ui, sans-serifstack, replacing the two-fallbackreferences. The serif line is deleted outright:--primitives-font-family-serif-fallbackdisappeared back in 0.8.71 and 0.8.77 ships no consumer of--primitives-font-family-serifat all.Deleting the override instead was measured and rejected. It restores 18px/27px, but the computed stack then begins with
RijksSans, which only falls through becausefontTuningPluginstrips the font. That plugin declares agenerateBundlehook, which never runs undervite dev- so developers would work in the restricted font while production shows system-ui, and a machine with RijksSans installed locally would render it in production too. Switchingmain.tsto@nldd/design-system/styles/system-fontwas also rejected: that stylesheet carries four faces, and the two JetBrains Mono ones would go with it, whichtokens.css:45explicitly keeps.The explicit stack keeps dev and production identical and leaves
fontTuningPluginas a second layer against redistribution rather than the only one.2.
frontend/src/components/RetentionIntroBanner.vue- removes the compensating host-padding rule. It existed becausereset.css's* { padding: 0 }stripped the banner's:hostpadding. 0.8.75 moved that frame into a shadow wrapper, so the rule stopped compensating and started stacking: +24px height, and the tinted frame inset 12px from the card column below it. With the rule gone, the 0.8.77 rendering is pixel-identical to 0.8.70.Both changes have to be in the same commit as the bump. On 0.8.70 without change 2 the banner text sits against its edge, so splitting them leaves a visibly broken commit.
Visual changes that come with this, no code involved
These are the design system returning spacing that Waggle's own reset removes. No action needed, but they are visible.
--components-card-box-shadowdefault went level-1 tononein 0.8.71) and the always-present 1px::afterborder becomes visibly grey. Hover, focus-visible and drag overrides are unchanged, measured identical to 0.8.70.CardShell.vue,Settings.vue) stay at 8px.--semantics-dividers-coloris one palette step lighter in light mode across 51 read sites (#D9DEE5to#E2E6EC, dEOK 0.025). Dark mode is unchanged.The card shadow and the corner radius are worth a deliberate decision rather than inheriting them by accident; they do not block this PR.
What no gate catches
Every one of these passes typecheck, eslint, vitest, the build and the Playwright e2e suite. There is no
toHaveScreenshotortoMatchSnapshotanywhere in the repo, vitest runs on happy-dom where the Lit components never boot, and no e2e test asserts on computed style or geometry. The app could ship rendering in Times with a fully green pipeline.The cheapest durable net is a static token guard: a vitest test that resolves every
var(--primitives-*/--semantics-*/--components-*)used infrontend/src/**against the installed design system's CSS and fails on a missing name. No browser, no flake. It would have caught this, it catches the--components-banner-paddingrename in 0.8.78, and it catches the already-dead reference to--semantics-buttons-primary-tinted-background-colorinemojiSuggest.module.css:40. Not included here to keep this PR to the upgrade itself.A note on the range
^0.8.70already resolves to>=0.8.70 <0.9.0-0, so it always admitted 0.8.75 and 0.8.77 - only the lockfile held Waggle on 0.8.70. The font-chain break was therefore reachable by any lockfile re-resolve, independent of this PR. 0.8.78 is alreadylateston npm and renames--components-banner-paddingto--components-banner-md-padding; Waggle's only consumer of that name is the rule change 2 deletes, so a future re-resolve is clean.Verification
npm cion 0.8.77,vue-tsctypecheck, eslint (0 errors), vitest 570 passed in 77 files,vite build, Playwright e2e 63 passed / 3 skipped,pre-commit run --all-files.system-ui, sans-serif/ 18px / 27px, matching the 0.8.70 baseline on all three axes.@font-face, anddist/assetscontains no RijksSans woff2.5d62f1d26850c2990ddc50c2990ddc407a85968b