Skip to content

Commit

Permalink
fixes condition names and checks if elements have length property
Browse files Browse the repository at this point in the history
  • Loading branch information
zsigmas committed Sep 17, 2024
1 parent 9e8fefe commit 28ca421
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: dv.explorer.parameter
Type: Package
Title: Parameter exploration modules
Version: 0.0.7
Version: 0.0.8
Authors@R: c(
person("Boehringer-Ingelheim Pharma GmbH & Co.KG", role = c("cph", "fnd")),
person(given = "Luis", family = "Moris Fernandez", role = c("aut", "cre"), email = "[email protected]"),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# dv.explorer.parameter 0.0.8

* WFPHM:
* Fixes the error in conditional panels that prevented conditional panels in other modules to work properly.

# dv.explorer.parameter 0.0.7

* Lineplot:
Expand Down
15 changes: 9 additions & 6 deletions R/mod_wfphm.R
Original file line number Diff line number Diff line change
Expand Up @@ -1861,8 +1861,6 @@ wfphm_hmpar_subset <- function(
subj_col = subjid_var
)

checkmate::assert_set_equal(levels(df[[CNT$SBJ]]), sorted_x) # Ignore

shiny::validate(
need_one_row_per_sbj(df, CNT$SBJ, CNT$PAR, msg = WFPHM_MSG$HMPAR$VALIDATE$TOO_MANY_ROWS)
)
Expand Down Expand Up @@ -2040,11 +2038,16 @@ wfphm_UI <- function(id, tr_choices = names(tr_mapper_def())) { # nolint
shiny::div(
id = ns(WFPHM_ID$WFPHM$CHART_CONTAINER),
wf_ui[["chart"]],
shiny::conditionalPanel(condition = "input['hmcat-cat-col-gen'].length>0", hmcat_ui[["chart"]], ns = ns),
shiny::conditionalPanel(condition = "input['hmcont-cont-col-gen'].length>0", hmcont_ui[["chart"]], ns = ns),
shiny::conditionalPanel(condition = " input['hmpar-par-par-val-gen'].length>0 && input['hmpar-value-col-gen'].length>0 && input['hmpar-visit-val-gen'].length>0 && input['hmpar-transform-gen'].length>0", hmpar_ui[["chart"]], ns = ns), # nolint
shiny::conditionalPanel(condition = "input['hmcat-cat-val']!== undefined && Object.hasOwn(input['hmcat-cat-val'], \"length\") ? input['hmcat-cat-val'].length>0 : false", hmcat_ui[["chart"]], ns = ns),

Check warning on line 2041 in R/mod_wfphm.R

View workflow job for this annotation

GitHub Actions / Shared / Lintr 🔍 / ghcr.io/boehringer-ingelheim/r_4.3.2_cran_2024.01.12:latest

file=R/mod_wfphm.R,line=2041,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 208 characters.
shiny::conditionalPanel(condition = "input['hmcont-cont-val']!== undefined &&Object.hasOwn(input['hmcont-cont-val'], \"length\") ? input['hmcont-cont-val'].length>0 : false", hmcont_ui[["chart"]], ns = ns),

Check warning on line 2042 in R/mod_wfphm.R

View workflow job for this annotation

GitHub Actions / Shared / Lintr 🔍 / ghcr.io/boehringer-ingelheim/r_4.3.2_cran_2024.01.12:latest

file=R/mod_wfphm.R,line=2042,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 214 characters.
shiny::conditionalPanel(condition = "
(input['hmpar-par-par_val']!== undefined && Object.hasOwn(input['hmpar-par-par_val'], \"length\") ? input['hmpar-par-par_val'].length>0 : false) &&

Check warning on line 2044 in R/mod_wfphm.R

View workflow job for this annotation

GitHub Actions / Shared / Lintr 🔍 / ghcr.io/boehringer-ingelheim/r_4.3.2_cran_2024.01.12:latest

file=R/mod_wfphm.R,line=2044,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 157 characters.
(input['hmpar-value-val']!== undefined && Object.hasOwn(input['hmpar-value-val'], \"length\") ? input['hmpar-value-val'].length>0 : false) &&

Check warning on line 2045 in R/mod_wfphm.R

View workflow job for this annotation

GitHub Actions / Shared / Lintr 🔍 / ghcr.io/boehringer-ingelheim/r_4.3.2_cran_2024.01.12:latest

file=R/mod_wfphm.R,line=2045,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 151 characters.
(input['hmpar-visit-val']!== undefined && Object.hasOwn(input['hmpar-visit-val'], \"length\") ? input['hmpar-visit-val'].length>0 : false) &&

Check warning on line 2046 in R/mod_wfphm.R

View workflow job for this annotation

GitHub Actions / Shared / Lintr 🔍 / ghcr.io/boehringer-ingelheim/r_4.3.2_cran_2024.01.12:latest

file=R/mod_wfphm.R,line=2046,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 151 characters.
(input['hmpar-transform']!== undefined && Object.hasOwn(input['hmpar-transform'], \"length\") ? input['hmpar-transform'].length>0 : false)

Check warning on line 2047 in R/mod_wfphm.R

View workflow job for this annotation

GitHub Actions / Shared / Lintr 🔍 / ghcr.io/boehringer-ingelheim/r_4.3.2_cran_2024.01.12:latest

file=R/mod_wfphm.R,line=2047,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 148 characters.
", hmpar_ui[["chart"]], ns = ns), # nolint
shiny::conditionalPanel(
condition = "input['hmcat-cat-col-gen'].length>0",
condition = "input['hmcat-cat-val']!== undefined && Object.hasOwn(input['hmcat-cat-val'], \"length\") ? input['hmcat-cat-val'].length>0 : false",

Check warning on line 2050 in R/mod_wfphm.R

View workflow job for this annotation

GitHub Actions / Shared / Lintr 🔍 / ghcr.io/boehringer-ingelheim/r_4.3.2_cran_2024.01.12:latest

file=R/mod_wfphm.R,line=2050,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 155 characters.
shiny::div(
shiny::h5("Categorical legend"),
hmcat_ui[["legend"]]
Expand Down

0 comments on commit 28ca421

Please sign in to comment.