Skip to content

Commit

Permalink
Merge branch 'main' into update-bslib-snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert authored Nov 29, 2023
2 parents f00bd9f + dbbe7f9 commit 92fb7a6
Show file tree
Hide file tree
Showing 26 changed files with 14,962 additions and 9,749 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: shiny
Type: Package
Title: Web Application Framework for R
Version: 1.7.5.9001
Version: 1.8.0.9000
Authors@R: c(
person("Winston", "Chang", role = c("aut", "cre"), email = "winston@posit.co", comment = c(ORCID = "0000-0002-1576-2126")),
person("Joe", "Cheng", role = "aut", email = "joe@posit.co"),
Expand Down
12 changes: 10 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# shiny (development version)

## Possibly breaking changes
## New features and improvements

* Added an console that shows some errors in the browser. Also provide better error messages for duplicate input and output bindings. (#3931)

* Closed #3899: The JS function `Shiny.bindAll()` is now asynchronous. This change is driven by the recent push toward making dynamic UI rendering asynchronous (and should've happened when it was first introduced in Shiny v1.7.5). The vast majority of existing `Shiny.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 (or `await` the result in a `async` function). (#3929)
# 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](https://shinylive.io/r) (and should've happened when it was first introduced in Shiny v1.7.5). The vast majority of existing `Shiny.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 (or `await` the result in a `async` function). (#3929)
* Since `renderContent()` calls `bindAll()` (after it inserts content), it now returns a `Promise<void>` instead of `void`, which can be useful if downstream code needs to wait for the binding to complete.

## New features and improvements
Expand All @@ -13,6 +19,8 @@

* 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 of `absolutePanel()`/`fixedPanel()` with `draggable = 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 `InputBinding`s, the `.receiveMessage()` method can now be asynchronous or synchronous (previously it could only be synchronous). (#3930)

## Bug fixes
Expand Down
20 changes: 12 additions & 8 deletions R/jqueryui.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,20 @@ absolutePanel <- function(...,

style <- paste(paste(names(cssProps), cssProps, sep = ':', collapse = ';'), ';', sep='')
divTag <- tags$div(style=style, ...)
if (isTRUE(draggable)) {
divTag <- tagAppendAttributes(divTag, class='draggable')
return(tagList(
divTag,
jqueryuiDependency(),
tags$script('$(".draggable").draggable();')
))
} else {

if (identical(draggable, FALSE)) {
return(divTag)
}

# Add Shiny inputs and htmlwidgets to 'non-draggable' elements
# Cf. https://api.jqueryui.com/draggable/#option-cancel
dragOpts <- '{cancel: ".shiny-input-container,.html-widget,input,textarea,button,select,option"}'
dragJS <- sprintf('$(".draggable").draggable(%s);', dragOpts)
tagList(
tagAppendAttributes(divTag, class='draggable'),
jqueryuiDependency(),
tags$script(HTML(dragJS))
)
}

#' @rdname absolutePanel
Expand Down
2 changes: 1 addition & 1 deletion inst/www/shared/selectize/js/selectize.js
Original file line number Diff line number Diff line change
Expand Up @@ -2757,7 +2757,7 @@ Selectize.defaults = {
maxItems: null,
hideSelected: null,
addPrecedence: false,
selectOnTab: true,
selectOnTab: false,
preload: false,
allowEmptyOption: false,
showEmptyOptionInDropdown: false,
Expand Down
2 changes: 1 addition & 1 deletion inst/www/shared/selectize/js/selectize.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/www/shared/shiny-autoreload.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/www/shared/shiny-showcase.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inst/www/shared/shiny-showcase.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/www/shared/shiny-testmode.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 92fb7a6

Please sign in to comment.