Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

723 default header@main #824

Merged
merged 5 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* Removed deprecated functions: `root_modules`, `default_filter`, `bookmarkableShinyApp`, as well as deprecated logging mechanism, including the functions `log_app_usage` and `.log`.
* Updated the "Teal and Bootstrap Themes" vignette to provide more details customizing a `teal` app with `bslib::run_with_themer`.
* Removed outdated diagram from `srv_nested_tabs` documentation.
* Changed default values of `header` and `footer` arguments in `init` to empty text.

# teal 0.12.0

Expand Down
12 changes: 7 additions & 5 deletions R/init.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@
#' By adding the `filterable` attribute it is possible to control which variables can be filtered for each
#' dataset. See the example below where `ADSL` can only be filtered by `AGE`, `SEX` or `RACE`.
#'
#' @param header (`character` or `shiny.tag`) \cr
#' @param header (`shiny.tag` or `character`) \cr
#' the header of the app. Note shiny code placed here (and in the footer
#' argument) will be placed in the app's `ui` function so code which needs to be placed in the `ui` function
#' (such as loading css via [htmltools::htmlDependency()]) should be included here.
#' @param footer (`character` or `shiny.tag`)\cr
#' @param footer (`shiny.tag` or `character`)\cr
#' the footer of the app
#' @param id (`character`)\cr
#' module id to embed it, if provided,
Expand Down Expand Up @@ -155,17 +155,19 @@ init <- function(data,
modules,
title = NULL,
filter = list(),
header = tags$p("Add Title Here"),
footer = tags$p("Add Footer Here"),
header = tags$p(),
footer = tags$p(),
id = character(0)) {
logger::log_trace("init initializing teal app with: data ({ class(data)[1] }).")
data <- teal.data::to_relational_data(data = data)

checkmate::assert_string(title, null.ok = TRUE)
checkmate::assert_class(data, "TealData")
checkmate::assert_multi_class(modules, c("teal_module", "list", "teal_modules"))
checkmate::assert_string(title, null.ok = TRUE)
checkmate::assert_list(filter, min.len = 0, names = "unique")
checkmate::assert_subset(names(filter), choices = teal.data::get_dataname(data))
checkmate::assert_multi_class(header, c("shiny.tag", "character"))
checkmate::assert_multi_class(footer, c("shiny.tag", "character"))
checkmate::assert_character(id, max.len = 1, any.missing = FALSE)

teal.logger::log_system_info()
Expand Down
8 changes: 4 additions & 4 deletions man/init.Rd

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

4 changes: 2 additions & 2 deletions man/ui_teal.Rd

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

4 changes: 2 additions & 2 deletions man/ui_teal_with_splash.Rd

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