Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 10 commits into from
Nov 26, 2024

Conversation

nstrayer
Copy link
Contributor

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:

  • Now cells have a simple animation when they're running

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.

@nstrayer nstrayer requested a review from seeM November 20, 2024 18:41
@nstrayer nstrayer force-pushed the notebook-multimessage-webview branch 3 times, most recently from 0883cec to d800f87 Compare November 22, 2024 16:59
@nstrayer nstrayer marked this pull request as ready for review November 22, 2024 18:25
@nstrayer nstrayer force-pushed the notebook-multimessage-webview branch from d800f87 to 0e0ef87 Compare November 25, 2024 17:06
@nstrayer nstrayer force-pushed the notebook-multimessage-webview branch from 0e0ef87 to dd151e4 Compare November 25, 2024 18:21
Copy link
Contributor

@seeM seeM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that hvplot with plotly extension does work:

image

It doesn't reliably work every time but I think we should get this in and address remaining issues in follow-up work.

Copy link
Contributor

@seeM seeM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This enables web-based plots in the new UI as advertised! I took a quick glance over the code and it LGTM.

@nstrayer nstrayer merged commit be40fbb into main Nov 26, 2024
4 checks passed
@nstrayer nstrayer deleted the notebook-multimessage-webview branch November 26, 2024 14:59
@github-actions github-actions bot locked and limited conversation to collaborators Nov 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants