keller-mark / anyhtmlwidget

Bringing core concepts from anywidget to R
https://keller-mark.github.io/anyhtmlwidget/
Other
5 stars 0 forks source link

Implement widget as Viewer-pane Shiny app #3

Closed keller-mark closed 1 month ago

keller-mark commented 2 months ago

Should the user need to opt-in when creating the widget? Or should this be the only supported mechanism for rendering the widget? Or opt-out?

Should probably keep the plain htmlwidgets option for scenarios like widgets embedded in pkgdown sites where the widget needs to become static (no R process to run the Shiny server)

keller-mark commented 1 month ago

The problem is that this results in the R Console hanging while the widget runs... I don't think there is a way around this.

The shiny app can be launched via rstudioapi run as background job but then the app has no way to connect to the Viewer pane.

keller-mark commented 1 month ago

I think the solution is to allow the user to select between multiple scenarios when running the widget: