-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: version playground examples and docs #2667
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
Uses npm run docusaurus docs:version v6 to clone the current docs/ directory into a versioned directory for v6. This effectively makes the docs/ directory the latest docs (v7).
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Full disclosure, I did not pour through the PR since there are over 5,000+ changes files 😄, but in general your approach sounds good.
Does this mean we will want to revert the following changes specifically in |
Since there isn't a v7 release yet that I can actually confirm with, I'll just ask to be sure: are the v7 docs set to install the latest version when opening the playgrounds in Stackblitz? Even if the assets are from v6, I imagine we'd want to install whatever version was selected in the dropdown -- if that causes an issue somewhere, that just means the demo needs updating with version-specific code. |
@liamdebeasi correct, we will want to revert those changes so that the v6 documentation is accurate after @amandaejohnston each playground example is now pulling the dependencies from the |
If I open a Stackblitz example with the docs set to v7, it's still using a regular release of Ionic v6 rather than a dev build: https://user-images.githubusercontent.com/90629384/206030196-94be6d6b-6034-4067-a79f-2eb68a8c4a8d.mp4 Is that how it's supposed to look? |
@amandaejohnston ahh yes, so if a playground component does not specify a I need to mass update all the playground component usages to add Also good to call out that we will need to use that syntax for our new examples that we expect to use v7 dependencies. |
It seems strange to need to add Edit: I'm not opposed to needing to move everything to a new directory, of course, but I want to make sure things are going as intended. |
We should likely not default anything in the future, so that when releasing v8, we do not need to make any updates to the existing v7 playground examples. For example, each playground should explicitly state which version it is targeting. I'd be happy to do this to the existing v6 playgrounds (in the |
Ah, that's a good point. 🤔 Digging into the code locally, I noticed that currently all usage examples are duplicated between the I can see the argument for that idea being too much "magic," though -- one might change a v6 playground and unexpectedly break it in v7 -- so I would be okay leaving things as-is if y'all feel strongly about that. (cc @liamdebeasi) |
Yeah I would opt that examples are duplicated across versions. This aligns with how Docusaurus handles versioning of markdown docs. Otherwise it will be difficult to know which playground examples can be removed in the future, without manually searching through each one to see if they are used vs. knowing we are dropping "version X" and can delete the entire directory. |
Works for me 👍 |
This PR versions the docs so that the v6 docs are within a versioned folder and the v7 docs are the latest. This also updates the playground component and file structure to support versioning.
v7
option to the version dropdownversioned_docs/version-v6
docs/api
static/code/stackblitz/v6
static/code/stackblitz/v7
package.json
(this allows us to load different versions of Ionic for playground examples)version
property to determine which directory to load Stackblitz assets from, defaults to loading v6 assets for now, so we do not need to update existing examples.<Playground version={7} />
/v7
directory.I believe we have been incorrectly updating docs in the
release-7.0
branch. We will likely need to backfill reverting changes to theversioned_docs/version-v6
directory. For example,ion-slides
andion-virtual-scroll
documentation should display when developers are viewing the v6 documentation.