Skip to content

Better htmlwidget support#1215

Open
thomasp85 wants to merge 6 commits into
mainfrom
native-HTML-widget
Open

Better htmlwidget support#1215
thomasp85 wants to merge 6 commits into
mainfrom
native-HTML-widget

Conversation

@thomasp85
Copy link
Copy Markdown
Collaborator

Fix #1034

This PR adds proper htmlwidget support for notebooks and inline quarto content. It follows suggestion 2 from @jmcphers and inlines the html directly, like the IRKernel. The reasons for this is mainly that supporting Jupyter Widgets would be a substantial addition with no user-visible upside since the one thing it provides (bidirectional communication) isn't possible with htmlwidgets anyway. If a compelling use case for bidirectional communication comes up we can revisit it.

We don't need pandoc or any other heavy dependency because the html is trivial to construct.

One wrinkle is that IRKernel defaults to deduplicating html dependencies from consecutive cells. This facility also exist in this PR but since Positrons notebook view renders each cell in isolation. Due to that the default for ark is to not deduplicate.

All changes only has an effect for notebooks. The standard path for viewer/plot pane remains unchanged

@thomasp85 thomasp85 marked this pull request as draft May 13, 2026 21:11
@thomasp85 thomasp85 marked this pull request as ready for review May 21, 2026 07:42
@thomasp85 thomasp85 requested a review from DavisVaughan May 21, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In notebook mode, emit HTML widgets as static, embeddable HTML

1 participant