Skip to content

htmlwidgets 1.6.0

Compare
Choose a tag to compare
@cpsievert cpsievert released this 15 Dec 15:57
· 30 commits to master since this release

htmlwidgets 1.6.0

Potentially breaking changes

  • shinyWidgetOutput() and sizingPolicy() both gain a new fill parameter. When TRUE (the default), the widget's container element is allowed to grow/shrink to fit it's parent container so long as that parent is opinionated about its height and has been marked with htmltools::bindFillRole(x, container = TRUE). (#442)
    • The primary motivation for this is to allow widgets to grow/shrink by default inside bslib::card_body_fill()
    • Widgets that aren't designed to fill their container in this way should consider setting sizingPolicy(fill = FALSE)/shinyWidgetOutput(fill = FALSE) and/or allowing users to customize these settings (i.e., add a fill argument to the customWidgetOutput() function signature).
  • shinyWidgetOutput()'s reportSize argument now defaults to TRUE. This way, calling shiny::getCurrentOutputInfo() inside a shinyRenderWidget() context will report the current height and width of the widget.

Improvements

  • Closed #433 and #440: saveWidget(selfcontained=TRUE) now uses the {rmarkdown} package to discover and call pandoc, which fixes a couple existing issues and helps "future proof" this code path from future changes to pandoc.
  • Closed #257 and #358: saveWidget(selfcontained=TRUE) now correctly prevents HTML from being interpreted as markdown. (#401)