Accept this as a parameter from the runApp() function and pass it through into the shinysession object so that it can be used in file uploads, downloads, and HTTP image fallbacks on non-websocket browsers.
- If an output is bound in the UI before it exists on the server, the
server will suspend the new output until something else causes
manageHiddenOutputs to be triggered. The refactor in shiny.R sets
the suspended flag to .shouldSuspend.
- As part of the previous refactor, we don't set suspendOnHidden in
defineOutput; instead we leave it empty and .shouldSuspend knows
what the default should be.
- In shiny.js, unbound controls were not being suspended. This was
fixed by having sendOutputHiddenState be stateful; anything in
a visible state that disappears on the next iteration is marked
as hidden. Also unbindAll now calls sendOutputHiddenState.
With this commit, runApp can now accept a list instead of a path.
This list should have elements named "ui" and "server" that contain
what would normally go in shinyUI and shinyServer, respectively.
(Note that there is no equivalent to global.R, nor should there
need to be since you can just directly execute in the global env
before calling runApp.)
Example:
runApp(list(
ui = bootstrapPage(
numericInput('n', 'Number of obs', 100),
plotOutput('plot')
),
server = function(input, output) {
output$plot <- renderPlot({ hist(runif(input$n)) })
}
))
Observers can now take priority levels, which allow the user to control
the order of execution. Note that reactive expressions do not have
priority levels; since they are lazily evaluated, it wouldn't make any
sense to speak of priorities.
Another commit will be needed to add an API for changing the priorities
of outputs (probably in outputOptions?).