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.
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.
|
|
||
| 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.
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.
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.
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