Skip to content

test(website): the nine partial docs samples are completed and typechecked, and no block may be partial - #570

Merged
arrzdev merged 1 commit into
mainfrom
docs/complete-partial-samples
Nov 16, 2026
Merged

arrzdev merged 1 commit into
mainfrom
docs/complete-partial-samples

Conversation

@arrzdev

@arrzdev arrzdev commented Nov 16, 2026

Copy link
Copy Markdown
Owner

What

The 9 docs samples that #568 marked partial are now complete and typechecked against the built package, and the check allows no partial block (cap lowered from 12 to 0).

  • Route files (quick-start home page, routing doc page and providers layout, rendering orders page, theming settings page): the check now gives createFileRoute a short list of route ids (ROUTE_IDS in samples.test.ts), the stand-in for a generated route tree.
  • Service worker (hooks-updates push sample): a module that imports adaptv/sw is compiled against the worker lib instead of the DOM one. The sample gains declare const self: ServiceWorkerGlobalScope, which a reader's strict TS needs too.
  • routing not-found sample: shown inside defineApp({ … }) with its import, instead of a bare key.
  • list infinite scroll: gains the react import, a Post type and the useState/useRef lines, so post is typed.
  • pull-to-refresh dark indicator: the open <PullToRefresh> tag is closed around a ScrollView.
  • DOCS_AUTHORING.md says how route ids and worker modules are checked.

Why

A sample that is skipped can drift from the package without a test failing. Nothing is left skipped now. The docs renderer has no collapsed setup lines, so each sample gained only the lines it needs (at most 4).

Reproduce: on main, pnpm build, then in website/ remove a partial: true line from any of the 9 blocks: samples.test.ts fails.

Verify (in website/, after pnpm build at the root): pnpm test (511 passed), pnpm typecheck, biome check .; root pnpm biome:check.
Tested on: Linux, Node 22. Not tested: root pnpm gate in full, nothing outside website/ changed.

…ecked, and no block may be partial

Route files are checked against a short list of route ids, a service worker module against the worker lib. The list, pull-to-refresh and not-found samples gain the lines they were missing.
@arrzdev
arrzdev marked this pull request as ready for review November 16, 2026 03:26
@arrzdev
arrzdev merged commit d619ebf into main Nov 16, 2026
6 checks passed
@arrzdev
arrzdev deleted the docs/complete-partial-samples branch November 16, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant