diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index c3d974db4..7842a7d55 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -1001,9 +1001,8 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl if (with_reporter) { card_fun <- function(comment, label) { card <- card_template( - title = "PCA Plot", + title = "Principal Component Analysis Plot", label = label, - description = "Principal Component Analysis Plot", with_filter = with_filter, filter_panel_api = filter_panel_api ) diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index 7580187c1..d6f9c54fc 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -873,7 +873,6 @@ srv_a_regression <- function(id, card <- card_template( title = "Linear Regression Plot", label = label, - description = NULL, with_filter = with_filter, filter_panel_api = filter_panel_api ) diff --git a/R/tm_g_association.R b/R/tm_g_association.R index 1958f900f..c883a52c8 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -462,11 +462,9 @@ srv_tm_g_association <- function(id, card <- card_template( title = "Association Plot", label = label, - description = NULL, with_filter = with_filter, filter_panel_api = filter_panel_api ) - if (with_filter) card$append_fs(filter_panel_api$get_filter_state()) card$append_text("Plot", "header3") card$append_plot(plot_r(), dim = pws$dim()) if (!comment == "") { diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index 04a4c7d1e..8d70cfb0b 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -624,7 +624,6 @@ srv_g_bivariate <- function(id, card <- card_template( title = "Bivariate Plot", label = label, - description = NULL, with_filter = with_filter, filter_panel_api = filter_panel_api ) diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index 65af8cd6a..11100edda 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -1229,7 +1229,6 @@ srv_distribution <- function(id, card <- card_template( title = "Distribution Plot", label = label, - description = NULL, with_filter = with_filter, filter_panel_api = filter_panel_api ) diff --git a/R/tm_g_response.R b/R/tm_g_response.R index 670e3adfd..0c0872ce0 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -480,7 +480,6 @@ srv_g_response <- function(id, card <- card_template( title = "Response Plot", label = label, - description = NULL, with_filter = with_filter, filter_panel_api = filter_panel_api ) diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index caa489f9a..a96ae3e13 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -952,7 +952,6 @@ srv_g_scatterplot <- function(id, card <- card_template( title = "Scatter Plot", label = label, - description = NULL, with_filter = with_filter, filter_panel_api = filter_panel_api ) diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index f2225728a..3758bd272 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -357,7 +357,6 @@ srv_g_scatterplotmatrix <- function(id, data, reporter, filter_panel_api, variab card <- card_template( title = "Scatter Plot Matrix", label = label, - description = NULL, with_filter = with_filter, filter_panel_api = filter_panel_api ) diff --git a/R/tm_outliers.R b/R/tm_outliers.R index 8a0e43911..7aa0bff25 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -1151,7 +1151,6 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, card <- card_template( title = paste0("Outliers - ", tab_type), label = label, - description = NULL, with_filter = with_filter, filter_panel_api = filter_panel_api ) diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index 328707185..95c0d3347 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -355,7 +355,6 @@ srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y, card <- card_template( title = "Cross Table", label = label, - description = NULL, with_filter = with_filter, filter_panel_api = filter_panel_api ) diff --git a/R/tm_variable_browser.R b/R/tm_variable_browser.R index 43922760d..97745314b 100644 --- a/R/tm_variable_browser.R +++ b/R/tm_variable_browser.R @@ -504,7 +504,6 @@ srv_variable_browser <- function(id, card <- card_template( title = "Variable Browser Plot", label = label, - description = NULL, with_filter = with_filter, filter_panel_api = filter_panel_api ) diff --git a/R/utils.R b/R/utils.R index 7eb5b07e6..17a911cf2 100644 --- a/R/utils.R +++ b/R/utils.R @@ -354,7 +354,6 @@ is_tab_active_js <- function(id, name) { #' Template function to generate reporter card for `teal.modules.general` #' @param title (`character(1)`) title of the card (unless overwritten by label) #' @param label (`character(1)`) label provided by the user when adding the card -#' @param description (`character(1)`) optional additional description #' @param with_filter (`logical(1)`) flag indicating to add filter state #' @param filter_panel_api (`FilterPanelAPI`) object with API that allows the generation #' of the filter state in the report @@ -362,14 +361,12 @@ is_tab_active_js <- function(id, name) { #' @return (`TealReportCard`) populated with a title, description and filter state #' #' @keywords internal -card_template <- function(title, label, description = NULL, with_filter, filter_panel_api) { +card_template <- function(title, label, with_filter, filter_panel_api) { card <- teal::TealReportCard$new() title <- if (label == "") title else label card$set_name(title) card$append_text(title, "header2") - if (!is.null(description)) { - card$append_text(description, "header3") - } + if (with_filter) { card$append_fs(filter_panel_api$get_filter_state()) } diff --git a/man/card_template.Rd b/man/card_template.Rd index cbf6efddd..7d165ff99 100644 --- a/man/card_template.Rd +++ b/man/card_template.Rd @@ -4,21 +4,13 @@ \alias{card_template} \title{Template function to generate reporter card for \code{teal.modules.general}} \usage{ -card_template( - title, - label, - description = NULL, - with_filter = FALSE, - filter_panel_api = NULL -) +card_template(title, label, with_filter, filter_panel_api) } \arguments{ \item{title}{(\code{character(1)}) title of the card (unless overwritten by label)} \item{label}{(\code{character(1)}) label provided by the user when adding the card} -\item{description}{(\code{character(1)}) optional additional description} - \item{with_filter}{(\code{logical(1)}) flag indicating to add filter state} \item{filter_panel_api}{(\code{FilterPanelAPI}) object with API that allows the generation