material-ui-snippets icon indicating copy to clipboard operation
material-ui-snippets copied to clipboard

[idea] Render a visual preview of the snippet

Open oliviertassinari opened this issue 5 years ago • 7 comments

For instance:

Capture d’écran 2020-10-10 à 16 40 43 Capture d’écran 2020-10-10 à 16 42 24

oliviertassinari avatar Oct 10 '20 14:10 oliviertassinari

Yeah that would be cool. I'm pretty swamped with other stuff at the moment, but I'd like to implement this eventually!

jedwards1211 avatar Oct 11 '20 22:10 jedwards1211

There is a related issue opened for icons: https://github.com/mui-org/material-ui/issues/19697.

oliviertassinari avatar Oct 11 '20 22:10 oliviertassinari

Hey @jedwards1211 I can work on it, if you say

https://github.com/vscodeshift/material-ui-snippets/blob/c9ee8a67122f790fc83e1385b0650968e4efe42d/src/extension.ts#L205

arpitBhalla avatar May 03 '21 17:05 arpitBhalla

@oliviertassinari since a lot of the snippets allow you to select the variant it seems like the previews should show all variants, right? There should probably be a way for the snippet to declare other defaults to use for previews...

jedwards1211 avatar May 04 '21 15:05 jedwards1211

I've been slowly working on this. I finally got all the snippets migrated to a JSX-based declaration system I engineered, so that I'm just a few steps away from actually rendering visual previews.

jedwards1211 avatar Sep 29 '21 05:09 jedwards1211

Should we migrate this issue to https://github.com/vscodeshift/mui-snippets? If I understand it correctly, this repository is meant to be legacy.

oliviertassinari avatar Aug 03 '22 18:08 oliviertassinari

Yeah that's right. Since y'all were renaming the package scope from @material-ui to @mui I thought mui-snippets would be a good name for the new repo. The fact that MUI was intended to encompass more than Material UI totally went over my head.

jedwards1211 avatar Aug 04 '22 03:08 jedwards1211