Skip to content

Commit

Permalink
removing description parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikeyakirar committed Oct 5, 2023
1 parent 40193d9 commit 6f21a89
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 27 deletions.
3 changes: 1 addition & 2 deletions R/tm_a_pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
1 change: 0 additions & 1 deletion R/tm_a_regression.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 0 additions & 2 deletions R/tm_g_association.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "") {
Expand Down
1 change: 0 additions & 1 deletion R/tm_g_bivariate.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
1 change: 0 additions & 1 deletion R/tm_g_distribution.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
1 change: 0 additions & 1 deletion R/tm_g_response.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
1 change: 0 additions & 1 deletion R/tm_g_scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
1 change: 0 additions & 1 deletion R/tm_g_scatterplotmatrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
1 change: 0 additions & 1 deletion R/tm_outliers.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
1 change: 0 additions & 1 deletion R/tm_t_crosstable.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
1 change: 0 additions & 1 deletion R/tm_variable_browser.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
7 changes: 2 additions & 5 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -354,22 +354,19 @@ 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
#'
#' @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())
}
Expand Down
10 changes: 1 addition & 9 deletions man/card_template.Rd

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

0 comments on commit 6f21a89

Please sign in to comment.