Skip to content
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

Flip site to v3 as the latest Lit version #1194

Merged
merged 28 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2ecb43d
flip site to v3 as the latestVersion
AndrewJakubowicz Sep 25, 2023
afe6d3c
add updated goldens
AndrewJakubowicz Sep 25, 2023
7822fe3
fix integration test
AndrewJakubowicz Sep 26, 2023
a99b233
remove linux goldens
AndrewJakubowicz Oct 6, 2023
122d941
flip default playground to v3
AndrewJakubowicz Oct 9, 2023
8397b8f
Merge branch 'main' of github.com:lit/lit.dev into 3.0
AndrewJakubowicz Oct 9, 2023
d5dad64
Very rough draft of 3.0 blog post (#1196)
justinfagnani Oct 9, 2023
40a659a
Typo fixes to release blog
augustjk Oct 9, 2023
e3c91e0
Update screenshot goldens
augustjk Oct 9, 2023
bb2819e
Add Lit 3 release banner
AndrewJakubowicz Oct 9, 2023
d62010c
fix link to blog post
AndrewJakubowicz Oct 9, 2023
4cf06f7
Fill task section of release blog
augustjk Oct 9, 2023
eb87cc4
Fix old redirect urls
augustjk Oct 10, 2023
f472667
Update known good urls
augustjk Oct 10, 2023
d20fa0f
Redirects don't work with hash urls
augustjk Oct 10, 2023
5bba8c4
Apply suggestions from code review
justinfagnani Oct 10, 2023
621d05f
Some update to 3.0 section
justinfagnani Oct 10, 2023
bb7b3fd
First draft of Context section
rictic Oct 10, 2023
5ebef4f
Apply suggestions from code review
justinfagnani Oct 10, 2023
9f89b43
Apply suggestions from code review
justinfagnani Oct 10, 2023
a57125f
Apply suggestions from code review
justinfagnani Oct 10, 2023
038bde5
Add signals section
justinfagnani Oct 10, 2023
5d04289
whitespace
justinfagnani Oct 10, 2023
a10b2b6
Add end section
justinfagnani Oct 10, 2023
293c49d
Update packages/lit-dev-content/site/blog/2023-10-10-lit-3.0.md
justinfagnani Oct 10, 2023
5c75033
Apply suggestions from code review
justinfagnani Oct 10, 2023
a67c41c
Apply suggestions from code review
justinfagnani Oct 10, 2023
6bdefec
Update packages/lit-dev-content/site/blog/2023-10-10-lit-3.0.md
rictic Oct 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/lit-dev-content/samples/base.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "/samples/v2-base.json"
"extends": "/samples/v3-base.json"
}
7 changes: 1 addition & 6 deletions packages/lit-dev-content/site/_includes/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,12 @@

{% include 'header.html' %}

{% if selectedVersion !== latestVersion and selectedVersion !== "v3" %}
{% if selectedVersion !== latestVersion %}
<litdev-banner>
You're viewing docs for an older version of Lit. Click
<a href="{{ versions[latestVersion].path }}/{{ versionLinks[latestVersion] }}">
here</a> for the latest version.
</litdev-banner>
{% elif selectedVersion === "v3" %}
<litdev-banner>
You're viewing docs for a pre-release version of Lit. Read the Lit 3.0 pre-releases
announcement <a href="/blog/2023-09-27-lit-3.0-prerelease-2/">here</a>.
</litdev-banner>
{% endif %}

