Repository navigation
feat(docs): consume HIG packages instead of copied CSS and primitives (hig#34) - #11
Merged
Merged
Conversation
Part of bloxwap/hig#34 (Font row). - Vendor @bloxwap/hig-tokens, -contracts and -react 0.1.0-candidate.sha7c67a07c tarballs (dry-run packed from bloxwap/hig@7c67a07) under vendor/bloxwap-hig with file: dependencies, root overrides and a provenance/hash guard in the build. - Import @bloxwap/hig-tokens/css and @bloxwap/hig-react/css; delete the hand-copied hig-tokens.css, hig-controls.css, license/source pins and their check. - Use HIG Button/IconButton for actions and copy controls, HIG intents for link-buttons, Spinner/EmptyState/Surface for loading and empty states, Callout for in-development notes, hig-sr-only, and typed tokens for theme/OG colours. - Drop duplicate secondary/ghost fills, type-scale vars and install-tab styles; fix the undefined syntax keyword colour. - Keep Fumadocs shell/search, base path /font, static export, type tester, glyph browser and variable-axis controls. - Add a Playwright spec for package CSS, HIG copy buttons, empty states, keyboard search and 390px reflow; add before/after evidence. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
|
CI on
Not merged; this is left for independent verification. 🤖 Generated with Claude Code |
…allout scripts.spec.ts still asserted `.bw-callout-wip` had count 0, a class the HIG migration removed, so the check always passed. Assert on `.bw-callout` and the `note` role with "is being drawn" instead. Split the presentational HIG Callout out of InDevelopment into in-development.tsx and render it in a bun unit test (test:unit, now run in the Font delivery quality workflow), since no family currently renders that path. Part of bloxwap/hig#34 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 15, 2026
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.
Part of bloxwap/hig#34 (Font row). This is a follow-up to the #10 pilot. Base:
82ad793.#10 pinned hand-copied HIG CSS from
1a776b9. This PR switchesapps/docsto the HIG packages, which come from bloxwap/hig@7c67a07(npm ci && npm run build && npm run release:dry-run -- --channel candidate→0.1.0-candidate.sha7c67a07c). Nothing was published, tagged or released.What changed
vendor/bloxwap-hig/contains only the three packed tarballs it needs:hig-tokens,hig-contractsandhig-react. They are installed asfile:dependencies ofapps/docs, and rootoverridespin the transitive HIG versions to the same files.provenance.jsonrecords the commit and the SHA-256 of each tarball.scripts/check-hig-vendor.tsruns at the start ofbuild. It checks those hashes and the installed versions. It also fails if HIG palette/spacing tokens or the base.hig-buttonrule are redefined in the docs sources.styles/hig-tokens.css,styles/hig-controls.css,styles/HIG-LICENSE,styles/hig-source.jsonandscripts/check-hig-source.ts.global.cssnow imports@bloxwap/hig-tokens/cssand@bloxwap/hig-react/css.Buttonfrom@bloxwap/hig-react/button. Copy controls useIconButton(ghost intent, 48px target). Link-buttons (download, "Try it", guide links, 404) carry the HIGdata-intent. The local secondary/ghost fills and the "step up on a card" overrides are gone..btnnow only adds icon layout and the compact size, set through--hig-control.Spinner+Surfacewhile loading and HIGEmptyStatefor "no data" and "no matches". The glyph grid usesSpinnerwhile loading. In-development notes use HIGCallout(warning). The local.sr-onlyand:focus-visibleare replaced by HIG's.themeColorand the social-card colours readtokens.colors.*.srgbfrom@bloxwap/hig-tokens. The card text colour moves from#f5f7fato the HIG text colour#fafafa.--text-*/--radius-2xlvariables that were redeclared, and a second copy of the segmented-control styles for the install tabs. The undefined--bloxwap-pinksyntax colour is fixed: code keywords are now coloured as intended./font; static export; metadata, OG cards and sitemap; deep links; API/install examples; and the type tester, glyph browser and variable-axis controls (Range,Switch,Segmented,FamilyPicker).docs.ymlnow also runs whenvendor/bloxwap-hig/**changes.Before → after (from
summary.json, produced bymeasure.mjsandcapture.mjs)_nextchunk, raw)global.css+styles/*)apps/docs)Notes on the numbers:
@supportsblock (--hig-source-*), about 2 KB, that the old copied snapshot lacked.button,status,surface,providerandcontractsmodules.lucide-reactand@number-flow/reactare still used by the demos.Screenshots (Chromium, production export at
/font; desktop 1280×900, mobile 390×844)All 26 PNGs, including the Sans family page, the character set page and the 390px tester, are in
evidence/hig-34/.Verification (local, macOS, bun 1.4.3 as in CI;
verification.txt)bun install --frozen-lockfile: no changes.bun run lint: passes (exit 0).bun run typecheck(fumadocs-mdx && next typegen && tsc --noEmit): passes.NEXT_PUBLIC_BASE_PATH=/font bun run docs:build: vendor guard OK. Static export OK: 27 HTML files, 24 social cards, 52@font-facerules, base path/font.bun test apps/docs/lib/glyph-text.test.ts: 4 pass./font. That is the existing 19 specs plus the newtest/hig-packages.spec.ts. The new spec covers package CSS loaded, theme colour, keyboard copy through the HIG IconButton with a polite status, HIG intents, the EmptyState, ⌘/Ctrl+K search into the static index and navigating a result under/font, and no horizontal scroll at 390px on home, installation and character-set.packages/npmpackage tests need the Python font build; they run in the "Font delivery quality" CI job and are unaffected by this change.Exceptions / remaining
@bloxwap/hig-*are published.Slider/Switchonly take string labels and renderlabel: value. Using them would change the accessible names and drop the NumberFlow readouts and the<code>axis tags.Toaststays until dismissed.planning/adoption.jsonFont row still needs updating by HIG owners. The local row is inevidence/adoption.json.Review fix (
44b8a00)test/scripts.spec.tsasserted.bw-callout-wiphad count 0, but this PR removed that class, so the check always passed. It now asserts.bw-calloutandgetByRole('note').filter({ hasText: 'is being drawn' })both have count 0 on the Arabic, Armenian, Georgian and Hebrew pages.Callout(severitywarning,announce={false},wip-badgeaction) moved intocomponents/docs/in-development.tsx.InDevelopmentstill reads font data and renders it. No family renders that path today, soin-development.test.tsxrenders the real vendored@bloxwap/hig-reactCallout and checks: one staticnotewith no status/alert live region,data-severity="warning", the title, the badge, and planned coverage present or omitted. The newtest:unitscript runs it, and the Font delivery qualitydocsjob now callstest:unit./font, ad hoc, not committed): onsans-arabic, the counts were 0/0 before anything was injected. After injecting the server-rendered Callout markup,.bw-callout= 1 and the note filter = 1, while the old.bw-callout-wipselector still found 0.bun run lintpassed,bun run typecheckpassed,bun run docs:buildpassed with base path/font(27 HTML files),bun run test:unitgave 7 pass / 0 fail, andplaywright test --project=chromium --project=webkitgave 48 passed. Firefox would not launch on this Mac (browserType.launchfailed), so Firefox results come from CI only.bun install --frozen-lockfilereports lockfile drift with both local bun builds (1.4.0-canary and 1.2.20), and it does the same on the unmodified branch head. CI's setup-bun installs cleanly.🤖 Generated with Claude Code