Repository navigation
test(website): the nine partial docs samples are completed and typechecked, and no block may be partial - #570
Merged
Merged
Conversation
…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.
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.
What
The 9 docs samples that #568 marked
partialare now complete and typechecked against the built package, and the check allows no partial block (cap lowered from 12 to 0).quick-starthome page,routingdoc page and providers layout,renderingorders page,themingsettings page): the check now givescreateFileRoutea short list of route ids (ROUTE_IDSinsamples.test.ts), the stand-in for a generated route tree.hooks-updatespush sample): a module that importsadaptv/swis compiled against the worker lib instead of the DOM one. The sample gainsdeclare const self: ServiceWorkerGlobalScope, which a reader's strict TS needs too.routingnot-found sample: shown insidedefineApp({ … })with its import, instead of a bare key.listinfinite scroll: gains the react import, aPosttype and theuseState/useReflines, sopostis typed.pull-to-refreshdark indicator: the open<PullToRefresh>tag is closed around aScrollView.DOCS_AUTHORING.mdsays 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 inwebsite/remove apartial: trueline from any of the 9 blocks:samples.test.tsfails.Verify (in
website/, afterpnpm buildat the root):pnpm test(511 passed),pnpm typecheck,biome check .; rootpnpm biome:check.Tested on: Linux, Node 22. Not tested: root
pnpm gatein full, nothing outsidewebsite/changed.