Skip to content

Commit 25c4a3c

Browse files
Fixes plot settings that did not have an accordion wrapper (#939)
# Pull Request <!--- Replace `#nnn` with your issue link for reference. --> - Fixes #937 Companion PR: - insightsengineering/teal.modules.clinical#1436 - #939 ### Note to reviewer :information_source: Please check each example app of the affected module ### Changes description - [x] Adds `bslib::accordion` wrapper to plot settings that were missing - [x] Check other modules / encoding if there are any that have the same problem --------- Co-authored-by: Lluís Revilla <[email protected]>
1 parent 9224446 commit 25c4a3c

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

R/tm_a_pca.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ ui_a_pca <- function(id, ...) {
245245
is_single_dataset = is_single_dataset_value
246246
),
247247
bslib::accordion(
248-
open = TRUE,
248+
open = c("Display", "Pre-processing", "Selected plot specific settings"),
249249
bslib::accordion_panel(
250250
title = "Display",
251251
checkboxGroupInput(
@@ -321,7 +321,6 @@ ui_a_pca <- function(id, ...) {
321321
),
322322
bslib::accordion_panel(
323323
title = "Plot settings",
324-
collapsed = TRUE,
325324
conditionalPanel(
326325
condition = sprintf(
327326
"input['%s'] == 'Elbow plot' || input['%s'] == 'Eigenvector plot'",

R/tm_outliers.R

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ ui_outliers <- function(id, ...) {
294294
open = TRUE,
295295
bslib::accordion_panel(
296296
title = "Method parameters",
297-
collapsed = FALSE,
298297
teal.widgets::optionalSelectInput(
299298
inputId = ns("method"),
300299
label = "Method",
@@ -362,14 +361,17 @@ ui_outliers <- function(id, ...) {
362361
decorators = select_decorators(args$decorators, "cumulative_plot")
363362
)
364363
),
365-
bslib::accordion_panel(
366-
title = "Plot settings",
367-
selectInput(
368-
inputId = ns("ggtheme"),
369-
label = "Theme (by ggplot):",
370-
choices = ggplot_themes,
371-
selected = args$ggtheme,
372-
multiple = FALSE
364+
bslib::accordion(
365+
open = TRUE,
366+
bslib::accordion_panel(
367+
title = "Plot settings",
368+
selectInput(
369+
inputId = ns("ggtheme"),
370+
label = "Theme (by ggplot):",
371+
choices = ggplot_themes,
372+
selected = args$ggtheme,
373+
multiple = FALSE
374+
)
373375
)
374376
)
375377
),
@@ -738,10 +740,11 @@ srv_outliers <- function(id, data, outlier_var,
738740
categorical_var_name = as.name(categorical_var)
739741
)
740742
)
741-
) |> within({
742-
table <- rtables::df_to_tt(summary_data)
743-
table
744-
})
743+
) |>
744+
within({
745+
table <- rtables::df_to_tt(summary_data)
746+
table
747+
})
745748
} else {
746749
msg <- "No categorical variable selected, summary table cannot be created."
747750
showNotification(msg,

R/tm_variable_browser.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,9 @@ ui_variable_browser <- function(id,
160160
teal.widgets::plot_with_settings_ui(ns("variable_plot")),
161161
tags$br(),
162162
bslib::accordion(
163-
open = TRUE,
163+
open = FALSE,
164164
bslib::accordion_panel(
165165
title = "Plot settings",
166-
collapsed = TRUE,
167166
selectInput(
168167
inputId = ns("ggplot_theme"), label = "ggplot2 theme",
169168
choices = ggplot_themes,

0 commit comments

Comments
 (0)