<main {% if not page.url.includes('/docs/')
Expand Down
256 changes: 256 additions & 0 deletions packages/lit-dev-content/site/blog/2023-10-10-lit-3.0.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion packages/lit-dev-content/site/docs/v2/v2.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"collection": "docs-v2"
"collection": "docs-v2",
"selectedVersion": "v2"
}
2 changes: 1 addition & 1 deletion packages/lit-dev-content/site/home/1-splash.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<section id="new-banner">
<p><span class="emoji">📣</span> Have a question, or looking to chat? Join our <a href="{{site.baseurl}}/discord/">Discord server!</a></p>
<p><span class="emoji">📣</span> Lit 3 just landed! Check out the <a href="/blog/2023-10-10-lit-3.0/">Lit 3 release announcement!</a></p>
</section>
<section id="intro">
<div id="splashLogo" role="heading" aria-level="1">
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions packages/lit-dev-content/site/site.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"selectedVersion": "v2",
"latestVersion": "v2",
"selectedVersion": "v3",
"latestVersion": "v3",
"versions": {
"v3": {
"path": "/docs/v3",
"path": "/docs",
"label": "v3"
},
"v2": {
"path": "/docs",
"path": "/docs/v2",
"label": "v2"
},
"v1": {
Expand Down
23 changes: 13 additions & 10 deletions packages/lit-dev-server/src/redirects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,29 @@ export const pageRedirects = new Map([
['/msg/dev-mode', '/docs/tools/development/#development-and-production-builds'],
// TODO(sorvell) https://github.com/lit/lit.dev/issues/455
['/msg/multiple-versions', '/docs/tools/requirements/'],
['/msg/polyfill-support-missing', '/docs/tools/requirements/#polyfills'],
['/msg/polyfill-support-missing', '/docs/v2/tools/requirements/#polyfills'],
['/msg/class-field-shadowing', '/docs/components/properties/#avoiding-issues-with-class-fields'],
// TODO(aomarks) Should we add something specifically about this issue?
['/msg/change-in-update', '/docs/components/properties/#when-properties-change'],
['/msg/deprecated-import-path', '/docs/releases/upgrade/#update-packages-and-import-paths'],
['/msg/removed-api', '/docs/releases/upgrade/#litelement'],
['/msg/renamed-api', '/docs/releases/upgrade/#update-to-renamed-apis'],
['/msg/undefined-attribute-value', '/docs/releases/upgrade/#litelement'],
['/msg/request-update-promise', '/docs/releases/upgrade/#litelement'],
['/msg/deprecated-import-path', '/docs/v2/releases/upgrade/#update-packages-and-import-paths'],
['/msg/removed-api', '/docs/v2/releases/upgrade/#litelement'],
['/msg/renamed-api', '/docs/v2/releases/upgrade/#update-to-renamed-apis'],
['/msg/undefined-attribute-value', '/docs/v2/releases/upgrade/#litelement'],
['/msg/request-update-promise', '/docs/v2/releases/upgrade/#litelement'],
['/msg/expression-in-template', '/docs/templates/expressions/#invalid-locations'],
['/msg/expression-in-textarea', '/docs/templates/expressions/#invalid-locations'],
// Relocated pages
['/docs/libraries/localization', '/docs/localization/overview/'],
['/blog/feed.xml', '/blog/atom.xml'],
// Urls not ending with '/' violate CSP policies.
['/docs/releases/release-notes/1.3.0.html', '/docs/releases/release-notes/1.3.0/'],
['/docs/releases/release-notes/1.2.0.html', '/docs/releases/release-notes/1.2.0/'],
['/docs/releases/release-notes/1.3.0.html', '/docs/v2/releases/release-notes/1.3.0/'],
['/docs/releases/release-notes/1.2.0.html', '/docs/v2/releases/release-notes/1.2.0/'],
// `.0` is treated as a file extension, ensure it resolves correctly.
['/docs/releases/release-notes/1.3.0', '/docs/releases/release-notes/1.3.0/'],
['/docs/releases/release-notes/1.2.0', '/docs/releases/release-notes/1.2.0/'],
['/docs/releases/release-notes/1.3.0', '/docs/v2/releases/release-notes/1.3.0/'],
['/docs/releases/release-notes/1.2.0', '/docs/v2/releases/release-notes/1.2.0/'],
// Old release-notes redirects to new v2 location.
['/docs/releases/release-notes/1.3.0/', '/docs/v2/releases/release-notes/1.3.0/'],
['/docs/releases/release-notes/1.2.0/', '/docs/v2/releases/release-notes/1.2.0/'],
// Old Lit tutorial redirect to new tutorial catalog
['/tutorial/', '/tutorials/'],
].map(([path, redir]) => [
Expand Down
17 changes: 17 additions & 0 deletions packages/lit-dev-tests/known-good-urls.txt
Original file line number Diff line number Diff line change
Expand Up @@ -497,3 +497,20 @@ https://docs.astro.build/en/guides/integrations-guide/lit/
https://rocket.modern-web.dev/
https://stackblitz.com/edit/lit-ssr-global?file=src/server.js
https://twitter.com/techytacos
https://github.com/itsdouges/typescript-transformer-handbook#the-basics
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function
https://developer.mozilla.org/en-US/docs/Glossary/Primitive
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/extends#mix-ins
https://github.com/webcomponents-cg/community-protocols/blob/main/proposals/context.md
https://www.w3.org/community/webcomponents/
https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
https://developer.mozilla.org/en-US/docs/Web/API/AbortController
https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
https://developer.mozilla.org/en-US/docs/Web/API/fetch
https://developer.mozilla.org/en-US/docs/Web/CSS/display#box
https://github.com/google/safe-html-types/blob/master/doc/safehtml-types.md
https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/#decorator-metadata
https://preactjs.com/guide/v10/signals/
https://www.youtube.com/watch?v=l6Gn5uV83sw
https://github.com/e111077
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ test.describe('docs/components/styles', () => {

// Wait for the exact playground preview we want to load.
await page.waitForSelector(
'litdev-example[project="v2-docs/components/style/superstyles"] playground-preview [part="preview-loading-indicator"][aria-hidden="true"]'
'litdev-example[project="v3-docs/components/style/superstyles"] playground-preview [part="preview-loading-indicator"][aria-hidden="true"]'
);
// Wait for the loading bar to fade out.
await page.waitForTimeout(250);

await expect(
await page
.locator(
'litdev-example[project="v2-docs/components/style/superstyles"] playground-preview'
'litdev-example[project="v3-docs/components/style/superstyles"] playground-preview'
)
.screenshot()
).toMatchSnapshot('inheritingStylesPlaygroundPreview.png');
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions packages/lit-dev-tools-esm/src/build-unversioned-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const CONTENT_PKG = pathlib.resolve(REPO_ROOT, 'packages', 'lit-dev-content');
const SITE_JSON = pathlib.resolve(CONTENT_PKG, 'site', 'site.json');

interface SiteJSON {
latestVersion: 'v1' | 'v2';
latestVersion: 'v1' | 'v2' | 'v3';
}

type EleventyFrontMatterData = string[];
Expand Down Expand Up @@ -44,7 +44,7 @@ const UNVERSIONED_VERSION_LOCATION = pathlib.resolve(
*
* The following transforms are then applied on the files:
* - Permalink frontmatter is added to strip the version from the URL. E.g.,
* /docs/v2/* becomes /docs/*.
* /docs/v3/* becomes /docs/*.
* - `api.html` has frontmatter transformed so base api paths become
* unversioned.
* - The latest version `v[N].json` file is renamed `unversioned.json` so it
Expand Down
Loading