Skip to content

Conversation

@devongovett
Copy link
Member

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:

  • How should we handle the version shown at the top of the page? In RSP, people have been confused since this doesn't match the mono package version.
  • How should we expose what individual package a hook is part of?
  • Why did we only do this in the production docs rather than PR/local builds before? For now I turned that off so I could test, but not sure what the reason was.

});

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)');
Copy link
Member Author

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.

@adobe-bot
Copy link

@snowystinger
Copy link
Member

Why did we only do this in the production docs rather than PR/local builds before? For now I turned that off so I could test, but not sure what the reason was

I think we did this so that we could develop docs for components/hooks that weren't released at all yet

@devongovett
Copy link
Member Author

hmm yeah, but there's a separate check for pre-releases also, which uses individual packages...

@snowystinger
Copy link
Member

I just saw that, maybe that was added later?

@devongovett
Copy link
Member Author

@snowystinger
Copy link
Member

is it enough to include both sets of information? maybe some better names than I used for some things, was trying to figure out short words/phrases for it.
Screen Shot 2022-07-21 at 11 13 49 AM

@devongovett
Copy link
Member Author

devongovett commented Jul 21, 2022

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).

@adobe-bot
Copy link

@snowystinger
Copy link
Member

@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).

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

@devongovett devongovett merged commit 24b2004 into main Jul 22, 2022
@devongovett devongovett deleted the docs-monopackage branch July 22, 2022 22:22
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.

5 participants