Upgrade notes for Shiny 1.4.0

Full changelog

Breaking changes

  • Resolved #2554: Upgraded jQuery from v.1.12.4 to v3.4.1 and bootstrap from v3.3.7 to v3.4.1. (#2557). Since the jQuery upgrade may introduce breaking changes to user code, there is an option to switch back to the old version by setting options(shiny.jquery.version = 1). If you’ve hard-coded shared/jquery[.min].js in the HTML of your Shiny app, in order to downgrade, you’ll have to change that filepath to shared/legacy/jquery[.min].js.

Improvements

  • Resolved #1433: plotOutput()’s coordmap info now includes discrete axis limits for ggplot2 plots. As a result, any shinytest tests that contain ggplot2 plots with discrete axes (that were recorded before this change) will now report differences that can safely be updated. This new coordmap info was added to correctly infer what data points are within an input brush and/or near input click/hover in scenarios where a non-trivial discrete axis scale is involved (e.g., whenever scale_[x/y]_discrete(limits = ...) and/or free scales across multiple discrete axes are used). (#2410)

  • Resolved #2402: An informative warning is now thrown for mis-specified (date) strings in dateInput(), updateDateInput(), dateRangeInput(), and updateDateRangeInput(). (#2403)

  • If the shiny.autoload.r option is set to TRUE, all files ending in .r or .R contained in a directory named R/ adjacent to your application are sourced when your app is started. This will become the default Shiny behavior in a future release (#2547)

  • Resolved #2442: The shiny:inputchanged JavaScript event now triggers on the related input element instead of document. Existing event listeners bound to document will still detect the event due to event bubbling. (#2446)

  • Fixed #1393, #2223: For plots with any interactions enabled, the image is no longer draggable. (#2460)

  • Resolved #2469: renderText now takes a sep argument that is passed to cat. (#2497)

  • Added resourcePaths() and removeResourcePaths() functions. (#2459)

  • Resolved #2433: An informative warning is now thrown if subdirectories of the app’s www/ directory are masked by other resource prefixes and/or the same resource prefix is mapped to different local file paths. (#2434)

  • Resolved #2478: cmd + shift + f3 and ctrl + shift + f3 can now be used to add a reactlog mark. If reactlog keybindings are used and the reactlog is not enabled, an error page is displayed showing how to enable reactlog recordings. (#2560)

Bug fixes

  • Partially resolved #2423: Reactivity in Shiny leaked some memory, because R can leak memory whenever a new symbols is interned, which happens whenever a new name/key is used in an environment. R now uses the fastmap package, which avoids this problem. (#2429)

  • Fixed #2267: Fixed a memory leak with invalidateLater. (#2555)

  • Fixed #1548: The reactivePoll function leaked an observer; that is the observer would continue to exist even if the reactivePoll object was no longer accessible. #2522

  • Fixed #2116: Fixed an issue where dynamic tabs could not be added when on a hosted platform. (#2545)

  • Resolved #2515: selectInput() and selectizeInput() now deal appropriately with named factors. Note that updateSelectInput() and updateSelectizeInput() do not yet handle factors; their behavior is unchanged. (#2524, #2540, #2625)

  • Resolved #2471: Large file uploads to a Windows computer were slow. (#2579)

  • Fixed #2387: Updating a sliderInput()’s type from numeric to date no longer changes the rate policy from debounced to immediate. More generally, updating an input binding with a new type should (no longer) incorrectly alter the input rate policy. (#2404)

  • Fixed #868: If an input is initialized with a NULL label, it can now be updated with a string. Moreover, if an input label is initialized with a string, it can now be removed by updating with label=character(0) (similar to how choices and selected can be cleared in updateSelectInput()). (#2406)

  • Fixed #2250: updateSliderInput() now works with un-specified (or zero-length) min, max, and value. (#2416)

  • Fixed #2396: selectInput("myID", ...) resulting in an extra myID-selectized input (introduced in v1.2.0). (#2418)

  • Fixed #2233: verbatimTextOutput() produced wrapped text on Safari, but the text should not be wrapped. (#2353)

  • Fixed #2335: When dateInput()’s value was unspecified, and max and/or min was set to Sys.Date(), the value was not being set properly. (#2526)

  • Fixed #2591: Providing malformed date-strings to min or max no longer results in JS errors for dateInput() and dateRangeInput(). (#2592)

  • Fixed rstudio/reactlog#36: Changes to reactive values not displaying accurately in reactlog. (#2424)

  • Fixed #2598: Showcase files don’t appear with a wide window. (#2582)

  • Fixed #2329, #1817: These bugs were reported as fixed in Shiny 1.3.0 but were not actually fixed because some JavaScript changes were accidentally not included in the release. The fix resolves issues that occur when withProgressBar() or bookmarking are combined with the networkD3 package’s Sankey plot.