Skip to content

Commit

Permalink
Resolve todos (#1410)
Browse files Browse the repository at this point in the history
Co-authored-by: m7pr <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Marcin <[email protected]>
Co-authored-by: Lluís Revilla <[email protected]>
  • Loading branch information
5 people authored Nov 22, 2024
1 parent 8c143f1 commit 161e480
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 29 deletions.
6 changes: 0 additions & 6 deletions R/module_data_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,6 @@ get_filter_overview_wrapper <- function(teal_data) {
datanames,
function(dataname) {
parent <- teal.data::parent(joinkeys, dataname)
# todo: what should we display for a parent dataset?
# - Obs and Subjects
# - Obs only
# - Subjects only
# todo (for later): summary table should be displayed in a way that child datasets
# are indented under their parent dataset to form a tree structure
subject_keys <- if (length(parent) > 0) {
names(joinkeys[dataname, parent])
} else {
Expand Down
1 change: 0 additions & 1 deletion R/module_filter_manager.R
Original file line number Diff line number Diff line change
Expand Up @@ -388,4 +388,3 @@ methods::setOldClass("reactivevalues")
}
)
)
# todo: prevent any teal_slices attribute except mapping
8 changes: 0 additions & 8 deletions R/module_nested_tabs.R
Original file line number Diff line number Diff line change
Expand Up @@ -319,14 +319,6 @@ srv_teal_module.teal_module <- function(id,
# When previewer is delayed, cards are bookmarked only if previewer has been initiated (visited).
module_out(.call_teal_module(modules, datasets, module_teal_data, reporter))
}

# todo: (feature request) add a ReporterCard to the reporter as an output from the teal_module
# how to determine if module returns a ReporterCard so that reportPreviewer is needed?
# Should we insertUI of the ReportPreviewer then?
# What about attr(module, "reportable") - similar to attr(module, "bookmarkable")
if ("report" %in% names(module_out)) {
# (reactively) add card to the reporter
}
})

module_out
Expand Down
1 change: 0 additions & 1 deletion R/module_snapshot_manager.R
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ srv_snapshot_manager <- function(id, slices_global) {
s <- "Initial application state"
### Begin restore procedure. ###
snapshot <- snapshot_history()[[s]]
# todo: as.teal_slices looses module-mapping if is not global
snapshot_state <- as.teal_slices(snapshot)
slices_global$slices_set(snapshot_state)
removeModal()
Expand Down
1 change: 0 additions & 1 deletion R/module_teal.R
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ srv_teal <- function(id, data, modules, filter = teal_slices()) {
data_load_status <- reactive({
if (inherits(data_pulled(), "teal_data")) {
"ok"
# todo: should we hide warnings on top for a data?
} else if (inherits(data, "teal_data_module")) {
"teal_data_module failed"
} else {
Expand Down
2 changes: 1 addition & 1 deletion R/module_transform_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ui_transform_data <- function(id, transformers = list(), class = "well") {
function(name) {
data_mod <- transformers[[name]]
wrapper_id <- ns(sprintf("wrapper_%s", name))
div( # todo: accordion?
div(
# class .teal_validated changes the color of the boarder on error in ui_validate_reactive_teal_data
# For details see tealValidate.js file.
class = c(class, "teal_validated"),
Expand Down
11 changes: 0 additions & 11 deletions tests/testthat/test-rcode_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,3 @@ testthat::test_that("get_rcode_libraries returns current session packages", {
)
)
})

testthat::test_that("get_datasets_code returns code only for specified datanames", {
# todo: need to use code dependency? Or test it later via public functions/modules
datasets <- teal.slice::init_filtered_data(
list(
IRIS = iris,
MTCARS = mtcars
)
)
testthat::expect_true(TRUE)
})

0 comments on commit 161e480

Please sign in to comment.