diff --git a/R/tm_a_mmrm.R b/R/tm_a_mmrm.R index 3202e0b44..0323b9cf9 100644 --- a/R/tm_a_mmrm.R +++ b/R/tm_a_mmrm.R @@ -624,7 +624,7 @@ ui_mmrm <- function(id, ...) { textOutput(ns("null_input_msg")), tags$h3(textOutput(ns("mmrm_title"))), teal.widgets::table_with_settings_ui(ns("mmrm_table")), - teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) + tmcplot_with_settings() ), encoding = tags$div( ### Reporter diff --git a/R/tm_g_barchart_simple.R b/R/tm_g_barchart_simple.R index 3181b3c85..47e411a04 100644 --- a/R/tm_g_barchart_simple.R +++ b/R/tm_g_barchart_simple.R @@ -204,7 +204,7 @@ ui_g_barchart_simple <- function(id, ...) { ), teal.widgets::standard_layout( output = teal.widgets::white_small_well( - teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), + tmcplot_with_settings(), uiOutput(ns("table"), class = "overflow-y-scroll max-h-250") ), encoding = tags$div( diff --git a/R/tm_g_ci.R b/R/tm_g_ci.R index b5ca188ac..a8875cb85 100644 --- a/R/tm_g_ci.R +++ b/R/tm_g_ci.R @@ -319,7 +319,7 @@ ui_g_ci <- function(id, ...) { args <- list(...) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), + output = tmcplot_with_settings(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), diff --git a/R/tm_g_forest_rsp.R b/R/tm_g_forest_rsp.R index 6f1f94f9c..d0f8a8ec1 100644 --- a/R/tm_g_forest_rsp.R +++ b/R/tm_g_forest_rsp.R @@ -398,7 +398,7 @@ ui_g_forest_rsp <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), + output = tmcplot_with_settings(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), diff --git a/R/tm_g_forest_tte.R b/R/tm_g_forest_tte.R index 4e3d395b9..049c04ffb 100644 --- a/R/tm_g_forest_tte.R +++ b/R/tm_g_forest_tte.R @@ -387,7 +387,7 @@ ui_g_forest_tte <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), + output = tmcplot_with_settings(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), diff --git a/R/tm_g_ipp.R b/R/tm_g_ipp.R index a8d8d926f..cc6ff1f79 100644 --- a/R/tm_g_ipp.R +++ b/R/tm_g_ipp.R @@ -373,7 +373,7 @@ ui_g_ipp <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), + output = tmcplot_with_settings(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), diff --git a/R/tm_g_km.R b/R/tm_g_km.R index 9c94feb6e..d3554f299 100644 --- a/R/tm_g_km.R +++ b/R/tm_g_km.R @@ -435,9 +435,7 @@ ui_g_km <- function(id, ...) { teal.widgets::standard_layout( output = teal.widgets::white_small_well( verbatimTextOutput(outputId = ns("text")), - teal.widgets::plot_with_settings_ui( - id = ns("tmcplot") - ) + tmcplot_with_settings() ), encoding = tags$div( ### Reporter diff --git a/R/tm_g_lineplot.R b/R/tm_g_lineplot.R index 8b53c2ec7..ad519ad2a 100644 --- a/R/tm_g_lineplot.R +++ b/R/tm_g_lineplot.R @@ -353,9 +353,7 @@ ui_g_lineplot <- function(id, ...) { teal.widgets::standard_layout( output = teal.widgets::white_small_well( verbatimTextOutput(outputId = ns("text")), - teal.widgets::plot_with_settings_ui( - id = ns("tmcplot") - ) + tmcplot_with_settings() ), encoding = tags$div( ### Reporter diff --git a/R/tm_g_pp_adverse_events.R b/R/tm_g_pp_adverse_events.R index 9b5f3bc58..44eea0956 100644 --- a/R/tm_g_pp_adverse_events.R +++ b/R/tm_g_pp_adverse_events.R @@ -335,7 +335,7 @@ ui_g_adverse_events <- function(id, ...) { htmlOutput(ns("title")), teal.widgets::get_dt_rows(ns("table"), ns("table_rows")), DT::DTOutput(outputId = ns("table")), - teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) + tmcplot_with_settings() ), encoding = tags$div( ### Reporter diff --git a/R/tm_g_pp_patient_timeline.R b/R/tm_g_pp_patient_timeline.R index 0648c9ba9..c6080a242 100644 --- a/R/tm_g_pp_patient_timeline.R +++ b/R/tm_g_pp_patient_timeline.R @@ -562,7 +562,7 @@ ui_g_patient_timeline <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), + output = tmcplot_with_settings(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), diff --git a/R/tm_g_pp_therapy.R b/R/tm_g_pp_therapy.R index de0a80fb0..0bfa35ff1 100644 --- a/R/tm_g_pp_therapy.R +++ b/R/tm_g_pp_therapy.R @@ -432,7 +432,7 @@ ui_g_therapy <- function(id, ...) { htmlOutput(ns("title")), teal.widgets::get_dt_rows(ns("therapy_table"), ns("therapy_table_rows")), DT::DTOutput(outputId = ns("therapy_table")), - teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) + tmcplot_with_settings() ), encoding = tags$div( ### Reporter diff --git a/R/tm_g_pp_vitals.R b/R/tm_g_pp_vitals.R index 216b463cc..e0ddff384 100644 --- a/R/tm_g_pp_vitals.R +++ b/R/tm_g_pp_vitals.R @@ -341,7 +341,7 @@ ui_g_vitals <- function(id, ...) { ns <- NS(id) teal.widgets::standard_layout( - output = teal.widgets::plot_with_settings_ui(id = ns("tmcplot")), + output = tmcplot_with_settings(), encoding = tags$div( ### Reporter teal.reporter::simple_reporter_ui(ns("simple_reporter")), diff --git a/R/utils.R b/R/utils.R index 108c7676d..0a374bc73 100644 --- a/R/utils.R +++ b/R/utils.R @@ -947,15 +947,14 @@ set_default_total_label <- function(total_label) { # for mocking in tests interactive <- NULL +tmcplot_with_settings <- function() teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) track_shiny_input_changes <- function(input){ if (shiny::isRunning()) { - plot_nss <- c("mmrm", "myplot", "chart", "patient_timeline_plot", "therapy_plot", "vitals_plot") - elements <- c("plot_modal_width", "flex_width", "plot_modal_height", "flex_height") + exclude_inputs <- paste("tmcplot", elements, sep = "-") - exclude_inputs <- unlist(lapply(plot_nss, paste, elements, sep = "-")) logger::log_shiny_input_changes( input, level = logger::DEBUG,