-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Add a link to docusaurus.new/ts in Playground page #8734
Conversation
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the deploy preview of this PR
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Support is not complete.
Try the link in a hidden browser session and you get redirected to the playground page.
If it works in your normal session it's just because we persisted your last accessed playground (probably a TS one) in a cookie.
Not sure we should have this feature because it probably means biasing toward using a specific vendor.
@@ -21,4 +21,6 @@ import {PlaygroundCardsRow} from '@site/src/components/Playground'; | |||
|
|||
For convenience, we'll remember your choice next time you visit [docusaurus.new](https://docusaurus.new). | |||
|
|||
If you prefer a TypeScript playground, visit [docusaurus.new/ts](https://docusaurus.new/ts) instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this link doesn't work, there's no configured serverless function to handle it.
Also, how would we automatically choose between Codesandbox and Stackblitz without biasing toward one in particular??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you refer to and reuse the cookie used by the URL without ts
suffix?
I can't believe the existence of people using CodeSandBox for JS and StackBlitz for TS or vice versa.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cookie does not exist on the first visit.
When you first visit /
it simply redirects to the playground page, not a specific sandbox. I could make /ts
redirect to the playground page as well on the first visit if you want. Not sure it's worth it.
Closing for now, because I don't see how to implement this feature without biasing toward a specific vendor (StackBlitz / CodeSandox) which i'd rather avoid |
Pre-flight checklist
Motivation
Most changes in #8685 (comment) have been applied in #8723, but this link is not implemented.
This PR is to show users a link to create a new playground powered by TyepScript.
Test Plan
Test links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs