Skip to content

Commit

Permalink
substitute teal.widgets::plot_with_settings_ui(id = ns("tmcplot")) wi…
Browse files Browse the repository at this point in the history
…th tmcplot_with_settings()
  • Loading branch information
m7pr committed Jun 13, 2024
1 parent a9e28c3 commit 367594f
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion R/tm_a_mmrm.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_barchart_simple.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_forest_rsp.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_forest_tte.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_ipp.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down
4 changes: 1 addition & 3 deletions R/tm_g_km.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions R/tm_g_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_pp_adverse_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_pp_patient_timeline.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_pp_therapy.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_pp_vitals.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down
5 changes: 2 additions & 3 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -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){

Check warning on line 952 in R/utils.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=R/utils.R,line=952,col=45,[brace_linter] There should be a space before an opening curly brace.

Check warning on line 952 in R/utils.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=R/utils.R,line=952,col=45,[paren_body_linter] There should be a space between a right parenthesis and a body expression.
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,
Expand Down

0 comments on commit 367594f

Please sign in to comment.