-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
[docs] Live editable demos #24640
[docs] Live editable demos #24640
Conversation
faa7831
to
c368013
Compare
c368013
to
33480f4
Compare
Do we really need to maintain 7000 new lines of code when codesandbox, stackblitz, jsbin and countless other solutions already exist? |
The objective is to reproduce the DX you can get on:
I think that it's important. It's about having the inline previews being editable. Opening a CodeSandbox takes ages when you want to quickly test something (it breaks your flow). |
@oliviertassinari You just had no argument in what you said. You just said: We need it because we need it. But why is missing as usual. Note that only one of these examples is valid. 3 of the 4 do not apply because they don't allow one-click csb edit. |
@eps1lon The argument in #24640 (comment) was: CodeSandbox is slow to open. It's too slow when you need to quickly try something out, it breaks the flow. This is the current DX: Jan-27-2021.12-20-01.mp4 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
6e17fec
to
375b225
Compare
Regarding make opening an external editor faster, I have experimented with https://www.skypack.dev/, but it's not here yet skypackjs/skypack-cdn#118. |
@mbrookes Regarding expanding the code editor when clicking the inline preview, I doubt it's an option we can release. The inline preview allows easy copy and paste. It's no longer possible. The scroll position and cursor position state is lost at mouse down. |
Things I have noticed:
|
I now have write access to react-simple-code-editor which should allow releasing fixes upstream as needed. |
351530d
to
d3bb795
Compare
Some outstanding issues, but mostly dependant on upstream fixes, so ready for a first-pass review.
https://deploy-preview-24640--material-ui.netlify.app/components/buttons/
Fix cursor placement when code expands (restricted by react-simple-code-editor.(Instead, don't expand the code on click.)(partly restricted by Jarle).(Fix merged upstream)-webkit-font-smoothing
.Code:
For those keeping score, that's +~300 LOC (~100 of which are copied from another script, and might make sense to merge back).