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

Feature request: Change HTMLWidgets.shinyMode to integers 0, 1, 2... #421

Open
dipterix opened this issue Oct 18, 2021 · 0 comments
Open

Comments

@dipterix
Copy link

dipterix commented Oct 18, 2021

Recently I was trying to render the htmlwidgets in rmarkdown with shinyrmd runtime, but then I encountered rendering errors.

The reason is because when rendered in shinyrmd or shiny_prerendered runtime, Shiny has invalid onInputChanged method. This will invalidate many widgets that are expecting this feature, for example, visNetwork and threeBrain, etc. are expecting to communicate with shiny, which will definitely fail.

Please see more details from this issue: rstudio/rmarkdown#2232

I was wondering if HTMLWidgets.shinyMode could be integers such that:

  • HTMLWidgets.shinyMode=0 means no shiny is detected
  • HTMLWidgets.shinyMode=1 means shiny is detected and is in normal dashboard mode or shiny runtime in rmarkdowns
  • HTMLWidgets.shinyMode=2 means shiny is detected but rendered in rmarkdown with shinyrmd or shiny_prerendered runtime

If this change could break many packages, when maybe add HTMLWidgets.runtimeMode?

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

No branches or pull requests

1 participant