Skip to content

Commit

Permalink
@vedhav review
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot-preview[bot] committed Oct 2, 2024
1 parent 62a1347 commit 9c1b9d6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 15 deletions.
5 changes: 2 additions & 3 deletions R/module_teal.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#' ## Fallback on failure
#'
#' `teal` is designed in such way that app will never crash if the error is introduced in any
#' custom module provided by app developer (e.g. [teal_data_module()], [teal_transform_module()]).
#' custom `shiny` module provided by app developer (e.g. [teal_data_module()], [teal_transform_module()]).
#' If any module returns a failing object, the app will halt the evaluation and display a warning message.
#' App user should always have a chance to fix the improper input and continue without restarting the session.
#'
Expand Down Expand Up @@ -245,8 +245,7 @@ srv_teal <- function(id, data, modules, filter = teal_slices()) {
observeEvent(data_rv(), once = TRUE, {
logger::log_debug("srv_teal@2 removing data tab.")
# when once = TRUE we pull data once and then remove data tab
removeUI(selector = sprintf("#%s a[data-value='teal_data_module']", session$ns("teal_modules-wrapper")))
updateTabsetPanel(inputId = "teal_modules-active_tab", selected = names(modules$children)[1])
removeTab("teal_modules-active_tab", target = "teal_data_module")
})
}
} else {
Expand Down
7 changes: 3 additions & 4 deletions R/module_teal_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
#' @param data_module (`teal_data_module`)
#' @param modules (`teal_modules` or `teal_module`) For `datanames` validation purpose
#' @param validate_shiny_silent_error (`logical`) If `TRUE`, then `shiny.silent.error` is validated and
#' @param is_transformer_failed (`reactiveValues`) that hosts `logical` flags of which transformers failed
#' error message is displayed.
#' Default is `FALSE` to handle empty reactive cycle on `init`.
#' @param is_transformer_failed (`reactiveValues`) contains `logical` flags named after each transformer.
#' Help to determine if any previous transformer failed, so that following transformers can be disabled
#' and display a generic failure message.
#'
#' @return `reactive` `teal_data`
#'
Expand Down Expand Up @@ -244,7 +244,6 @@ srv_check_shiny_warnings <- function(id, data, modules) {
if (!identical(data(), out())) {
out(data())
}
} else {
}
})

Expand Down
2 changes: 1 addition & 1 deletion man/module_teal.Rd

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

6 changes: 3 additions & 3 deletions man/module_teal_data.Rd

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

6 changes: 3 additions & 3 deletions man/module_transform_data.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-teal_data_module.R
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ testthat::test_that("e2e: teal_data_module gets removed after successful data lo
app$get_html('#teal-teal_modules-active_tab a[data-value="teal_data_module"]')
)

testthat::expect_false(
testthat::expect_null(
app$is_visible(sprintf("#%s", submit))
)

Expand Down

0 comments on commit 9c1b9d6

Please sign in to comment.