Upgrade notes for Shiny 1.0.1
This is a maintenance release of Shiny, mostly aimed at fixing bugs and introducing minor features. The most notable additions in this version of Shiny are the introduction of the reactiveVal() function (it’s like reactiveValues(), but it only stores a single value), and that the choices of radioButtons() and checkboxGroupInput() can now contain HTML content instead of just plain text.
Full changelog
Breaking changes
- The functions
radioButtons(),checkboxGroupInput()andselectInput()(and the correspondingupdateXXX()functions) no longer accept aselectedargument whose value is the name of a choice, instead of the value of the choice. This feature had been deprecated since Shiny 0.10 (it printed a warning message, but still tried to match the name to the right choice) and it’s now completely unsupported.
New features
- Added
reactiveValfunction, for storing a single value which can be (reactively) read and written. Similar toreactiveValues, except thatreactiveValjust lets you store a single value instead of storing multiple values by name. (#1614)
Minor new features and improvements
Addressed #1348 and #1437 by adding two new arguments to
radioButtons()andcheckboxGroupInput():choiceNames(list or vector) andchoiceValues(list or vector). These can be passed in as an alternative tochoices, with the added benefit that the elements inchoiceNamescan be arbitrary UI (i.e. anything created byHTML()and thetags()functions, like icons and images). While the underlying values for each choice (passed in throughchoiceValues) must still be simple text, their visual representation on the app (what the user actually clicks to select a different option) can be any valid HTML element. See?radioButtonsfor a small example. (#1521)Updated
tools/README.mdwith more detailed instructions. (##1616)Fixed #1565, which meant that resources with spaces in their names return HTTP 404. (#1566)
Exported
session$user(if it exists) to the client-side; it’s accessible in the Shiny object:Shiny.user. (#1563)Added support for HTML5’s
pushStatewhich allows for pseudo-navigation in shiny apps. For more info, see the documentation (?updateQueryStringand?getQueryString). (#1447)Fixed #1121: plot interactions with ggplot2 now support
coord_fixed(). (#1525)Added
snapshotExcludefunction, which marks an output so that it is not recorded in a test snapshot. (#1559)Added
shiny:filedownloadJavaScript event, which is triggered when adownloadButtonordownloadLinkis clicked. Also, the values ofdownloadHandlers are not recorded in test snapshots, because the values change every time the application is run. (#1559)Added support for plot interactions with ggplot2 > 2.2.1. (#1578)
Fixed #1577: Improved
escapeHTML(util.js) in terms of the order dependency of replacing, XSS risk attack and performance. (#1579)The
shiny:inputchangedJavaScript event now includes two new fields,bindingandel, which contain the input binding and DOM element, respectively. Additionally,Shiny.onInputChange()now accepts an optional argument,opts, which can contain the same fields. (#1596)The
NS()function now returns a vectorized function. (#1613)Fixed #1617:
fileInputcan have customized text for the button and the placeholder. (#1619)
Bug fixes
Fixed #1511:
fileInputs did not trigger theshiny:inputchangedevent on the client. Also removedshiny:fileuploadedJavaScript event, because it is no longer needed after this fix. (#1541, #1570)Fixed #1472: With a Progress object, calling
set(value=NULL)made the progress bar go to 100%. Now it does not change the value of the progress bar. The documentation also incorrectly said that setting thevaluetoNULLwould hide the progress bar. (#1547)Fixed #162: When a dynamically-generated input changed to a different
inputType, it might be incorrectly deduplicated. (#1594)Removed redundant call to
inputs.setInput. (#1595)Fixed bug where
dateRangeInputdid not respectweekstartargument. (#1592)Fixed #1598:
setBookmarkExclude()did not work properly inside of modules. (#1599)Fixed #1605: sliders did not move when clicked on the bar area. (#1610)
Fixed #1621: if a
reactiveTimer’s session was closed before the first time that thereactiveTimerfired, then thereactiveTimerwould not get cleared and would keep firing indefinitely. (#1623)