-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Use mono-packages for docs examples #3327
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
Conversation
| }); | ||
|
|
||
| node.value = generate(ast).code.replace(/(<WRAPPER>(?:.|\n)*<\/WRAPPER>)/g, '\n($1)'); | ||
| node.value = recast.print(ast, {objectCurlySpacing: false, quote: 'single'}).code.replace(/(<WRAPPER>(?:.|\n)*<\/WRAPPER>)/g, '\n($1)'); |
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.
Recast does a better job of code generation, because it preserves the original formatting for anything that wasn't modified.
|
Build successful! 🎉 |
I think we did this so that we could develop docs for components/hooks that weren't released at all yet |
|
hmm yeah, but there's a separate check for pre-releases also, which uses individual packages... |
|
I just saw that, maybe that was added later? |
|
I think it might just be confusing. Then we'd probably also need to explain what an individual package even is and why you would want to use it, which seems like a lot for the header of every page (the first thing people see). I think for now we can change the version to just be the mono package version. The "View package" card below links to the individual package, where you can easily find the version. @dannify also wanted to change "version" to "added" or "since", to show the version a component was added to the mono package instead of the current version. Might be more useful. That will require some more manual work (to be done separately). |
|
Build successful! 🎉 |
I think this would help, we get people confused about when things were added pretty consistently. If we kept an old version of docs for older versions of the mono packages, I think we could also solve it that way |

This updates the React Aria and React Stately examples to use the mono-packages rather than the individual packages, similar to how we have been doing it for React Spectrum. This simplifies the examples and reduces the number of packages people need to install.
Questions:
versionshown at the top of the page? In RSP, people have been confused since this doesn't match the mono package version.