From 466a652c63e7f9607d0aff2f7406e9045cd51715 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Mar 2024 19:32:16 +0530 Subject: [PATCH] reverting changes for pkg:: call. --- R/FilterState.R | 24 ++++++------ R/FilterStateChoices.R | 10 ++--- R/FilterStateDate.R | 18 ++++----- R/FilterStateDatettime.R | 26 ++++++------- R/FilterStateEmpty.R | 8 ++-- R/FilterStateExpr.R | 14 +++---- R/FilterStateLogical.R | 10 ++--- R/FilterStateRange.R | 20 +++++----- R/FilterStates.R | 8 ++-- R/FilterStatesSE.R | 10 ++--- R/FilteredData.R | 72 ++++++++++++++++++------------------ R/FilteredDataset.R | 12 +++--- R/FilteredDatasetDataframe.R | 2 +- R/FilteredDatasetDefault.R | 4 +- R/FilteredDatasetMAE.R | 10 ++--- R/count_labels.R | 6 +-- R/include_css_js.R | 2 +- 17 files changed, 128 insertions(+), 128 deletions(-) diff --git a/R/FilterState.R b/R/FilterState.R index 3a81414b3..6e1e0d486 100644 --- a/R/FilterState.R +++ b/R/FilterState.R @@ -296,16 +296,16 @@ FilterState <- R6::R6Class( # nolint ### Title consists of conditional icon, varname, conditional varlabel, and controls, arranged in a row. ### Summary consists of value and controls, arranged in a row. - shiny::tags$div( + tags$div( id = id, class = "panel filter-card", include_js_files("count-bar-labels.js"), - shiny::tags$div( + tags$div( class = "filter-card-header", `data-toggle` = "collapse", `data-bs-toggle` = "collapse", href = paste0("#", ns("body")), - shiny::tags$div( + tags$div( class = "filter-card-title", if (private$is_anchored() && private$is_fixed()) { icon("anchor-lock", class = "filter-card-icon") @@ -314,9 +314,9 @@ FilterState <- R6::R6Class( # nolint } else if (!private$is_anchored() && private$is_fixed()) { icon("lock", class = "filter-card-icon") }, - shiny::tags$div(class = "filter-card-varname", shiny::tags$strong(private$get_varname())), - shiny::tags$div(class = "filter-card-varlabel", private$get_varlabel()), - shiny::tags$div( + tags$div(class = "filter-card-varname", tags$strong(private$get_varname())), + tags$div(class = "filter-card-varlabel", private$get_varlabel()), + tags$div( class = "filter-card-controls", # Suppress toggling body when clicking on this div. # This is for bootstrap 3 and 4. Causes page to scroll to top, prevented by setting href on buttons. @@ -354,14 +354,14 @@ FilterState <- R6::R6Class( # nolint } ) ), - shiny::tags$div(class = "filter-card-summary", private$ui_summary(ns("summary"))) + tags$div(class = "filter-card-summary", private$ui_summary(ns("summary"))) ), - shiny::tags$div( + tags$div( id = ns("body"), class = "collapse out", `data-parent` = paste0("#", parent_id), `data-bs-parent` = paste0("#", parent_id), - shiny::tags$div( + tags$div( class = "filter-card-body", if (private$is_fixed()) { private$ui_inputs_fixed(ns("inputs")) @@ -692,7 +692,7 @@ FilterState <- R6::R6Class( # nolint # @param id (`character(1)`) `shiny` module instance id. ui_inputs_fixed = function(id) { ns <- NS(id) - shiny::tags$div( + tags$div( class = "choices_state", uiOutput(ns("selection")) ) @@ -717,7 +717,7 @@ FilterState <- R6::R6Class( # nolint countnow <- private$filtered_na_count() ui_input <- checkboxInput( inputId = ns("value"), - label = shiny::tags$span( + label = tags$span( id = ns("count_label"), make_count_text( label = "Keep NA", @@ -727,7 +727,7 @@ FilterState <- R6::R6Class( # nolint ), value = private$get_keep_na() ) - shiny::tags$div( + tags$div( uiOutput(ns("trigger_visible"), inline = TRUE), ui_input ) diff --git a/R/FilterStateChoices.R b/R/FilterStateChoices.R index 17429c68e..246d70e3a 100644 --- a/R/FilterStateChoices.R +++ b/R/FilterStateChoices.R @@ -374,7 +374,7 @@ ChoicesFilterState <- R6::R6Class( # nolint countsnow = countsnow, countsmax = countsmax ) - shiny::tags$div( + tags$div( class = "choices_state", if (private$is_multiple()) { checkboxGroupInput( @@ -416,7 +416,7 @@ ChoicesFilterState <- R6::R6Class( # nolint ) ) } - shiny::tags$div( + tags$div( uiOutput(ns("trigger_visible")), ui_input, private$keep_na_ui(ns("keep_na")) @@ -603,14 +603,14 @@ ChoicesFilterState <- R6::R6Class( # nolint } } tagList( - shiny::tags$span( + tags$span( class = "filter-card-summary-value", selected_text ), - shiny::tags$span( + tags$span( class = "filter-card-summary-controls", if (private$na_count > 0) { - shiny::tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark")) + tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark")) } ) ) diff --git a/R/FilterStateDate.R b/R/FilterStateDate.R index 31ed3d50a..d6d7b7b53 100644 --- a/R/FilterStateDate.R +++ b/R/FilterStateDate.R @@ -278,8 +278,8 @@ DateFilterState <- R6::R6Class( # nolint ui_inputs = function(id) { ns <- NS(id) isolate({ - shiny::tags$div( - shiny::tags$div( + tags$div( + tags$div( class = "flex", actionButton( class = "date_reset_button", @@ -287,7 +287,7 @@ DateFilterState <- R6::R6Class( # nolint label = NULL, icon = icon("fas fa-undo") ), - shiny::tags$div( + tags$div( class = "w-80 filter_datelike_input", dateRangeInput( inputId = ns("selection"), @@ -402,9 +402,9 @@ DateFilterState <- R6::R6Class( # nolint output$selection <- renderUI({ vals <- format(private$get_selected(), nsmall = 3) - shiny::tags$div( - shiny::tags$div(icon("calendar-days"), vals[1]), - shiny::tags$div(span(" - "), icon("calendar-days"), vals[2]) + tags$div( + tags$div(icon("calendar-days"), vals[1]), + tags$div(span(" - "), icon("calendar-days"), vals[2]) ) }) @@ -423,14 +423,14 @@ DateFilterState <- R6::R6Class( # nolint min <- selected[1] max <- selected[2] tagList( - shiny::tags$span( + tags$span( class = "filter-card-summary-value", HTML(min, "–", max) ), - shiny::tags$span( + tags$span( class = "filter-card-summary-controls", if (private$na_count > 0) { - shiny::tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark")) + tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark")) } ) ) diff --git a/R/FilterStateDatettime.R b/R/FilterStateDatettime.R index 6bc6d8c81..f035dfe79 100644 --- a/R/FilterStateDatettime.R +++ b/R/FilterStateDatettime.R @@ -355,19 +355,19 @@ DatetimeFilterState <- R6::R6Class( # nolint ui_input_1$children[[2]]$attribs <- c(ui_input_1$children[[2]]$attribs, list(class = "input-sm")) ui_input_2$children[[2]]$attribs <- c(ui_input_2$children[[2]]$attribs, list(class = "input-sm")) - shiny::tags$div( - shiny::tags$div( + tags$div( + tags$div( class = "flex", ui_reset_1, - shiny::tags$div( + tags$div( class = "flex w-80 filter_datelike_input", - shiny::tags$div(class = "w-45 text-center", ui_input_1), - shiny::tags$span( + tags$div(class = "w-45 text-center", ui_input_1), + tags$span( class = "input-group-addon w-10", - shiny::tags$span(class = "input-group-text w-100 justify-content-center", "to"), + tags$span(class = "input-group-text w-100 justify-content-center", "to"), title = "Times are displayed in the local timezone and are converted to UTC in the analysis" ), - shiny::tags$div(class = "w-45 text-center", ui_input_2) + tags$div(class = "w-45 text-center", ui_input_2) ), ui_reset_2 ), @@ -515,9 +515,9 @@ DatetimeFilterState <- R6::R6Class( # nolint output$selection <- renderUI({ vals <- format(private$get_selected(), usetz = TRUE, nsmall = 3) - shiny::tags$div( - shiny::tags$div(icon("clock"), vals[1]), - shiny::tags$div(span(" - "), icon("clock"), vals[2]) + tags$div( + tags$div(icon("clock"), vals[1]), + tags$div(span(" - "), icon("clock"), vals[2]) ) }) @@ -536,14 +536,14 @@ DatetimeFilterState <- R6::R6Class( # nolint min <- selected[1] max <- selected[2] tagList( - shiny::tags$span( + tags$span( class = "filter-card-summary-value", HTML(min, "–", max) ), - shiny::tags$span( + tags$span( class = "filter-card-summary-controls", if (private$na_count > 0) { - shiny::tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark")) + tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark")) } ) ) diff --git a/R/FilterStateEmpty.R b/R/FilterStateEmpty.R index 33e8854cc..841b14add 100644 --- a/R/FilterStateEmpty.R +++ b/R/FilterStateEmpty.R @@ -128,8 +128,8 @@ EmptyFilterState <- R6::R6Class( # nolint ui_inputs = function(id) { ns <- NS(id) isolate({ - shiny::tags$div( - shiny::tags$span("Variable contains missing values only"), + tags$div( + tags$span("Variable contains missing values only"), private$keep_na_ui(ns("keep_na")) ) }) @@ -155,7 +155,7 @@ EmptyFilterState <- R6::R6Class( # nolint id = id, function(input, output, session) { output$selection <- renderUI({ - shiny::tags$span("Variable contains missing values only") + tags$span("Variable contains missing values only") }) NULL } @@ -166,7 +166,7 @@ EmptyFilterState <- R6::R6Class( # nolint # Server module to display filter summary # Doesn't render anything content_summary = function(id) { - shiny::tags$span("All empty") + tags$span("All empty") } ) ) diff --git a/R/FilterStateExpr.R b/R/FilterStateExpr.R index edfd9b48c..0a77a5662 100644 --- a/R/FilterStateExpr.R +++ b/R/FilterStateExpr.R @@ -191,22 +191,22 @@ FilterStateExpr <- R6::R6Class( # nolint ui = function(id, parent_id = "cards") { ns <- NS(id) isolate({ - shiny::tags$div( + tags$div( id = id, class = "panel filter-card", include_js_files("count-bar-labels.js"), - shiny::tags$div( + tags$div( class = "filter-card-header", - shiny::tags$div( + tags$div( class = "filter-card-title", if (private$is_anchored()) { icon("anchor-lock", class = "filter-card-icon") } else { icon("lock", class = "filter-card-icon") }, - shiny::tags$div(class = "filter-card-varname", shiny::tags$strong(private$teal_slice$id)), - shiny::tags$div(class = "filter-card-varlabel", private$teal_slice$title), - shiny::tags$div( + tags$div(class = "filter-card-varname", tags$strong(private$teal_slice$id)), + tags$div(class = "filter-card-varlabel", private$teal_slice$title), + tags$div( class = "filter-card-controls", if (isFALSE(private$is_anchored())) { actionLink( @@ -218,7 +218,7 @@ FilterStateExpr <- R6::R6Class( # nolint } ) ), - shiny::tags$div( + tags$div( class = "filter-card-summary", private$ui_summary(ns("summary")) ) diff --git a/R/FilterStateLogical.R b/R/FilterStateLogical.R index 283a30585..c22888ce7 100644 --- a/R/FilterStateLogical.R +++ b/R/FilterStateLogical.R @@ -272,8 +272,8 @@ LogicalFilterState <- R6::R6Class( # nolint width = "100%" ) } - shiny::tags$div( - shiny::tags$div( + tags$div( + tags$div( class = "choices_state", uiOutput(ns("trigger_visible"), inline = TRUE), ui_input @@ -393,14 +393,14 @@ LogicalFilterState <- R6::R6Class( # nolint # and if NA are included also content_summary = function(id) { tagList( - shiny::tags$span( + tags$span( class = "filter-card-summary-value", toString(private$get_selected()) ), - shiny::tags$span( + tags$span( class = "filter-card-summary-controls", if (private$na_count > 0) { - shiny::tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark")) + tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark")) } ) ) diff --git a/R/FilterStateRange.R b/R/FilterStateRange.R index 2c0f66b4e..7b1256ae5 100644 --- a/R/FilterStateRange.R +++ b/R/FilterStateRange.R @@ -417,9 +417,9 @@ RangeFilterState <- R6::R6Class( # nolint width = "100%" ) tagList( - shiny::tags$div( + tags$div( class = "choices_state", - shiny::tags$head(shiny::tags$script( + tags$head(tags$script( # Inline JS code for popover functionality. # Adding the script inline because when added from a file with include_js_files(), # it only works in the first info_button instance and not others. @@ -437,7 +437,7 @@ RangeFilterState <- R6::R6Class( # nolint });' ) )), - shiny::tags$div( + tags$div( actionLink( ns("plotly_info"), label = NULL, @@ -463,7 +463,7 @@ RangeFilterState <- R6::R6Class( # nolint ), ui_input ), - shiny::tags$div( + tags$div( class = "filter-card-body-keep-na-inf", private$keep_inf_ui(ns("keep_inf")), private$keep_na_ui(ns("keep_na")) @@ -640,14 +640,14 @@ RangeFilterState <- R6::R6Class( # nolint content_summary = function() { selection <- private$get_selected() tagList( - shiny::tags$span(HTML(selection[1], "–", selection[2]), class = "filter-card-summary-value"), - shiny::tags$span( + tags$span(HTML(selection[1], "–", selection[2]), class = "filter-card-summary-value"), + tags$span( class = "filter-card-summary-controls", if (private$na_count > 0) { - shiny::tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark")) + tags$span("NA", if (isTRUE(private$get_keep_na())) icon("check") else icon("xmark")) }, if (private$inf_count > 0) { - shiny::tags$span("Inf", if (isTRUE(private$get_keep_inf())) icon("check") else icon("xmark")) + tags$span("Inf", if (isTRUE(private$get_keep_inf())) icon("check") else icon("xmark")) } ) ) @@ -665,7 +665,7 @@ RangeFilterState <- R6::R6Class( # nolint countnow <- isolate(private$filtered_na_count()) ui_input <- checkboxInput( inputId = ns("value"), - label = shiny::tags$span( + label = tags$span( id = ns("count_label"), make_count_text( label = "Keep Inf", @@ -675,7 +675,7 @@ RangeFilterState <- R6::R6Class( # nolint ), value = isolate(private$get_keep_inf()) ) - shiny::tags$div( + tags$div( uiOutput(ns("trigger_visible"), inline = TRUE), ui_input ) diff --git a/R/FilterStates.R b/R/FilterStates.R index 3cdd896ea..73db26f28 100644 --- a/R/FilterStates.R +++ b/R/FilterStates.R @@ -407,9 +407,9 @@ FilterStates <- R6::R6Class( # nolint ns <- NS(id) if (ncol(data) == 0) { - shiny::tags$div("no sample variables available") + tags$div("no sample variables available") } else if (nrow(data) == 0) { - shiny::tags$div("no samples available") + tags$div("no samples available") } else { uiOutput(ns("add_filter")) } @@ -454,9 +454,9 @@ FilterStates <- R6::R6Class( # nolint "FilterStates$srv_add@1 updating available column choices, dataname: { private$dataname }" ) if (length(avail_column_choices()) == 0) { - shiny::tags$span("No available columns to add.") + tags$span("No available columns to add.") } else { - shiny::tags$div( + tags$div( teal.widgets::optionalSelectInput( session$ns("var_to_add"), choices = avail_column_choices(), diff --git a/R/FilterStatesSE.R b/R/FilterStatesSE.R index b3eee9493..f1a649aa0 100644 --- a/R/FilterStatesSE.R +++ b/R/FilterStatesSE.R @@ -102,9 +102,9 @@ SEFilterStates <- R6::R6Class( # nolint checkmate::assert_string(id) ns <- NS(id) row_input <- if (ncol(SummarizedExperiment::rowData(data)) == 0) { - shiny::tags$div("no sample variables available") + tags$div("no sample variables available") } else if (nrow(SummarizedExperiment::rowData(data)) == 0) { - shiny::tags$div("no samples available") + tags$div("no samples available") } else { teal.widgets::optionalSelectInput( ns("row_to_add"), @@ -117,9 +117,9 @@ SEFilterStates <- R6::R6Class( # nolint } col_input <- if (ncol(SummarizedExperiment::colData(data)) == 0) { - shiny::tags$div("no sample variables available") + tags$div("no sample variables available") } else if (nrow(SummarizedExperiment::colData(data)) == 0) { - shiny::tags$div("no samples available") + tags$div("no samples available") } else { teal.widgets::optionalSelectInput( ns("col_to_add"), @@ -131,7 +131,7 @@ SEFilterStates <- R6::R6Class( # nolint ) } - shiny::tags$div( + tags$div( row_input, col_input ) diff --git a/R/FilteredData.R b/R/FilteredData.R index 61c6589f4..1fe43dfdc 100644 --- a/R/FilteredData.R +++ b/R/FilteredData.R @@ -499,7 +499,7 @@ FilteredData <- R6::R6Class( # nolint #' @return `shiny.tag` ui_filter_panel = function(id) { ns <- NS(id) - shiny::tags$div( + tags$div( id = ns(NULL), # used for hiding / showing include_css_files(pattern = "filter-panel"), self$ui_overview(ns("overview")), @@ -552,12 +552,12 @@ FilteredData <- R6::R6Class( # nolint #' @return `shiny.tag` ui_active = function(id) { ns <- NS(id) - shiny::tags$div( + tags$div( id = id, # not used, can be used to customize CSS behavior class = "well", - shiny::tags$div( + tags$div( class = "filter-panel-active-header", - shiny::tags$span("Active Filter Variables", class = "text-primary mb-4"), + tags$span("Active Filter Variables", class = "text-primary mb-4"), private$ui_available_filters(ns("available_filters")), actionLink( inputId = ns("minimise_filter_active"), @@ -574,7 +574,7 @@ FilteredData <- R6::R6Class( # nolint class = "remove_all pull-right" ) ), - shiny::tags$div( + tags$div( id = ns("filter_active_vars_contents"), tagList( lapply( @@ -587,7 +587,7 @@ FilteredData <- R6::R6Class( # nolint ) ), shinyjs::hidden( - shiny::tags$div( + tags$div( id = ns("filters_active_count"), textOutput(ns("teal_filters_count")) ) @@ -671,16 +671,16 @@ FilteredData <- R6::R6Class( # nolint #' @return `shiny.tag` ui_add = function(id) { ns <- NS(id) - shiny::tags$div( + tags$div( id = id, # not used, can be used to customize CSS behavior class = "well", - shiny::tags$div( + tags$div( class = "row", - shiny::tags$div( + tags$div( class = "col-sm-9", - shiny::tags$label("Add Filter Variables", class = "text-primary mb-4") + tags$label("Add Filter Variables", class = "text-primary mb-4") ), - shiny::tags$div( + tags$div( class = "col-sm-3", actionLink( ns("minimise_filter_add_vars"), @@ -691,14 +691,14 @@ FilteredData <- R6::R6Class( # nolint ) ) ), - shiny::tags$div( + tags$div( id = ns("filter_add_vars_contents"), tagList( lapply( self$datanames(), function(dataname) { fdataset <- private$get_filtered_dataset(dataname) - shiny::tags$span(id = ns(dataname), fdataset$ui_add(ns(dataname))) + tags$span(id = ns(dataname), fdataset$ui_add(ns(dataname))) } ) ) @@ -760,16 +760,16 @@ FilteredData <- R6::R6Class( # nolint #' ui_overview = function(id) { ns <- NS(id) - shiny::tags$div( + tags$div( id = id, # not used, can be used to customize CSS behavior class = "well", - shiny::tags$div( + tags$div( class = "row", - shiny::tags$div( + tags$div( class = "col-sm-9", - shiny::tags$label("Active Filter Summary", class = "text-primary mb-4") + tags$label("Active Filter Summary", class = "text-primary mb-4") ), - shiny::tags$div( + tags$div( class = "col-sm-3", actionLink( ns("minimise_filter_overview"), @@ -780,9 +780,9 @@ FilteredData <- R6::R6Class( # nolint ) ) ), - shiny::tags$div( + tags$div( id = ns("filters_overview_contents"), - shiny::tags$div( + tags$div( class = "teal_active_summary_filter_panel", tableOutput(ns("table")) ) @@ -859,9 +859,9 @@ FilteredData <- R6::R6Class( # nolint datasets_df, 1, function(x) { - shiny::tags$tr( + tags$tr( tagList( - shiny::tags$td( + tags$td( if (all(x[-1] == "")) { icon( name = "exclamation-triangle", @@ -873,7 +873,7 @@ FilteredData <- R6::R6Class( # nolint }, x[1] ), - lapply(x[-1], shiny::tags$td) + lapply(x[-1], tags$td) ) ) } @@ -887,12 +887,12 @@ FilteredData <- R6::R6Class( # nolint }, character(1) ) - header_html <- shiny::tags$tr(tagList(lapply(header_labels, shiny::tags$td))) + header_html <- tags$tr(tagList(lapply(header_labels, tags$td))) - table_html <- shiny::tags$table( + table_html <- tags$table( class = "table custom-table", - shiny::tags$thead(header_html), - shiny::tags$tbody(body_html) + tags$thead(header_html), + tags$tbody(body_html) ) logger::log_trace("FilteredData$srv_filter_overview@1 updated counts") table_html @@ -962,7 +962,7 @@ FilteredData <- R6::R6Class( # nolint ns <- NS(id) active_slices_id <- isolate(vapply(self$get_filter_state(), `[[`, character(1), "id")) - shiny::tags$div( + tags$div( id = ns("available_menu"), shinyWidgets::dropMenu( actionLink( @@ -972,7 +972,7 @@ FilteredData <- R6::R6Class( # nolint title = "Available filters", class = "remove pull-right" ), - shiny::tags$div( + tags$div( class = "menu-content", shinycssloaders::withSpinner( uiOutput(ns("checkbox")), @@ -1008,17 +1008,17 @@ FilteredData <- R6::R6Class( # nolint }) checkbox_group_element <- function(name, value, label, checked, disabled = FALSE) { - shiny::tags$div( + tags$div( class = "checkbox available-filters", - shiny::tags$label( - shiny::tags$input( + tags$label( + tags$input( type = "checkbox", name = name, value = value, checked = checked, disabled = if (disabled) "disabled" ), - shiny::tags$span(label, disabled = if (disabled) disabled) + tags$span(label, disabled = if (disabled) disabled) ) ) } @@ -1053,10 +1053,10 @@ FilteredData <- R6::R6Class( # nolint htmltools::tagInsertChildren( checkbox, - shiny::tags$br(), - if (length(non_interactive_choice_mock)) shiny::tags$strong("Fixed filters"), + tags$br(), + if (length(non_interactive_choice_mock)) tags$strong("Fixed filters"), non_interactive_choice_mock, - if (length(interactive_choice_mock)) shiny::tags$strong("Interactive filters"), + if (length(interactive_choice_mock)) tags$strong("Interactive filters"), interactive_choice_mock, .cssSelector = "div.shiny-options-group", after = 0 diff --git a/R/FilteredDataset.R b/R/FilteredDataset.R index ddc448473..187b9053b 100644 --- a/R/FilteredDataset.R +++ b/R/FilteredDataset.R @@ -218,15 +218,15 @@ FilteredDataset <- R6::R6Class( # nolint ns <- NS(id) if_multiple_filter_states <- length(private$get_filter_states()) > 1 - shiny::tags$span( + tags$span( id = id, include_css_files("filter-panel"), - shiny::tags$div( + tags$div( id = ns("whole_ui"), # to hide it entirely fluidRow( column( width = 8, - shiny::tags$span(dataname, class = "filter_panel_dataname") + tags$span(dataname, class = "filter_panel_dataname") ), column( width = 4, @@ -247,15 +247,15 @@ FilteredDataset <- R6::R6Class( # nolint ) ), shinyjs::hidden( - shiny::tags$div( + tags$div( id = ns("filter_count_ui"), tagList( textOutput(ns("filter_count")), - shiny::tags$br() + tags$br() ) ) ), - shiny::tags$div( + tags$div( # id needed to insert and remove UI to filter single variable as needed # it is currently also used by the above module to entirely hide this panel id = ns("filters"), diff --git a/R/FilteredDatasetDataframe.R b/R/FilteredDatasetDataframe.R index fb98250ca..7046b9e78 100644 --- a/R/FilteredDatasetDataframe.R +++ b/R/FilteredDatasetDataframe.R @@ -233,7 +233,7 @@ DataframeFilteredDataset <- R6::R6Class( # nolint ui_add = function(id) { ns <- NS(id) tagList( - shiny::tags$label("Add", shiny::tags$code(self$get_dataname()), "filter"), + tags$label("Add", tags$code(self$get_dataname()), "filter"), private$get_filter_states()[["filter"]]$ui_add(id = ns("filter")) ) }, diff --git a/R/FilteredDatasetDefault.R b/R/FilteredDatasetDefault.R index 47a404b8f..9e489705c 100644 --- a/R/FilteredDatasetDefault.R +++ b/R/FilteredDatasetDefault.R @@ -101,7 +101,7 @@ DefaultFilteredDataset <- R6::R6Class( # nolint #' @return An empty `div`. ui_active = function(id) { ns <- NS(id) - shiny::tags$div() + tags$div() }, #' @description @@ -113,7 +113,7 @@ DefaultFilteredDataset <- R6::R6Class( # nolint #' @return An empty `div`. ui_add = function(id) { ns <- NS(id) - shiny::tags$div() + tags$div() } ), private = list( diff --git a/R/FilteredDatasetMAE.R b/R/FilteredDatasetMAE.R index 5aa06711c..dcb8a914b 100644 --- a/R/FilteredDatasetMAE.R +++ b/R/FilteredDatasetMAE.R @@ -190,11 +190,11 @@ MAEFilteredDataset <- R6::R6Class( # nolint data <- self$get_dataset() experiment_names <- names(data) - shiny::tags$div( - shiny::tags$label("Add", shiny::tags$code(self$get_dataname()), "filter"), - shiny::tags$br(), + tags$div( + tags$label("Add", tags$code(self$get_dataname()), "filter"), + tags$br(), HTML("►"), - shiny::tags$label("Add subjects filter"), + tags$label("Add subjects filter"), private$get_filter_states()[["subjects"]]$ui_add(id = ns("subjects")), tagList( lapply( @@ -202,7 +202,7 @@ MAEFilteredDataset <- R6::R6Class( # nolint function(experiment_name) { tagList( HTML("►"), - shiny::tags$label("Add", shiny::tags$code(experiment_name), "filter"), + tags$label("Add", tags$code(experiment_name), "filter"), private$get_filter_states()[[experiment_name]]$ui_add(id = ns(experiment_name)) ) } diff --git a/R/count_labels.R b/R/count_labels.R index 5e0815eb9..faf13f06a 100644 --- a/R/count_labels.R +++ b/R/count_labels.R @@ -125,17 +125,17 @@ countBar <- function(inputId, label, countmax, countnow = NULL, counttotal = cou label <- make_count_text(label, countmax = countmax, countnow = countnow) ns <- NS(inputId) if (is.null(countnow)) countnow <- 0 - shiny::tags$div( + tags$div( class = "progress state-count-container", # * .9 to not exceed width of the parent html element - shiny::tags$div( + tags$div( id = ns("count_bar_filtered"), class = "progress-bar state-count-bar-filtered", style = sprintf("width: %s%%", countnow / counttotal * 100), role = "progressbar", label ), - shiny::tags$div( + tags$div( id = ns("count_bar_unfiltered"), class = "progress-bar state-count-bar-unfiltered", style = sprintf("width: %s%%", (countmax - countnow) / counttotal * 100), diff --git a/R/include_css_js.R b/R/include_css_js.R index 22922f55b..9f492b4fe 100644 --- a/R/include_css_js.R +++ b/R/include_css_js.R @@ -13,5 +13,5 @@ include_css_files <- function(pattern = "*") { system.file("css", package = "teal.slice", mustWork = TRUE), pattern = pattern, full.names = TRUE ) - singleton(shiny::tags$head(lapply(css_files, includeCSS))) + singleton(tags$head(lapply(css_files, includeCSS))) }