-
Notifications
You must be signed in to change notification settings - Fork 13
flag for ignoring some component playground text when rendering a code block #33
Comments
The upside with an implementation that puts the responsibility on the documentation author to define any additional component behaviors is that we don't have to add any features to Ecology or Component Playground (other than perhaps un-deprecating I can see a couple of downsides, though:
An alternative solution is to add features to Ecology that allows modifying the source before passing it to component-playground, and that renders additional UI:
@kenwheeler do you have some bright flash of insight into this? |
@coopy What if we provided a wrapper component via scope, and provided a way to reference it using a regexable pattern in the first line of the code text? Like:
|
Then again, because we'd be concatting, we'd then also have to probably add a template marker in the wrapper for where the wrapped code is inserted. Slippery slope. |
What if we simply wrote an example with a wrapper component including data sources that passes data to the Victory component, letting it all hang out in the rendered example code block? It would be an easy win and would give us an idea of whether we need to hide the non-VIctory stuff in the docs. |
The actual definition of the wrapper component would just be passed in |
That would totally work |
@paulathevalley Let's do it this minimal-style ^ for a selected victory component first to see what it looks like. We'll write a |
Define and render arbitrary components inside a ```playground_no_render... code block without them showing up in the rendered block of source code. This would give us the ability to do things like display a dropdown to determine props, add an export to gist button, etc without having to show the code responsible in the docs, and without having to add a bunch of specialized functionality to ecology.
credit for this idea belongs to @paulathevalley
The text was updated successfully, but these errors were encountered: