docs(*): promote default values from prose to '@defaultValue' tags - #11538
Conversation
|
Important Review skippedToo many files! This PR contains 446 files, which is 146 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (446)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 338d040
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview1 package(s) bumped directly, 24 bumped as dependents. 🟩 Patch bumps
|
784ac00 to
4b71daf
Compare
338d040 to
3a32df2
Compare
size-limit report 📦
|
3a32df2 to
f08a4a7
Compare
|
Draft until #11534 lands — this branch is stacked on it, so the diff here only makes sense once that one is in. |
f08a4a7 to
e8dda2b
Compare
🎯 Changes
Default values were written as prose at the end of a description, so the
Default valuecolumn in the generated tables was almost always empty — it showedundefinedfor options that do have a default:This promotes those sentences to
@defaultValuetags, which moves the value into the column and removes it from the description:44 tags added across
query-core,solid-query,query-persist-client-coreand the five devtools packages. The result across all generated pages:Default valuecellsValues now shown:
true(212),false(159),'online'(72),0(46),'all'(21),'active'(7).Nothing is lost — the sentence moves from the description into the column, so
enabledreadstrueinstead ofundefined, which was closer to wrong than uninformative.What was deliberately left as prose
A default only becomes a tag when the literal is the whole default. These stay in the description, because a column showing half of a conditional default is worse than one showing nothing:
retry—3on the client and0on the servergcTime—5 * 60 * 1000, orInfinityduring SSRrefetchOnReconnect—trueunlessnetworkModeis'always'retryDelay,combine,streamedQuery'srefetchMode/reducer— the default is a described behaviour, not a literalnotifyOnChangePropsis also skipped: its default isundefined, and an untagged cell already renders asundefined, so tagging it would change nothing on the page.Devtools packages
16 of the tags are in devtools packages, which generate no reference pages. They are included because
@defaultValueis standard JSDoc that editors surface on hover, and because leaving them as prose would mean the same pattern is written two different ways across the repo.A tradeoff worth flagging
Filling the column turns 125 three-column tables into four-column ones, and the
Descriptioncolumn gets narrower as a result — on a 1728px viewport it renders at 228px and wraps to a few words per line. That comes from the docs site, not this PR: the content container is capped atmax-w-[768px]and the sponsor sidebar takes the rest, so the page had 768px to divide before any of this. Worth fixing on the site side, but the column now carries 517 correct values where it previously showedundefined.Verification
Compared the 1,415 generated pages against
main:Defaults to …sentences move into the column)pnpm --filter @tanstack/query-core run test:typespasses on TS 5.6 through 7.0The source change is comments only; no type or runtime behaviour changes.
✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact