posit-dev / positron

Positron, a next-generation data science IDE
https://positron.posit.co
Other
2.82k stars 90 forks source link

Add basic support for dependency-having html output in notebooks #5426

Open nstrayer opened 1 day ago

nstrayer commented 1 day ago

Adds support for multi-message requiring html outputs (like hvplot/ bokeh) in notebooks by reusing the same logic we did for #4335.

This one is unfortunately large but hopefully lays the groundwork for future PRs to be smaller.

Non-notebook changes:

The main non-notebook code that was touched was refactoring some of the apis in the PositronNotebookOutputWebviewService to avoid the funky typescript generics previously used in favor of returning webviews of either standard or overlay and using discriminator functions to verify what we expected is what we got. I think this is in general an improvement over the previously unnecessarily complicated interface.

There was a good amount of refactoring by separating things into new files etc that make the diff look a lot bigger than it actually is.

Other misc changes:

Refactoring and Restructuring:

QA Notes

Notebooks should work as before, with the added benefit of now supporting plot types that have preloads like hvplot and bokeh.