Teal app UI
ui_teal.Rd
This is the main teal UI that puts everything together.
Usage
ui_teal(
id,
splash_ui = tags$h2("Starting the Teal App"),
title = NULL,
header = tags$p(""),
footer = tags$p("")
)
Arguments
- id
(
character(1)
)
module id- splash_ui
shiny.tag
UI to display initially, can be a splash screen or a Shiny module UI. For the latter, seeinit()
about how to call the corresponding server function.- title
(
NULL
orcharacter
)
The browser window title (defaults to the host URL of the page).- header
(
shiny.tag
orcharacter
)
the header of the app. Note shiny code placed here (and in the footer argument) will be placed in the app'sui
function so code which needs to be placed in theui
function (such as loading css viahtmltools::htmlDependency()
) should be included here.- footer
(
shiny.tag
orcharacter
)
the footer of the app
Details
It displays the splash UI which is used to fetch the data, possibly prompting for a password input to fetch the data. Once the data is ready, the splash screen is replaced by the actual teal UI that is tabsetted and has a filter panel with datanames that are relevant for the current tab. Nested tabs are possible, but we limit it to two nesting levels for reasons of clarity of the UI.
The splash screen functionality can also be used for non-delayed data which takes time to load into memory, avoiding Shiny session timeouts.
It is written as a Shiny module so it can be added into other apps as well.
Examples
mods <- teal:::get_dummy_modules()
raw_data <- reactive(teal:::get_dummy_cdisc_data())
app <- shinyApp(
ui = function() {
teal:::ui_teal("dummy")
},
server = function(input, output, session) {
active_module <- teal:::srv_teal(id = "dummy", modules = mods, raw_data = raw_data)
}
)
if (FALSE) {
runApp(app)
}