microstates icon indicating copy to clipboard operation
microstates copied to clipboard

Codesandboxes for documentation examples

Open eandy5000 opened this issue 7 years ago • 9 comments

It would be nice to have live/editable code of the examples in the documentation. I put together a codesandbox of the 'Types and Type Composition' section. If it looks good I'm willing to work on this. Let me know if you want any changes. The link is below.

Types and Type Composition

eandy5000 avatar Nov 15 '18 10:11 eandy5000

That’s a great idea. I like this very much.

taras avatar Nov 15 '18 11:11 taras

@eandy5000 can we talk about using ObservableHQ for our demos instead of CodeSandbox? I think we could move the entire README to one ObservableHQ document.

I created one to show what I mean https://beta.observablehq.com/@taras/microstates-counter

taras avatar Nov 20 '18 12:11 taras

@taras I'm not familiar with ObservableHQ, but I will take a look at your example and see what I can do.

eandy5000 avatar Nov 20 '18 16:11 eandy5000

Take a look at it. We can pair on it to see what it would look like if we had our readme in there.

taras avatar Nov 20 '18 16:11 taras

@taras I took a look at Observable HQ and put together a test of what the Types and Type Composition section might look like. It works pretty well for mixing markdown with code, but it was a little clunky when I checked the page at different screen sizes. Let me know what you think or if you have any suggestions.

Docs test ObservableHQ

eandy5000 avatar Nov 20 '18 18:11 eandy5000

Can we try to combine the runnable code and the code blocks to see what that would look like?

taras avatar Nov 20 '18 18:11 taras

@taras I combined the markup and the code. updated

eandy5000 avatar Nov 20 '18 19:11 eandy5000

~~With the new Content Attachments API from Github, maybe using a code example provider that works with that would be helpful, to get the interactivity right within Github?~~

~~I'm not sure who all supports that now, or will in the future, but it seems like Runkit does already?~~

https://blog.github.com/2018-12-10-introducing-content-attachments-api/

~~I wonder if you need to be part of the beta to see this expanded...~~

https://runkit.com/alexlafroscia/5c17e805317a9a001575879b~~

Edit: Never mind, that all is only for Issues and Pull Requests. Would be neat if you could do an embed in a README too!

alexlafroscia avatar Dec 17 '18 18:12 alexlafroscia

Yeah, that would be sweet.

taras avatar Dec 17 '18 18:12 taras