Releases: rstudio/shiny
shiny 1.8.0
Breaking changes
- Closed #3899: The JS function
Shiny.bindAll()is now asynchronous. This change is driven by the recent push toward making dynamic UI rendering asynchronous, which is necessary for shinylive (and should've happened when it was first introduced in Shiny v1.7.5). The vast majority of existingShiny.bindAll()uses should continue to work as before, but some cases may break if downstream code relies on it being synchronous (i.e., blocking the main thread). In this case, consider placing any downstream code in a.then()callback (orawaitthe result in aasyncfunction). (#3929)- Since
renderContent()callsbindAll()(after it inserts content), it now returns aPromise<void>instead ofvoid, which can be useful if downstream code needs to wait for the binding to complete.
- Since
New features and improvements
-
Updated
selectizeInput()'s selectize.js dependency from v0.12.4 to v0.15.2. In addition to many bug fixes and improvements, this update also adds several new plugin options. (#3875) -
Shiny's CSS styling (for things like
showNotification(),withProgress(),inputPanel(), etc.), has been updated with{bslib}'s upcoming CSS-only dark mode feature in mind. (#3882, #3914) -
Default styles for
showNotification()were tweaked slightly to improve accessibility, sizing, and padding. (#3913) -
Shiny inputs and
{htmlwidgets}are no longer treated as draggable inside ofabsolutePanel()/fixedPanel()withdraggable = TRUE. As a result, interactions like zooming and panning now work as expected with widgets like{plotly}and{leaflet}when they appear in a draggable panel. (#3752, #3933) -
For
InputBindings, the.receiveMessage()method can now be asynchronous or synchronous (previously it could only be synchronous). (#3930)
Bug fixes
shiny 1.7.5.1
Bug fixes
- On r-devel (R > 4.3.1),
isTruthy(NULL)now returnsFALSE(as it does with older versions of R). (#3906)
shiny 1.7.5
Possibly breaking changes
-
For
reactiveValues()objects, whenever the$names()or$values()methods are called, the keys are now returned in the order that they were inserted. (#3774) -
The value provided to
options(shiny.json.digits)is now interpreted as number of digits after the decimal instead of significant digits. To treat the value as significant digits, wrap it inI()(e.g.,options(shiny.json.digits = I(4))). This new default behavior not only helps with reducing digits in testing snapshots, but is also more consistent with{jsonlite}'s default behavior. (#3819)
New features and improvements
-
Closed #789: Dynamic UI is now rendered asynchronously, thanks in part to the newly exported
Shiny.renderDependenciesAsync(),Shiny.renderHtmlAsync(), andShiny.renderContentAsync(). Importantly, this means<script>tags are now loaded asynchronously (the old way usedXMLHttpRequest, which is synchronous). In addition,Shinynow manages a queue of async tasks (exposed viaShiny.shinyapp.taskQueue) so that order of execution is preserved. (#3666) -
Fixes #3840:
updateSliderInput()now warns when attempting to set invalidmin,max, orvaluevalues. Sending an invalid update message to an input no longer causes other update messages to fail. (#3843) -
sliderInput()now has a larger target area for clicking or tapping on the slider handle or range. (#3859) -
Closed #2956: Component authors can now prevent Shiny from creating an input binding on specific elements by adding the
data-shiny-no-bind-inputattribute to the element. The attribute may have any or no value; its presence will prevent binding. This feature is primarily useful for input component authors who want to use standard HTML input elements without causing Shiny to create an input binding for them. Additionally, Shiny now adds custom classes to its inputs. For example,checkboxInput()now has ashiny-input-checkboxclass. These custom classes may be utilized in future updates to Shiny's input binding logic. (#3861) -
Mapobjects are now initialized at load time instead of build time. This avoids potential problems that could arise from storingfastmapobjects into the built Shiny package. (#3775)