-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Standardize the config format of TanStack project docs #135
feat: Standardize the config format of TanStack project docs #135
Conversation
@fulopkovacs is attempting to deploy a commit to the Tanstack Team on Vercel. A member of the Team first needs to authorize it. |
eaba187
to
9340483
Compare
Don't wanna "Approve" the PR since there's still a few TODOs and this a draft PR, but WOW I love the work you've done here. This looks good to me - I vote we move forward with it! |
Also, please do open PRs to all of the related projects. I'll coordinate with the other maintainers to make sure that this is going through on each project in time. |
e2e593c
to
aadfb60
Compare
@fulopkovacs what can I do to help get this merged? (Sorry about all the conflicts) |
@lachlancollins haha, there are now quite a few conflicts, but I think it'll be fine. I'll look at them later today, and ask for help/clarification if needed. Thanks for offering your help! Originally I was planning to open PR-s for migrating to the new config format in all the TanStack repos today, and after that, this PR would've been ready for review. Resolving the conflicts and testing the PR locally again will cause some delay, but I'll try really hard to get everything done this weekend and pass it to review! (Sorry for being slow with this one: it involved a lot of tedious work/testing, and I was asked to solve/voluntarily started debugging some other issues in this project and |
6a163d2
to
359d7c9
Compare
359d7c9
to
7b39f22
Compare
7b39f22
to
1c26d32
Compare
@fulopkovacs looking great! Please feel free to submit the PRs to the other projects, I'll merge them all simultaneously when everything is ready to go |
@lachlancollins Awesome! I'm ready with my work (unless you request more changes). Turns out, that if we don't rename the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for your work on this @fulopkovacs !
The idea was proposed here by Tanner: #131 (comment)
TL;DR
Currently the docs of the TanStack projects use different
config.json
formats, causing a bit of a mess. The format ofTanStack Form
can fit all the other projects if we add ausers
key to it (forTanStack Query
).The new config format
See the
zod
schema here: https://github.com/fulopkovacs/tanstack.com/blob/3426fc7df794e5de381903a1ee7bfb81baf0148b/app/utils/config.ts#L33✨ JSON Schema ✨
I wrote a fancy JSON Schema that our editors can use to validate
docs/config.json
files, and in the future we could use this to validate the schemas in the CI of the projects.Here's a demo of installing the schema in VSCode, and using it for validation:
02-json-schema-correct.mp4
This is the code snippet I copy-paste into
settings.json
in the video:Comparing the current doc configs of the TanStack projects
Note
I didn't want to spam the projects with PR-s, so I linked the new config files from my forks. When you test this PR you can copy the each new config file from there toEdit: I opened up PR-s where they were necessary.docs/tanstack-docs-config.json
.docSearch
,menu
(only framework-specific pages, no core docs),users
docSearch
,menu
(mixes core and framework-specific docs)docSearch
,menu
(mixes core and framework-specific docs)docSearch
,menu
(mixes core and framework-specific docs)docSearch
,menu
(currently only React docs)docSearch
,menu
(core docs),frameworkMenus
(framework-specific)docSearch
,menu
(core docs),frameworkMenus
(framework-specific)config.json
file, docs are not in the Remix app