Skip to content

Fork samples so versioned Lit 3 docs playground samples now use Lit 3 pre-release #1127

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

Merged
merged 3 commits into from
May 22, 2023

Conversation

AndrewJakubowicz
Copy link
Contributor

@AndrewJakubowicz AndrewJakubowicz commented May 19, 2023

Fixes: #1124

Result of this change is that the docs/v3 subdirectory now uses Lit 3 pre-release for live code samples. All unversioned (and explicitly v2) tutorials, playgrounds, samples now explicitly depend on v2-base.json, with behavior unchanged.

How

Renamed samples/docs to samples/v2-docs & duplicated it into v3-docs. Then forked base.json into v2-base.json and v3-base.json.

Then replaced all playground-example and playground-ide usages with the versioned counterpart depending on whether the docs are in docs/v2 or docs/v3 directories.

Testing

Some of our integration tests check this. However I also manually went page by page and inspected our playgrounds.
Additional security is that if a file path was broken in the playground-example or playground-ide shortcode, we get a build error.

While testing this PR I found #1128 - however it is non blocking because it's also present in prod.

Documentation in the v3 subdirectory now uses the Lit 3 pre-release.

How

Renamed samples/docs to samples/v2-docs & duplicated it into v3-docs.
Then forked `base.json` into `v2-base.json` and `v3-base.json`.

Then replaced all `playground-example` and `playground-ide` usages with
the versioned counterpart.

Result

All unversioned content still uses Lit 2, but the versioned v3 docs now
show samples on the Lit 3 pre-release.
@github-actions
Copy link

github-actions bot commented May 19, 2023

A live preview of this PR will be available at the URL(s) below.
The latest URL will be appended to this comment on each push.
Each build takes ~5-10 minutes, and will 404 until finished.

https://pr1127-f4c12a6---lit-dev-5ftespv5na-uc.a.run.app/
https://pr1127-de1d9d0---lit-dev-5ftespv5na-uc.a.run.app/
https://pr1127-78b9d74---lit-dev-5ftespv5na-uc.a.run.app/

@AndrewJakubowicz AndrewJakubowicz changed the title Version docs samples into v2 and v3 samples. Version documentation playground samples to use Lit 2 and Lit 3 pre-release May 19, 2023
@AndrewJakubowicz AndrewJakubowicz marked this pull request as ready for review May 19, 2023 22:25
@AndrewJakubowicz AndrewJakubowicz changed the title Version documentation playground samples to use Lit 2 and Lit 3 pre-release Fork samples such that versioned Lit 3 docs playground samples now use Lit 3 pre-release May 19, 2023
@AndrewJakubowicz AndrewJakubowicz changed the title Fork samples such that versioned Lit 3 docs playground samples now use Lit 3 pre-release Fork samples so versioned Lit 3 docs playground samples now use Lit 3 pre-release May 19, 2023
@AndrewJakubowicz AndrewJakubowicz requested a review from augustjk May 20, 2023 00:00
Copy link
Member

@augustjk augustjk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@AndrewJakubowicz AndrewJakubowicz merged commit 5718691 into main May 22, 2023
@AndrewJakubowicz AndrewJakubowicz deleted the version-docs-code-samples branch May 22, 2023 21:02
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.

Version code samples with doc versions
2 participants