Sounds good.
I think there are four major gaps that I see at the moment.
(Although some of these may be gaps in my knowledge)
- An inability to create notebooks programmatically.
- An inability to create suggestions for notebooks programmatically.
- An inability to generate things like markdown programmatically.
- An inability to do static es6 module imports.
I’ve been trying out observable with an eye toward using it for documentation and examples.
So to do this, I tried to import the es6 modules of the system to be able to run in observable.
The first roadblock I hit was that you cannot do a static import of an es6 module, and the dynamic import will provide a single variable containing the module.
In order to destructure this module to allow notebooks to use static imports I needed to create a notebook containing the dynamic import, and then one cell per entry to make them individually available for static import via notebook.
This isn’t so terrible for one module, I guess, because it’s a reasonable place to add per module entry documentation, but being able to automate it would make it easier to keep things in sync.
But needing to do this for a significant number of modules becomes a problem – either you need to indirect via Foo.bar, or you need to keep a destructuring notebook up to date.
And this becomes more of an issue when you’re publishing additional modules in various repositories which effectively extend the base api – for example, a gear generation library.
Another thing I’m interested in with respect to observable is producing step-by-step instructions.
It would be great if I could use a little meta-data and then create a notebook which talks about how to do something, shows diagrams, and makes files available for download.
(Do downloadable cell values exist in general? I’ve seen some which offer download, but haven’t seen documentation for how it works yet)
This would require an API to create notebooks, and one to create suggestions to keep the content in sync.
(Or, I guess a function to dynamically create cells?)
Speaking of which, I tried to create a function to reproduce the builtin md# foo
behavior, using { return md(’# foo’); }, but it did not work – is there a way to call the builtins or produce cell output that should be treated as markdown?
(I figured out that returning a canvas was sufficient to display it, but don’t see how to generalize this for other cases).
I expect that programmatic interfaces aren’t high on the priority list, but it would be nice to understand how much of the above makes sense, and how well it fits with the vision for observable.
Thanks.