Skip to content

Commit

Permalink
Merge pull request #10 from Boehringer-Ingelheim/rc/2.0.1
Browse files Browse the repository at this point in the history
Release candidate 2.0.1
  • Loading branch information
zsigmas authored Aug 14, 2024
2 parents 08b3de6 + e7b07ae commit 396d8e9
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 5 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: dv.papo
Title: Patient Profile
Version: 2.0.0
Date: 2024-07-02
Version: 2.0.1
Date: 2024-08-13
Authors@R:
c(person("Boehringer-Ingelheim Pharma GmbH & Co.KG", role = c("cph", "fnd")),
person(given = "Korbinian",
Expand All @@ -28,7 +28,7 @@ Imports:
checkmate,
DT,
ggplot2,
plotly,
plotly (> 4.10.2),
rlang,
shiny,
shinyWidgets,
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# dv.papo 2.0.1

- Fixes failed first interaction when a participant is selected from another module
- Fixes plotly version, previous version numbers failed with an obscure error
- Fixes legend removal when grading was not present in any of the plots

# dv.papo 2.0.0

- Major API redesign with the following breaking changes `mod_patient_profile()`:
Expand Down
2 changes: 1 addition & 1 deletion R/create_plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ create_ae_cm_plot <- function(data, x_limits, palette, sl_info, vline_vars, vlin
p <- p + ggplot2::theme(
legend.title = ggplot2::element_blank(),
legend.justification = "top",
legend.position = ifelse(grading_available, "right", "none"),
legend.position = "right",
axis.text.y = ggplot2::element_text(size = 7),
strip.text = ggplot2::element_text(size = 4),
panel.spacing = ggplot2::unit(0, "lines")
Expand Down
5 changes: 5 additions & 0 deletions R/dressing_room.R
Original file line number Diff line number Diff line change
Expand Up @@ -1246,8 +1246,13 @@ app_creator_feedback_server <- function(id, warning_messages, error_messages, ui
if (length(error_messages()) == 0) res <- append(res, list(ui))
return(res)
})

# See: (ag4hj)
shiny::outputOptions(output, "ui", suspendWhenHidden = FALSE)
}
)



return(module)
}
9 changes: 9 additions & 0 deletions R/mod_patient_profile.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ mod_patient_profile_server <- function(id, subject_level_dataset, extra_datasets
return(res)
})

# (ag4hj): Without these outputOptions the update selector (See: ag4hj) tries to update a selector that is not yet
# in the UI. Therefore the update is lost. In practice this means that when using the receiver_ids the first
# subjid is lost and the interaction is incorrect.
shiny::outputOptions(output, "ui", suspendWhenHidden = FALSE)

output[["selector"]] <- shiny::renderUI({
subject_level_dataset <- subject_level_dataset()
shiny::req(subject_level_dataset, cancelOutput = TRUE)
Expand All @@ -98,6 +103,10 @@ mod_patient_profile_server <- function(id, subject_level_dataset, extra_datasets
)
})

# See: (ag4hj)
shiny::outputOptions(output, "selector", suspendWhenHidden = FALSE)

# See: (ag4hj)
# change selected patient based on sender_ids
if (!is.null(sender_ids)) {
lapply(sender_ids, function(x) {
Expand Down
3 changes: 2 additions & 1 deletion R/mod_plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ patient_plot_server <- function(id, subject_var,
names_seen <- character(0)
for (i in seq_along(plots$x$data)) {
name <- plots$x$data[[i]][["name"]]
if (name %in% names_seen) {
if (name %in% names_seen || name == "<no grading>") { # no grading is set if no grading column was defined
# but it shouldn't be displayed in the legend, since it doesn't come out of the data and might confuse users
plots$x$data[[i]]$showlegend <- FALSE
} else {
names_seen <- c(names_seen, name)
Expand Down

0 comments on commit 396d8e9

Please sign in to comment.