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

[lexical-website] Documentation Update: Validate stackblitz URLs in documentation #6215

Merged
merged 7 commits into from
May 31, 2024

Conversation

etrepum
Copy link
Collaborator

@etrepum etrepum commented May 30, 2024

Description

Sometimes we publish stackblitz URLs that point to a branch and don't change it back to main after review, which means examples can go stale or break if that branch is deleted.

To make PR review of stackblitz URLs easier, and to make the examples stable (relevant to #6144), this also adds docusaurus markdown preprocessor to rewrite these URLs on build to point to a specific commit (for PRs) or release branch.

Test plan

Before

stackblitz URLs could point to branches other than main

After

Tests fail if a stackblitz URL does not point to main

Stackblitz URLs reference a specific commit for PRs so they can be tested in situ

Copy link

vercel bot commented May 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2024 0:39am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2024 0:39am

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 30, 2024
@@ -100,7 +100,7 @@ function Editor() {

Source code: [examples/react-rich-collab](https://github.com/facebook/lexical/tree/main/examples/react-rich-collab)

<iframe width="100%" height="600" src="https://stackblitz.com/github/facebook/lexical/tree/fix/collab_example/examples/react-rich-collab?embed=1&file=src%2FApp.tsx&terminalHeight=0&ctl=1&showSidebar=0&devtoolsheight=0&view=preview" sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"></iframe>
<iframe width="100%" height="600" src="https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-rich-collab?embed=1&file=src%2FApp.tsx&terminalHeight=0&ctl=1&showSidebar=0&devtoolsheight=0&view=preview" sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"></iframe>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is an example of a case where we have left a non-main branch reference in an example (this isn't an isolated incident, I have fixed this class of inconsistency several times in various other PRs)

Copy link

github-actions bot commented May 30, 2024

size-limit report 📦

Path Size
lexical 23.95 KB (0%)
@lexical/rich-text 34.64 KB (0%)
@lexical/plain-text 34.62 KB (0%)
@lexical/react 149.36 KB (0%)

@@ -161,7 +161,7 @@
"eslint-plugin-sort-keys-fix": "^1.1.2",
"flow-bin": "^0.226.0",
"fs-extra": "^10.0.0",
"glob": "^7.2.0",
"glob": "^10.4.1",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this should be safe, if not we'll find out pretty quickly in tests. The upgrade is required to use an array of glob patterns, if it causes problems I will revert this part and use flatMap.

StyleT
StyleT previously approved these changes May 30, 2024
Copy link
Contributor

@StyleT StyleT left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for the fix

@etrepum
Copy link
Collaborator Author

etrepum commented May 31, 2024

I went ahead and added the follow-up considerations to this PR to save some time in creating another one. I'm done now :)

@etrepum etrepum requested a review from StyleT May 31, 2024 00:42
Copy link
Contributor

@potatowagon potatowagon left a comment

Choose a reason for hiding this comment

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

thankyou for this

@Sahejkm Sahejkm added this pull request to the merge queue May 31, 2024
Merged via the queue into facebook:main with commit 835e89b May 31, 2024
11 of 13 checks passed
etrepum added a commit to etrepum/lexical that referenced this pull request May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants