Releases: ramnathv/htmlwidgets
htmlwidgets 1.6.4
This release reverts the change made in v1.6.3 (to no longer recurse into list-like objects when searching for JavaScript strings wrapped in JS()
). Although that change helped prevent infinite recursion in some cases, it ultimately broke too many existing widgets that relied on the previous behavior. If you encounter infinite recursion errors ("C stack usage is too close to the limit"), the best strategy is to coerce the offending items to a character string. (#478)
htmlwidgets 1.6.3
Potentially breaking changes
- Closed #466: htmlwidgets no longer recurses into list-like objects when searching for JavaScript strings wrapped in
JS()
, unless the object has the class"list"
or"data.frame"
. This stops htmlwidgets from (possibly infinitely) recursively searching objects that are not actually recursive. Widget authors who relied on the previous behavior should ensure that their widget'sJS()
calls are wrapped in objects that have the class"list"
or"data.frame"
. (#467)
htmlwidgets 1.6.2
htmlwidgets 1.6.1
htmlwidgets 1.6.0
htmlwidgets 1.6.0
Potentially breaking changes
shinyWidgetOutput()
andsizingPolicy()
both gain a newfill
parameter. WhenTRUE
(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 withhtmltools::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 afill
argument to thecustomWidgetOutput()
function signature).
- The primary motivation for this is to allow widgets to grow/shrink by default inside
shinyWidgetOutput()
'sreportSize
argument now defaults toTRUE
. This way, callingshiny::getCurrentOutputInfo()
inside ashinyRenderWidget()
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)
htmlwidgets 1.5.4
v1.5.3
New features
-
Added a
reportTheme
argument toshinyWidgetOutput()
. IfTRUE
, CSS styles of the widget's output container are made available toshiny::getCurrentOutputInfo()
, making it possible to provide 'smart' styling defaults in arenderWidget()
context. (#361) -
shinyRenderWidget()
now has acacheHint
parameter, for use with Shiny's newbindCache()
function. (#391) -
Support a new
PACKAGE::widget_html.WIDGETNAME
convention for defining custom widget HTML. This replaces the earlierPACKAGE::WIDGETNAME_html
convention, which continues to work but may be deprecated at some point in the future. The goal for the new convention is to prevent accidentally matching functions that were never intended for this purpose. (Thanks, @thebioengineer!) (#376) -
Export the
JSEvals
function, allowing other packages to supportJS()
in non-widget contexts.