nteract / vdom

🎄 Virtual DOM for Python
https://github.com/nteract/vdom/blob/master/docs/mimetype-spec.md
BSD 3-Clause "New" or "Revised" License
221 stars 34 forks source link

Usage question in jupyter notebook #78

Closed mathisonian closed 5 years ago

mathisonian commented 5 years ago

👋 Hi all - thanks for this library.

I have a question about just basic usage within a Python Jupyter notebook environment. I attempting to make a library that uses VDOM internally in order to have objects produce rich output in the notebook. I'm trying to have Jupyter render HTML when a certain function is called on an object, which I can do fine using the render( HTML(...) ) functions that come from the IPython module.

However, if I try to do the same using vdom, (e.g. render(div(...))) I just see the string <div /> rendered to the output area. I've tried other forms of the invocation (render(HTML(div(...))), just div(), etc), but none seem to actually render anything.

Apologies in advance if I'm missing something obvious!

rgbkrk commented 5 years ago

We haven't shipped the version on master that will output text/html for the classic notebook yet, mostly due to some major new features for event handling (that won't get supported in the html views).

Think we're ready to ship @gnestor?

rgbkrk commented 5 years ago

By the way, I'm in Seattle all this week in case you're able to meet up in the evening. 😄

mathisonian commented 5 years ago

Hey, that would be great! Twitter DM for logistics?

gnestor commented 5 years ago

@rgbkrk Ya, things are working nicely with vdom@master + @nteract/transform-vdom@master + @jupyterlab/vdom-extension@gnestor/vdom-events-demo, so it should be fine to publish a new version of vdom (and @nteract/transform-vdom).

rgbkrk commented 5 years ago

Shipped 0.6! Please shake out any loose bugs. ❤️

Let's not delay on release again. 😅