Improve documentation code preview & versioning #692
Replies: 2 comments
-
Comentários no CSAT de Engenharia em 2023 H1:
|
Beta Was this translation helpful? Give feedback.
-
@lucasaarcoverde Is this discussion still relevant? |
Beta Was this translation helpful? Give feedback.
-
Problem
There are two main issues with our current code playground:
Code edition doesn’t work well
We can’t edit the code because the keyboard pointer is not right, as you can see in the gif below.
Versioning
Every time we have a breaking change the documentation referent to the change breaks and we need to remove the code preview or fix the breaking change in the documentation, and this is hard to maintain.
Why this matters?
The code preview and the playground are one of the most essential parts of the documentation, it’s the place that the developers can use as a reference in their applications. It isn't good the way it is right now.
Proposal
My proposal is to change the code playground with Sandpack, which is already being used in the Template code section.
I did a POC and it seems relatively easy to change from the current one. In this POC you can check the version 0.131.x and 0.135.x on the Alert component. You can check the changes in the code here
Pros
Codesandbox
by defaultCons
What is the change?
Before
After
What's next
Get reviews and comments on this RFC to check if is worth it to follow with the implementation of this solution
Beta Was this translation helpful? Give feedback.
All reactions