Skip to content

Commit

Permalink
Merge branch 'main' into 479_lockfile_extendtask@main
Browse files Browse the repository at this point in the history
  • Loading branch information
m7pr committed Jun 19, 2024
2 parents 072a989 + 7da5d29 commit 560a1ff
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: teal
Title: Exploratory Web Apps for Analyzing Clinical Trials Data
Version: 0.15.2.9042
Date: 2024-06-18
Version: 0.15.2.9044
Date: 2024-06-19
Authors@R: c(
person("Dawid", "Kaledkowski", , "dawid.kaledkowski@roche.com", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-9533-457X")),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# teal 0.15.2.9042
# teal 0.15.2.9044

### Enhancement
* Provided progress bar for modules loading and data filtering during teal app startup.
Expand Down
2 changes: 0 additions & 2 deletions R/module_teal.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#' updates the displayed datasets to filter for according to the active `datanames`
#' of the tab.
#'
#' It is written as a `shiny` module so it can be added into other apps as well.
#'
#' @name module_teal
#'
#' @inheritParams module_teal_with_splash
Expand Down
22 changes: 18 additions & 4 deletions inst/js/sidebar.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
// used to collapse and expand the filter panel in teal apps
/*
resize is placed at end of functions
b/c in embedded apps it will throw errors that cause the function to exit early
*/
var filter_open = true;
const hideSidebar = () => {
$(".teal_secondary_col").fadeOut(1);
$(".teal_primary_col").attr("class", "teal_primary_col col-sm-12").resize();
$(".teal_secondary_col").css("display", "none");
$(".teal_primary_col")
.removeClass("col-sm-9")
.addClass("col-sm-12");
$(".teal_primary_col").trigger("resize");
};
const showSidebar = () => {
$(".teal_primary_col").attr("class", "teal_primary_col col-sm-9").resize();
$(".teal_secondary_col").delay(600).fadeIn(50);
$(".teal_primary_col")
.removeClass("col-sm-12")
.addClass("col-sm-9");
setTimeout(
() => {
$(".teal_secondary_col").css("display", "block");
},
600);
$(".teal_primary_col").trigger("resize");
};
const toggleFilterPanel = () => {
if (filter_open && !$(".teal_secondary_col").is(':visible')) {
Expand Down
2 changes: 0 additions & 2 deletions man/module_teal.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-shinytest2-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ testthat::test_that("e2e: show/hide hamburger works as expected", {
secondary_attrs <- get_class_attributes(app, ".teal_secondary_col")

testthat::expect_true(grepl("col-sm-9", primary_attrs$class))
testthat::expect_false(isTruthy(secondary_attrs$style))
testthat::expect_true(grepl("display: block;", secondary_attrs$style))

app$click(selector = ".btn.action-button.filter_hamburger")
primary_attrs <- get_class_attributes(app, ".teal_primary_col")
Expand Down

0 comments on commit 560a1ff

Please sign in to comment.