- Change from list to environment. This enables the next feature:
- Make $request a promise. websocket$request breaks on some (earlier?) versions
of httpuv. I'm not sure why this is but in the few hours since I submitted
the websocket$request change we've had a number of complaints. This way the
error only occurs if the app actually asks for session$request.
- Make the private session object accessible via `.impl`. Obviously any data or
methods on the private session object are unsupported but they are there if
you are desperate and don't mind possible future breakage.
This makes it possible for packaged Shiny components to only ask
for the session variable to get access to all inputs and outputs
(along with the other good stuff on session).
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)) })
}
))