Repository navigation
fix: lay out blocks before the docs app hydrates, so pages stop jumping - #399
Conversation
…ydrates, so the page doesn't jump
…e's own images, and prefetch links on hover
|
No configured credential can serve this run. Your ChatGPT subscription has hit its usage limit, which resets at 2026-11-13 17:11 UTC. Re-trigger after it resets, or add an API key for this provider, which Pullfrog falls back to automatically. The providers' responses
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
comark-annotate
comark-badge
comark-cards
comark-carousel
comark-cast
comark-charts
comark-chat
comark-chips
comark-cjk
comark-code
comark-code-notes
comark-colors
comark-comments
comark-critic
comark-deflist
comark-details
comark-diagrams
comark-diff
comark-embed
comark-fields
comark-figure
comark-file-tree
comark-footnotes
comark-github
comark-icon
comark-include
comark-keys
comark-links
comark-linter
comark-magic-move
comark-mark
markdown-it-to-comark
marked-to-comark
comark-mathml
comark-media
comark-metrics
migrate-to-comark
comark-outline
comark-properties
comark-qr
comark-quiz
comark-reading-time
remark-to-comark
comark-sources
comark-steps
comark-table
comark-tabs
comark-tests
comark-time
comark-ui
comark-xref
comark-zoom
commit: |
|
Warning Your ChatGPT subscription has hit its usage limit, preventing any new runs until it resets. The last 5 Pullfrog runs on onmax have all failed, so this review did not happen. The logged error states: "Your ChatGPT subscription has hit its usage limit, which resets at 2026-11-13 17:11 UTC." You have a Codex subscription registered with Pullfrog, but no OpenAI API key is stored as a fallback, so runs cannot proceed until the limit window resets. To fix it:
|
Latest result Pull request merged. Final answersSession Pull request merged. Ready; no repair needed. Inspected the diff and all supplied feedback. Package-scoped `vp test run test/frameworks.test.ts` passed 20/20 tests; focused Playwright passed 12/12; changed-file `vp lint` and `git diff --check` passed. Hosted build, check, e2e and publish succeeded. Pullfrog and Codex reviews were unavailable because of usage limits; neither supplied code findings or unresolved threads. Working tree is clean; no commit or push was necessary. |

On https://comark-ui.onmax.me/magic-move the page jumps while it loads: CLS is 0.45 on a 390px phone and 0.20 on desktop. The server paints every magic-move step stacked under its label, then the block collapses to one step about 400px shorter once the app hydrates. Charts (0.49), introduction (0.17), table, time, chips, and most other package pages jump the same way, less.
Two things cause it:
data-*-readyon<html>. The HTML renderer runs that script inline, so its pages never jump. The Vue, React, and Svelte components start it on mount, so a server render paints the no-script layout first.@vite-hub/docsbuild doesn't link comark-ui's styles in the server HTML (feat(docs): render pages with comark-ui's blocks vite-hub/vitehub#3572 does, onmain), so every block paints unstyled until its component adds its styles on mount.The first commit gives each of those four blocks' Vue, React, and Svelte roots
data-comark-mounts. Under@media (scripting: enabled),shared/scripted.tsapplies the scripted layout to those roots too, so a server render already paints the layout its script will keep. The HTML renderer still waits for its script, so a mail client or a strict CSP keeps the layout that reads without one. Magic move's unlayered code block rules also go up to three classes, as tabs' already are: the docs'.comark-content .cktied with them and won once nothing appended magic move's styles last.The second commit is the docs site:
docs/modules/comark-styles.tslinkscomark-ui/style.css(feat(ui): ship every package's styles as comark-ui/style.css #383) after the app's CSS, with every package'sdata-comark-<name>so no component adds its styles again. Drop it once the site can pin a@vite-hub/docsbuild with #3572./before.png, get their width and height fromdocs/public, so the carousel examples keep their room before the images load._payload.jsonon the first visit to/magic-move; it now fetches 12 kB. perf(docs): prefetch a link's page when the reader points at it, not when it scrolls into view vite-hub/vitehub#3835 makes the same change the module's default.Before/after on Drop
CLS from headless Chromium, the first 4 s after load, live site against this branch built with
pnpm docs:generate:e2e/server-render.e2e.tsrenders each of the four blocks with Vue's server renderer and fails onmain: magic move goes from 139px to 54px whendata-magic-move-readylands, tabs from 132px to 54px, carousel from 65px to 94px, table from 68px to 102px. A new case ine2e/magic-move.e2e.tsfails on the old selectors. After the app hydrates, the pages I compared (magic move, tabs, carousel, critic, getting started) look the same as live.