thefrontside/microstates

Codesandboxes for documentation examples

eandy5000 opened this issue · 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

taras commented

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

taras commented

@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 I'm not familiar with ObservableHQ, but I will take a look at your example and see what I can do.

taras commented

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 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

taras commented

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

@taras I combined the markup and the code.
updated

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!

taras commented

Yeah, that would be sweet.