[internal] Add playground#29423
Conversation
0dba714 to
1418421
Compare
|
One question, |
It does currently https://deploy-preview-29423--material-ui.netlify.app/playground.example. We can remove it from the export. |
|
I have another way of adding the playground (without committing the file to docs). We can try hygen. The flow is something like this:
In the future, we can use this method to create other templates, not only about the docs playground. @oliviertassinari Can I try this? I would like to use the playground when developing Joy also. |
|
@siriwatknp I leave this question to @flaviendelangle, as he was iterating on the playground too. To be clear, the objective of the playground was to be one isolated blank page. If the objective is to avoid page generation when we deploy, I think that I have a one-line fix. Personally, I think that we can have a
Speaking of which, I think that there is another issue, the _app.js injects the MUI branding by default, IMHO, it's shouldn't, it breaks the isolation property. |
|
We could ignore But for the global idea, I am in favor of keeping things simple. I'm not sure introducing a new tool is useful right now. |
Fine for me. 👍 |
|
@siriwatknp I will follow up on this as I wasn't done. I still need to 1. Update the contribution guide 2. disable the static generation of the template page. |
|
We could also add playground.js to gitignore, for even dirtier playgrounds without type checking. |
This is a continuation of mui/mui-x#3057. I have been using the following workflow for as long as I can remember since we have the Next.js documentation (for 3 years?):
/docs/pages/index.tsx, copy and paste the component I need to work onSince then, I haven't found anything better. For instance, editing demos in the documentation was feeling slower. However, this approach has one important downside, I had to make sure I wasn't committing
/docs/pages/index.tsx. This was painful.This PR is about improving this and sharing the pattern with this possible workflow with the rest of the team. Now, we can copy the
/docs/pages/playground.example.tsxfile into/docs/pages/playground.tsxand make all the changes we want in http://0.0.0.0:3000/playground without having to care about git.