Repository navigation
feat(docs): fill the landing canvas with every example and turn chart cards through their charts - #103
Conversation
… cards through their charts - The canvas holds the landing's demos plus every package page's examples (45 cards instead of 15), in a fixed shuffle with no two of one package in a row. Each column's step is the one that keeps copies of a card farthest apart over the columns a screen holds, so no card shows twice on screen. - Cards without a height in their markup are measured once off screen and kept for the visit. The site's PNGs get their width and height at build time, so a card measures as it will show. - The two chart cards turn through the chart examples while hovered, crossfading SVGs drawn at build time. The per-bar and line-drawing animations, which repainted the SVG every frame, are gone. - Card loops start moving as soon as the pointer arrives instead of holding first, and they animate opacity and transforms only, with no blur. - `.demo` is `contain: strict`, and its hidden Markdown is `content-visibility: hidden` until shown. - The icon demo is gone: its logos filled the card at 2.25rem with the sentence hidden. The icon examples show icons inline at text size. - References light up in turn instead of vanishing, which made a card look like it had lost its links. - The github references demo, which repeated the page's References example, shows once.
Latest result Pull request merged. Final answersSession Pull request merged. Session Updated the branch with main because main changed docs/build.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed docs/build.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed docs/build.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed docs/build.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed docs/build.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed docs/build.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed docs/build.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed docs/build.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed docs/build.ts after its checks ran; waiting for checks on the new head. Session Updated the branch with main because main changed docs/build.ts after its checks ran; waiting for checks on the new head. |
comark-annotate
comark-carousel
comark-charts
comark-chips
comark-code
comark-diff
comark-embed
comark-github
comark-icon
comark-include
comark-linter
comark-tabs
comark-zoom
commit: |
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Landing canvas population — reviewed the new package-example collection, fixed shuffle, duplicate suppression, column stepping, and lazy card lifecycle.
- Card sizing and rendering — reviewed PNG dimension injection, off-screen measurement and caching for unsized cards, chart variant rendering, and the generated demo markup.
- Interaction and visuals — reviewed chart hover rotation, reduced-motion behavior, containment, Markdown overlays, and the revised demo animations.
- End-to-end coverage — reviewed the new checks for example count, on-screen uniqueness, card sizing, and chart rotation.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Navigation initialization — reviewed the canvas view activation change that captures the viewport dimensions before the first post-navigation draw, preserving centered card placement before
ResizeObserverruns. - Navigation coverage — reviewed the new end-to-end sampling that checks the first card's position across frames after client navigation.
gpt-5.6-sol | 𝕏

Stacked on #100 (
fix/landing-demo-shift). Retarget it tomainonce #100 merges.What changes
::examples: 45 cards, up from 15. They're in a fixed shuffle with no two of one package in a row. The column step is picked so copies of a card sit as far apart as possible across the columns one screen holds, so no card shows twice on screen. Charts are the exception: instead of a card per example, the two chart cards cycle through all of them (see "Charts" below). An example the landing already shows, such as github's references, appears once.widthandheightattributes, so a card measures the same as it shows.filter: blur)..demoiscontain: strict, and its hidden Markdown overlay iscontent-visibility: hiddenuntil shown.font-size: 0, which hid the sentence. It's gone, and the icon examples show icons inline at text size.Numbers
Measured in headless Chromium at 1440×900, main-thread time from CDP
Performance.getMetrics. Before is main with #100.Hover, 3 s with the pointer on each card, main-thread time:
Code costs more because its press now happens inside the 3 s window. Before, the card was still idle for its first 1.4 s.
Annotate's median frame went from 33.3 ms to 16.7 ms. Before, its loop ran at 30 fps.
Panning (a 90-step drag) costs about the same main-thread time: 636–649 ms before, 604–633 ms after. Median frame is 16.7 ms in both. The canvas now shows three times as many distinct cards for that cost. Measuring the cards takes about 50 ms once per visit, on a shared machine.
Tests
Two new e2e tests in
e2e/docs.e2e.ts:e2e/docs.e2e.tsande2e/navigation.e2e.tspass against a freshnuxi generatebuild.vp checkandpnpm run lint:docspass.