From 9f5c068b082c7edef8d50d9590aab086dd5f14c4 Mon Sep 17 00:00:00 2001 From: kartikeya kirar Date: Mon, 18 Mar 2024 12:13:15 +0530 Subject: [PATCH] 445 unify html tags (#566) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes https://github.com/insightsengineering/teal.slice/issues/445 --------- Co-authored-by: AndrĂ© VerĂ­ssimo <211358+averissimo@users.noreply.github.com> --- R/FilterState.R | 24 +++++++++--------- R/FilterStateChoices.R | 36 +++++++++++++------------- R/FilterStateDate.R | 44 ++++++++++++++++---------------- R/FilterStateDatettime.R | 52 +++++++++++++++++++------------------- R/FilterStateEmpty.R | 2 +- R/FilterStateExpr.R | 24 +++++++++--------- R/FilterStateLogical.R | 34 ++++++++++++------------- R/FilterStateRange.R | 44 ++++++++++++++++---------------- R/FilterStates-utils.R | 2 +- R/FilterStates.R | 8 +++--- R/FilterStatesDF.R | 52 +++++++++++++++++++------------------- R/FilterStatesSE.R | 10 ++++---- R/FilteredData-utils.R | 4 +-- R/FilteredData.R | 26 +++++++++---------- R/FilteredDataset.R | 10 ++++---- R/FilteredDatasetDefault.R | 4 +-- R/FilteredDatasetMAE.R | 4 +-- R/count_labels.R | 2 +- man/ChoicesFilterState.Rd | 32 +++++++++++------------ man/DFFilterStates.Rd | 52 +++++++++++++++++++------------------- man/DateFilterState.Rd | 32 +++++++++++------------ man/DatetimeFilterState.Rd | 32 +++++++++++------------ man/FilterStateExpr.Rd | 18 ++++++------- man/LogicalFilterState.Rd | 30 +++++++++++----------- man/RangeFilterState.Rd | 36 +++++++++++++------------- man/countBars.Rd | 2 +- man/init_filter_states.Rd | 2 +- man/toggle_button.Rd | 4 +-- 28 files changed, 311 insertions(+), 311 deletions(-) diff --git a/R/FilterState.R b/R/FilterState.R index 972c260b4..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. - div( + tags$div( id = id, class = "panel filter-card", include_js_files("count-bar-labels.js"), - div( + tags$div( class = "filter-card-header", `data-toggle` = "collapse", `data-bs-toggle` = "collapse", href = paste0("#", ns("body")), - 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") }, - div(class = "filter-card-varname", strong(private$get_varname())), - div(class = "filter-card-varlabel", private$get_varlabel()), - 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 } ) ), - div(class = "filter-card-summary", private$ui_summary(ns("summary"))) + tags$div(class = "filter-card-summary", private$ui_summary(ns("summary"))) ), - div( + tags$div( id = ns("body"), class = "collapse out", `data-parent` = paste0("#", parent_id), `data-bs-parent` = paste0("#", parent_id), - 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) - 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 = 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() ) - div( + tags$div( uiOutput(ns("trigger_visible"), inline = TRUE), ui_input ) diff --git a/R/FilterStateChoices.R b/R/FilterStateChoices.R index 963ce93b8..246d70e3a 100644 --- a/R/FilterStateChoices.R +++ b/R/FilterStateChoices.R @@ -46,25 +46,25 @@ #' useShinyjs(), #' include_css_files(pattern = "filter-panel"), #' include_js_files(pattern = "count-bar-labels"), -#' column(4, div( -#' h4("ChoicesFilterState"), +#' column(4, tags$div( +#' tags$h4("ChoicesFilterState"), #' fs$ui("fs") #' )), -#' column(4, div( -#' h4("Condition (i.e. call)"), # display the condition call generated by this FilterState -#' textOutput("condition_choices"), br(), -#' h4("Unformatted state"), # display raw filter state -#' textOutput("unformatted_choices"), br(), -#' h4("Formatted state"), # display human readable filter state -#' textOutput("formatted_choices"), br() +#' column(4, tags$div( +#' tags$h4("Condition (i.e. call)"), # display the condition call generated by this FilterState +#' textOutput("condition_choices"), tags$br(), +#' tags$h4("Unformatted state"), # display raw filter state +#' textOutput("unformatted_choices"), tags$br(), +#' tags$h4("Formatted state"), # display human readable filter state +#' textOutput("formatted_choices"), tags$br() #' )), -#' column(4, div( -#' h4("Programmatic filter control"), -#' actionButton("button1_choices", "set drop NA", width = "100%"), br(), -#' actionButton("button2_choices", "set keep NA", width = "100%"), br(), -#' actionButton("button3_choices", "set selection: a, b", width = "100%"), br(), -#' actionButton("button4_choices", "deselect all", width = "100%"), br(), -#' actionButton("button0_choices", "set initial state", width = "100%"), br() +#' column(4, tags$div( +#' tags$h4("Programmatic filter control"), +#' actionButton("button1_choices", "set drop NA", width = "100%"), tags$br(), +#' actionButton("button2_choices", "set keep NA", width = "100%"), tags$br(), +#' actionButton("button3_choices", "set selection: a, b", width = "100%"), tags$br(), +#' actionButton("button4_choices", "deselect all", width = "100%"), tags$br(), +#' actionButton("button0_choices", "set initial state", width = "100%"), tags$br() #' )) #' ) #' @@ -374,7 +374,7 @@ ChoicesFilterState <- R6::R6Class( # nolint countsnow = countsnow, countsmax = countsmax ) - div( + tags$div( class = "choices_state", if (private$is_multiple()) { checkboxGroupInput( @@ -416,7 +416,7 @@ ChoicesFilterState <- R6::R6Class( # nolint ) ) } - div( + tags$div( uiOutput(ns("trigger_visible")), ui_input, private$keep_na_ui(ns("keep_na")) diff --git a/R/FilterStateDate.R b/R/FilterStateDate.R index 05e9b7b93..d6d7b7b53 100644 --- a/R/FilterStateDate.R +++ b/R/FilterStateDate.R @@ -47,26 +47,26 @@ #' useShinyjs(), #' include_css_files(pattern = "filter-panel"), #' include_js_files(pattern = "count-bar-labels"), -#' column(4, div( -#' h4("DateFilterState"), +#' column(4, tags$div( +#' tags$h4("DateFilterState"), #' fs$ui("fs") #' )), -#' column(4, div( +#' column(4, tags$div( #' id = "outputs", # div id is needed for toggling the element -#' h4("Condition (i.e. call)"), # display the condition call generated by this FilterState -#' textOutput("condition_date"), br(), -#' h4("Unformatted state"), # display raw filter state -#' textOutput("unformatted_date"), br(), -#' h4("Formatted state"), # display human readable filter state -#' textOutput("formatted_date"), br() +#' tags$h4("Condition (i.e. call)"), # display the condition call generated by this FilterState +#' textOutput("condition_date"), tags$br(), +#' tags$h4("Unformatted state"), # display raw filter state +#' textOutput("unformatted_date"), tags$br(), +#' tags$h4("Formatted state"), # display human readable filter state +#' textOutput("formatted_date"), tags$br() #' )), -#' column(4, div( -#' h4("Programmatic filter control"), -#' actionButton("button1_date", "set drop NA", width = "100%"), br(), -#' actionButton("button2_date", "set keep NA", width = "100%"), br(), -#' actionButton("button3_date", "set a range", width = "100%"), br(), -#' actionButton("button4_date", "set full range", width = "100%"), br(), -#' actionButton("button0_date", "set initial state", width = "100%"), br() +#' column(4, tags$div( +#' tags$h4("Programmatic filter control"), +#' actionButton("button1_date", "set drop NA", width = "100%"), tags$br(), +#' actionButton("button2_date", "set keep NA", width = "100%"), tags$br(), +#' actionButton("button3_date", "set a range", width = "100%"), tags$br(), +#' actionButton("button4_date", "set full range", width = "100%"), tags$br(), +#' actionButton("button0_date", "set initial state", width = "100%"), tags$br() #' )) #' ) #' @@ -278,8 +278,8 @@ DateFilterState <- R6::R6Class( # nolint ui_inputs = function(id) { ns <- NS(id) isolate({ - div( - 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") ), - 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) - div( - div(icon("calendar-days"), vals[1]), - div(span(" - "), icon("calendar-days"), vals[2]) + tags$div( + tags$div(icon("calendar-days"), vals[1]), + tags$div(span(" - "), icon("calendar-days"), vals[2]) ) }) diff --git a/R/FilterStateDatettime.R b/R/FilterStateDatettime.R index eb29379d2..f035dfe79 100644 --- a/R/FilterStateDatettime.R +++ b/R/FilterStateDatettime.R @@ -47,26 +47,26 @@ #' useShinyjs(), #' include_css_files(pattern = "filter-panel"), #' include_js_files(pattern = "count-bar-labels"), -#' column(4, div( -#' h4("DatetimeFilterState"), +#' column(4, tags$div( +#' tags$h4("DatetimeFilterState"), #' fs$ui("fs") #' )), -#' column(4, div( +#' column(4, tags$div( #' id = "outputs", # div id is needed for toggling the element -#' h4("Condition (i.e. call)"), # display the condition call generated by this FilterState -#' textOutput("condition_datetime"), br(), -#' h4("Unformatted state"), # display raw filter state -#' textOutput("unformatted_datetime"), br(), -#' h4("Formatted state"), # display human readable filter state -#' textOutput("formatted_datetime"), br() +#' tags$h4("Condition (i.e. call)"), # display the condition call generated by this FilterState +#' textOutput("condition_datetime"), tags$br(), +#' tags$h4("Unformatted state"), # display raw filter state +#' textOutput("unformatted_datetime"), tags$br(), +#' tags$h4("Formatted state"), # display human readable filter state +#' textOutput("formatted_datetime"), tags$br() #' )), -#' column(4, div( -#' h4("Programmatic filter control"), -#' actionButton("button1_datetime", "set drop NA", width = "100%"), br(), -#' actionButton("button2_datetime", "set keep NA", width = "100%"), br(), -#' actionButton("button3_datetime", "set a range", width = "100%"), br(), -#' actionButton("button4_datetime", "set full range", width = "100%"), br(), -#' actionButton("button0_datetime", "set initial state", width = "100%"), br() +#' column(4, tags$div( +#' tags$h4("Programmatic filter control"), +#' actionButton("button1_datetime", "set drop NA", width = "100%"), tags$br(), +#' actionButton("button2_datetime", "set keep NA", width = "100%"), tags$br(), +#' actionButton("button3_datetime", "set a range", width = "100%"), tags$br(), +#' actionButton("button4_datetime", "set full range", width = "100%"), tags$br(), +#' actionButton("button0_datetime", "set initial state", width = "100%"), tags$br() #' )) #' ) #' @@ -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")) - div( - div( + tags$div( + tags$div( class = "flex", ui_reset_1, - div( + tags$div( class = "flex w-80 filter_datelike_input", - div(class = "w-45 text-center", ui_input_1), - span( + tags$div(class = "w-45 text-center", ui_input_1), + tags$span( class = "input-group-addon w-10", - 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" ), - 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) - div( - div(icon("clock"), vals[1]), - div(span(" - "), icon("clock"), vals[2]) + tags$div( + tags$div(icon("clock"), vals[1]), + tags$div(span(" - "), icon("clock"), vals[2]) ) }) diff --git a/R/FilterStateEmpty.R b/R/FilterStateEmpty.R index e7d7118dd..841b14add 100644 --- a/R/FilterStateEmpty.R +++ b/R/FilterStateEmpty.R @@ -128,7 +128,7 @@ EmptyFilterState <- R6::R6Class( # nolint ui_inputs = function(id) { ns <- NS(id) isolate({ - div( + tags$div( tags$span("Variable contains missing values only"), private$keep_na_ui(ns("keep_na")) ) diff --git a/R/FilterStateExpr.R b/R/FilterStateExpr.R index d591ce5b1..0a77a5662 100644 --- a/R/FilterStateExpr.R +++ b/R/FilterStateExpr.R @@ -36,17 +36,17 @@ #' useShinyjs(), #' include_css_files(pattern = "filter-panel"), #' include_js_files(pattern = "count-bar-labels"), -#' column(4, div( -#' h4("ChoicesFilterState"), +#' column(4, tags$div( +#' tags$h4("ChoicesFilterState"), #' filter_state$ui("fs") #' )), -#' column(8, div( -#' h4("Condition (i.e. call)"), # display the condition call generated by this FilterState -#' textOutput("condition_choices"), br(), -#' h4("Unformatted state"), # display raw filter state -#' textOutput("unformatted_choices"), br(), -#' h4("Formatted state"), # display human readable filter state -#' textOutput("formatted_choices"), br() +#' column(8, tags$div( +#' tags$h4("Condition (i.e. call)"), # display the condition call generated by this FilterState +#' textOutput("condition_choices"), tags$br(), +#' tags$h4("Unformatted state"), # display raw filter state +#' textOutput("unformatted_choices"), tags$br(), +#' tags$h4("Formatted state"), # display human readable filter state +#' textOutput("formatted_choices"), tags$br() #' )) #' ) #' @@ -204,9 +204,9 @@ FilterStateExpr <- R6::R6Class( # nolint } else { icon("lock", class = "filter-card-icon") }, - div(class = "filter-card-varname", tags$strong(private$teal_slice$id)), - div(class = "filter-card-varlabel", private$teal_slice$title), - 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( diff --git a/R/FilterStateLogical.R b/R/FilterStateLogical.R index 00bd9be26..c22888ce7 100644 --- a/R/FilterStateLogical.R +++ b/R/FilterStateLogical.R @@ -38,25 +38,25 @@ #' useShinyjs(), #' include_css_files(pattern = "filter-panel"), #' include_js_files(pattern = "count-bar-labels"), -#' column(4, div( -#' h4("LogicalFilterState"), +#' column(4, tags$div( +#' tags$h4("LogicalFilterState"), #' fs$ui("fs") #' )), -#' column(4, div( +#' column(4, tags$div( #' id = "outputs", # div id is needed for toggling the element -#' h4("Condition (i.e. call)"), # display the condition call generated by this FilterState -#' textOutput("condition_logical"), br(), -#' h4("Unformatted state"), # display raw filter state -#' textOutput("unformatted_logical"), br(), -#' h4("Formatted state"), # display human readable filter state -#' textOutput("formatted_logical"), br() +#' tags$h4("Condition (i.e. call)"), # display the condition call generated by this FilterState +#' textOutput("condition_logical"), tags$br(), +#' tags$h4("Unformatted state"), # display raw filter state +#' textOutput("unformatted_logical"), tags$br(), +#' tags$h4("Formatted state"), # display human readable filter state +#' textOutput("formatted_logical"), tags$br() #' )), -#' column(4, div( -#' h4("Programmatic filter control"), -#' actionButton("button1_logical", "set drop NA", width = "100%"), br(), -#' actionButton("button2_logical", "set keep NA", width = "100%"), br(), -#' actionButton("button3_logical", "set a selection", width = "100%"), br(), -#' actionButton("button0_logical", "set initial state", width = "100%"), br() +#' column(4, tags$div( +#' tags$h4("Programmatic filter control"), +#' actionButton("button1_logical", "set drop NA", width = "100%"), tags$br(), +#' actionButton("button2_logical", "set keep NA", width = "100%"), tags$br(), +#' actionButton("button3_logical", "set a selection", width = "100%"), tags$br(), +#' actionButton("button0_logical", "set initial state", width = "100%"), tags$br() #' )) #' ) #' @@ -272,8 +272,8 @@ LogicalFilterState <- R6::R6Class( # nolint width = "100%" ) } - div( - div( + tags$div( + tags$div( class = "choices_state", uiOutput(ns("trigger_visible"), inline = TRUE), ui_input diff --git a/R/FilterStateRange.R b/R/FilterStateRange.R index 456917e06..7b1256ae5 100644 --- a/R/FilterStateRange.R +++ b/R/FilterStateRange.R @@ -50,28 +50,28 @@ #' useShinyjs(), #' include_css_files(pattern = "filter-panel"), #' include_js_files(pattern = "count-bar-labels"), -#' column(4, div( -#' h4("RangeFilterState"), +#' column(4, tags$div( +#' tags$h4("RangeFilterState"), #' fs$ui("fs") #' )), -#' column(4, div( +#' column(4, tags$div( #' id = "outputs", # div id is needed for toggling the element -#' h4("Condition (i.e. call)"), # display the condition call generated by this FilterState -#' textOutput("condition_range"), br(), -#' h4("Unformatted state"), # display raw filter state -#' textOutput("unformatted_range"), br(), -#' h4("Formatted state"), # display human readable filter state -#' textOutput("formatted_range"), br() +#' tags$h4("Condition (i.e. call)"), # display the condition call generated by this FilterState +#' textOutput("condition_range"), tags$br(), +#' tags$h4("Unformatted state"), # display raw filter state +#' textOutput("unformatted_range"), tags$br(), +#' tags$h4("Formatted state"), # display human readable filter state +#' textOutput("formatted_range"), tags$br() #' )), -#' column(4, div( -#' h4("Programmatic filter control"), -#' actionButton("button1_range", "set drop NA", width = "100%"), br(), -#' actionButton("button2_range", "set keep NA", width = "100%"), br(), -#' actionButton("button3_range", "set drop Inf", width = "100%"), br(), -#' actionButton("button4_range", "set keep Inf", width = "100%"), br(), -#' actionButton("button5_range", "set a range", width = "100%"), br(), -#' actionButton("button6_range", "set full range", width = "100%"), br(), -#' actionButton("button0_range", "set initial state", width = "100%"), br() +#' column(4, tags$div( +#' tags$h4("Programmatic filter control"), +#' actionButton("button1_range", "set drop NA", width = "100%"), tags$br(), +#' actionButton("button2_range", "set keep NA", width = "100%"), tags$br(), +#' actionButton("button3_range", "set drop Inf", width = "100%"), tags$br(), +#' actionButton("button4_range", "set keep Inf", width = "100%"), tags$br(), +#' actionButton("button5_range", "set a range", width = "100%"), tags$br(), +#' actionButton("button6_range", "set full range", width = "100%"), tags$br(), +#' actionButton("button0_range", "set initial state", width = "100%"), tags$br() #' )) #' ) #' @@ -417,7 +417,7 @@ RangeFilterState <- R6::R6Class( # nolint width = "100%" ) tagList( - div( + tags$div( class = "choices_state", tags$head(tags$script( # Inline JS code for popover functionality. @@ -437,7 +437,7 @@ RangeFilterState <- R6::R6Class( # nolint });' ) )), - div( + tags$div( actionLink( ns("plotly_info"), label = NULL, @@ -463,7 +463,7 @@ RangeFilterState <- R6::R6Class( # nolint ), ui_input ), - div( + tags$div( class = "filter-card-body-keep-na-inf", private$keep_inf_ui(ns("keep_inf")), private$keep_na_ui(ns("keep_na")) @@ -675,7 +675,7 @@ RangeFilterState <- R6::R6Class( # nolint ), value = isolate(private$get_keep_inf()) ) - div( + tags$div( uiOutput(ns("trigger_visible"), inline = TRUE), ui_input ) diff --git a/R/FilterStates-utils.R b/R/FilterStates-utils.R index b06db2af1..bf77df0cb 100644 --- a/R/FilterStates-utils.R +++ b/R/FilterStates-utils.R @@ -35,7 +35,7 @@ #' #' library(shiny) #' ui <- fluidPage( -#' actionButton("clear", span(icon("xmark"), "Remove all filters")), +#' actionButton("clear", tags$span(icon("xmark"), "Remove all filters")), #' rf$ui_add(id = "add"), #' rf$ui_active("states"), #' verbatimTextOutput("expr"), diff --git a/R/FilterStates.R b/R/FilterStates.R index 4f6b7d557..2c88188ef 100644 --- a/R/FilterStates.R +++ b/R/FilterStates.R @@ -407,9 +407,9 @@ FilterStates <- R6::R6Class( # nolint ns <- NS(id) if (ncol(data) == 0) { - div("no sample variables available") + tags$div("no sample variables available") } else if (nrow(data) == 0) { - 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) { - span("No available columns to add.") + tags$span("No available columns to add.") } else { - div( + tags$div( teal.widgets::optionalSelectInput( session$ns("var_to_add"), choices = avail_column_choices(), diff --git a/R/FilterStatesDF.R b/R/FilterStatesDF.R index e2880a554..0410463c9 100644 --- a/R/FilterStatesDF.R +++ b/R/FilterStatesDF.R @@ -46,35 +46,35 @@ #' useShinyjs(), #' include_css_files(pattern = "filter-panel"), #' include_js_files(pattern = "count-bar-labels"), -#' column(4, div( -#' h4("Active filters"), +#' column(4, tags$div( +#' tags$h4("Active filters"), #' filter_states_df$ui_active("fsdf") #' )), -#' column(4, div( -#' h4("Manual filter control"), -#' filter_states_df$ui_add("add_filters"), br(), -#' h4("Condition (i.e. call)"), # display the subset expression generated by this FilterStates -#' textOutput("call_df"), br(), -#' h4("Formatted state"), # display human readable filter state -#' textOutput("formatted_df"), br() +#' column(4, tags$div( +#' tags$h4("Manual filter control"), +#' filter_states_df$ui_add("add_filters"), tags$br(), +#' tags$h4("Condition (i.e. call)"), # display the subset expression generated by this FilterStates +#' textOutput("call_df"), tags$br(), +#' tags$h4("Formatted state"), # display human readable filter state +#' textOutput("formatted_df"), tags$br() #' )), -#' column(4, div( -#' h4("Programmatic filter control"), -#' actionButton("button1_df", "set NUM1 < 30", width = "100%"), br(), -#' actionButton("button2_df", "set NUM2 %in% c(20, 21)", width = "100%"), br(), -#' actionButton("button3_df", "set CHAR1 %in% c(\"B\", \"C\", \"D\")", width = "100%"), br(), -#' actionButton("button4_df", "set CHAR2 == \"F\"", width = "100%"), br(), -#' actionButton("button5_df", "set DATE <= 2020-02-02", width = "100%"), br(), -#' actionButton("button6_df", "set DATETIME <= 2020-02-02", width = "100%"), br(), -#' hr(), -#' actionButton("button7_df", "remove NUM1", width = "100%"), br(), -#' actionButton("button8_df", "remove NUM2", width = "100%"), br(), -#' actionButton("button9_df", "remove CHAR1", width = "100%"), br(), -#' actionButton("button10_df", "remove CHAR2", width = "100%"), br(), -#' actionButton("button11_df", "remove DATE", width = "100%"), br(), -#' actionButton("button12_df", "remove DATETIME", width = "100%"), br(), -#' hr(), -#' actionButton("button0_df", "clear all filters", width = "100%"), br() +#' column(4, tags$div( +#' tags$h4("Programmatic filter control"), +#' actionButton("button1_df", "set NUM1 < 30", width = "100%"), tags$br(), +#' actionButton("button2_df", "set NUM2 %in% c(20, 21)", width = "100%"), tags$br(), +#' actionButton("button3_df", "set CHAR1 %in% c(\"B\", \"C\", \"D\")", width = "100%"), tags$br(), +#' actionButton("button4_df", "set CHAR2 == \"F\"", width = "100%"), tags$br(), +#' actionButton("button5_df", "set DATE <= 2020-02-02", width = "100%"), tags$br(), +#' actionButton("button6_df", "set DATETIME <= 2020-02-02", width = "100%"), tags$br(), +#' tags$hr(), +#' actionButton("button7_df", "remove NUM1", width = "100%"), tags$br(), +#' actionButton("button8_df", "remove NUM2", width = "100%"), tags$br(), +#' actionButton("button9_df", "remove CHAR1", width = "100%"), tags$br(), +#' actionButton("button10_df", "remove CHAR2", width = "100%"), tags$br(), +#' actionButton("button11_df", "remove DATE", width = "100%"), tags$br(), +#' actionButton("button12_df", "remove DATETIME", width = "100%"), tags$br(), +#' tags$hr(), +#' actionButton("button0_df", "clear all filters", width = "100%"), tags$br() #' )) #' ) #' diff --git a/R/FilterStatesSE.R b/R/FilterStatesSE.R index ef41b5eff..6038ff8bc 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) { - div("no sample variables available") + tags$div("no sample variables available") } else if (nrow(SummarizedExperiment::rowData(data)) == 0) { - 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) { - div("no sample variables available") + tags$div("no sample variables available") } else if (nrow(SummarizedExperiment::colData(data)) == 0) { - 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 ) } - div( + tags$div( row_input, col_input ) diff --git a/R/FilteredData-utils.R b/R/FilteredData-utils.R index bb3212dad..b44f5232b 100644 --- a/R/FilteredData-utils.R +++ b/R/FilteredData-utils.R @@ -95,8 +95,8 @@ eval_expr_with_msg <- function(expr, env) { #' actionButton("hide_content", label = "hide", icon = icon("xmark")), #' actionButton("show_content", label = "show", icon = icon("check")), #' actionButton("toggle_content", label = "toggle", icon = icon("angle-down")), -#' br(), -#' div( +#' tags$br(), +#' tags$div( #' id = "content", #' verbatimTextOutput("printout") #' ) diff --git a/R/FilteredData.R b/R/FilteredData.R index 0197c6cf8..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) - div( + tags$div( id = ns(NULL), # used for hiding / showing include_css_files(pattern = "filter-panel"), self$ui_overview(ns("overview")), @@ -552,7 +552,7 @@ FilteredData <- R6::R6Class( # nolint #' @return `shiny.tag` ui_active = function(id) { ns <- NS(id) - div( + tags$div( id = id, # not used, can be used to customize CSS behavior class = "well", tags$div( @@ -574,7 +574,7 @@ FilteredData <- R6::R6Class( # nolint class = "remove_all pull-right" ) ), - div( + tags$div( id = ns("filter_active_vars_contents"), tagList( lapply( @@ -587,7 +587,7 @@ FilteredData <- R6::R6Class( # nolint ) ), shinyjs::hidden( - div( + tags$div( id = ns("filters_active_count"), textOutput(ns("teal_filters_count")) ) @@ -671,7 +671,7 @@ FilteredData <- R6::R6Class( # nolint #' @return `shiny.tag` ui_add = function(id) { ns <- NS(id) - div( + tags$div( id = id, # not used, can be used to customize CSS behavior class = "well", tags$div( @@ -691,14 +691,14 @@ FilteredData <- R6::R6Class( # nolint ) ) ), - div( + tags$div( id = ns("filter_add_vars_contents"), tagList( lapply( self$datanames(), function(dataname) { fdataset <- private$get_filtered_dataset(dataname) - span(id = ns(dataname), fdataset$ui_add(ns(dataname))) + tags$span(id = ns(dataname), fdataset$ui_add(ns(dataname))) } ) ) @@ -760,7 +760,7 @@ FilteredData <- R6::R6Class( # nolint #' ui_overview = function(id) { ns <- NS(id) - div( + tags$div( id = id, # not used, can be used to customize CSS behavior class = "well", tags$div( @@ -780,9 +780,9 @@ FilteredData <- R6::R6Class( # nolint ) ) ), - div( + tags$div( id = ns("filters_overview_contents"), - div( + tags$div( class = "teal_active_summary_filter_panel", tableOutput(ns("table")) ) @@ -962,7 +962,7 @@ FilteredData <- R6::R6Class( # nolint ns <- NS(id) active_slices_id <- isolate(vapply(self$get_filter_state(), `[[`, character(1), "id")) - 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" ), - div( + tags$div( class = "menu-content", shinycssloaders::withSpinner( uiOutput(ns("checkbox")), @@ -1053,7 +1053,7 @@ FilteredData <- R6::R6Class( # nolint htmltools::tagInsertChildren( checkbox, - br(), + tags$br(), if (length(non_interactive_choice_mock)) tags$strong("Fixed filters"), non_interactive_choice_mock, if (length(interactive_choice_mock)) tags$strong("Interactive filters"), diff --git a/R/FilteredDataset.R b/R/FilteredDataset.R index e29973d68..13d961f60 100644 --- a/R/FilteredDataset.R +++ b/R/FilteredDataset.R @@ -218,10 +218,10 @@ FilteredDataset <- R6::R6Class( # nolint ns <- NS(id) if_multiple_filter_states <- length(private$get_filter_states()) > 1 - span( + tags$span( id = id, include_css_files("filter-panel"), - div( + tags$div( id = ns("whole_ui"), # to hide it entirely fluidRow( column( @@ -247,15 +247,15 @@ FilteredDataset <- R6::R6Class( # nolint ) ), shinyjs::hidden( - div( + tags$div( id = ns("filter_count_ui"), tagList( textOutput(ns("filter_count")), - br() + tags$br() ) ) ), - 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/FilteredDatasetDefault.R b/R/FilteredDatasetDefault.R index c26ba8b07..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) - div() + tags$div() }, #' @description @@ -113,7 +113,7 @@ DefaultFilteredDataset <- R6::R6Class( # nolint #' @return An empty `div`. ui_add = function(id) { ns <- NS(id) - div() + tags$div() } ), private = list( diff --git a/R/FilteredDatasetMAE.R b/R/FilteredDatasetMAE.R index a580b7206..e9ea22c63 100644 --- a/R/FilteredDatasetMAE.R +++ b/R/FilteredDatasetMAE.R @@ -190,9 +190,9 @@ MAEFilteredDataset <- R6::R6Class( # nolint data <- self$get_dataset() experiment_names <- names(data) - div( + tags$div( tags$label("Add", tags$code(self$get_dataname()), "filter"), - br(), + tags$br(), HTML("►"), tags$label("Add subjects filter"), private$get_filter_states()[["subjects"]]$ui_add(id = ns("subjects")), diff --git a/R/count_labels.R b/R/count_labels.R index 6fc3d9a40..faf13f06a 100644 --- a/R/count_labels.R +++ b/R/count_labels.R @@ -39,7 +39,7 @@ #' ) #' #' ui <- fluidPage( -#' div( +#' tags$div( #' class = "choices_state", #' include_js_files("count-bar-labels.js"), #' include_css_files(pattern = "filter-panel"), diff --git a/man/ChoicesFilterState.Rd b/man/ChoicesFilterState.Rd index cd804ca75..0aa4f28cc 100644 --- a/man/ChoicesFilterState.Rd +++ b/man/ChoicesFilterState.Rd @@ -46,25 +46,25 @@ ui <- fluidPage( useShinyjs(), include_css_files(pattern = "filter-panel"), include_js_files(pattern = "count-bar-labels"), - column(4, div( - h4("ChoicesFilterState"), + column(4, tags$div( + tags$h4("ChoicesFilterState"), fs$ui("fs") )), - column(4, div( - h4("Condition (i.e. call)"), # display the condition call generated by this FilterState - textOutput("condition_choices"), br(), - h4("Unformatted state"), # display raw filter state - textOutput("unformatted_choices"), br(), - h4("Formatted state"), # display human readable filter state - textOutput("formatted_choices"), br() + column(4, tags$div( + tags$h4("Condition (i.e. call)"), # display the condition call generated by this FilterState + textOutput("condition_choices"), tags$br(), + tags$h4("Unformatted state"), # display raw filter state + textOutput("unformatted_choices"), tags$br(), + tags$h4("Formatted state"), # display human readable filter state + textOutput("formatted_choices"), tags$br() )), - column(4, div( - h4("Programmatic filter control"), - actionButton("button1_choices", "set drop NA", width = "100\%"), br(), - actionButton("button2_choices", "set keep NA", width = "100\%"), br(), - actionButton("button3_choices", "set selection: a, b", width = "100\%"), br(), - actionButton("button4_choices", "deselect all", width = "100\%"), br(), - actionButton("button0_choices", "set initial state", width = "100\%"), br() + column(4, tags$div( + tags$h4("Programmatic filter control"), + actionButton("button1_choices", "set drop NA", width = "100\%"), tags$br(), + actionButton("button2_choices", "set keep NA", width = "100\%"), tags$br(), + actionButton("button3_choices", "set selection: a, b", width = "100\%"), tags$br(), + actionButton("button4_choices", "deselect all", width = "100\%"), tags$br(), + actionButton("button0_choices", "set initial state", width = "100\%"), tags$br() )) ) diff --git a/man/DFFilterStates.Rd b/man/DFFilterStates.Rd index a7de79f4b..2d0ab3e47 100644 --- a/man/DFFilterStates.Rd +++ b/man/DFFilterStates.Rd @@ -46,35 +46,35 @@ ui <- fluidPage( useShinyjs(), include_css_files(pattern = "filter-panel"), include_js_files(pattern = "count-bar-labels"), - column(4, div( - h4("Active filters"), + column(4, tags$div( + tags$h4("Active filters"), filter_states_df$ui_active("fsdf") )), - column(4, div( - h4("Manual filter control"), - filter_states_df$ui_add("add_filters"), br(), - h4("Condition (i.e. call)"), # display the subset expression generated by this FilterStates - textOutput("call_df"), br(), - h4("Formatted state"), # display human readable filter state - textOutput("formatted_df"), br() + column(4, tags$div( + tags$h4("Manual filter control"), + filter_states_df$ui_add("add_filters"), tags$br(), + tags$h4("Condition (i.e. call)"), # display the subset expression generated by this FilterStates + textOutput("call_df"), tags$br(), + tags$h4("Formatted state"), # display human readable filter state + textOutput("formatted_df"), tags$br() )), - column(4, div( - h4("Programmatic filter control"), - actionButton("button1_df", "set NUM1 < 30", width = "100\%"), br(), - actionButton("button2_df", "set NUM2 \%in\% c(20, 21)", width = "100\%"), br(), - actionButton("button3_df", "set CHAR1 \%in\% c(\"B\", \"C\", \"D\")", width = "100\%"), br(), - actionButton("button4_df", "set CHAR2 == \"F\"", width = "100\%"), br(), - actionButton("button5_df", "set DATE <= 2020-02-02", width = "100\%"), br(), - actionButton("button6_df", "set DATETIME <= 2020-02-02", width = "100\%"), br(), - hr(), - actionButton("button7_df", "remove NUM1", width = "100\%"), br(), - actionButton("button8_df", "remove NUM2", width = "100\%"), br(), - actionButton("button9_df", "remove CHAR1", width = "100\%"), br(), - actionButton("button10_df", "remove CHAR2", width = "100\%"), br(), - actionButton("button11_df", "remove DATE", width = "100\%"), br(), - actionButton("button12_df", "remove DATETIME", width = "100\%"), br(), - hr(), - actionButton("button0_df", "clear all filters", width = "100\%"), br() + column(4, tags$div( + tags$h4("Programmatic filter control"), + actionButton("button1_df", "set NUM1 < 30", width = "100\%"), tags$br(), + actionButton("button2_df", "set NUM2 \%in\% c(20, 21)", width = "100\%"), tags$br(), + actionButton("button3_df", "set CHAR1 \%in\% c(\"B\", \"C\", \"D\")", width = "100\%"), tags$br(), + actionButton("button4_df", "set CHAR2 == \"F\"", width = "100\%"), tags$br(), + actionButton("button5_df", "set DATE <= 2020-02-02", width = "100\%"), tags$br(), + actionButton("button6_df", "set DATETIME <= 2020-02-02", width = "100\%"), tags$br(), + tags$hr(), + actionButton("button7_df", "remove NUM1", width = "100\%"), tags$br(), + actionButton("button8_df", "remove NUM2", width = "100\%"), tags$br(), + actionButton("button9_df", "remove CHAR1", width = "100\%"), tags$br(), + actionButton("button10_df", "remove CHAR2", width = "100\%"), tags$br(), + actionButton("button11_df", "remove DATE", width = "100\%"), tags$br(), + actionButton("button12_df", "remove DATETIME", width = "100\%"), tags$br(), + tags$hr(), + actionButton("button0_df", "clear all filters", width = "100\%"), tags$br() )) ) diff --git a/man/DateFilterState.Rd b/man/DateFilterState.Rd index 3143c55ef..4f10b664a 100644 --- a/man/DateFilterState.Rd +++ b/man/DateFilterState.Rd @@ -47,26 +47,26 @@ ui <- fluidPage( useShinyjs(), include_css_files(pattern = "filter-panel"), include_js_files(pattern = "count-bar-labels"), - column(4, div( - h4("DateFilterState"), + column(4, tags$div( + tags$h4("DateFilterState"), fs$ui("fs") )), - column(4, div( + column(4, tags$div( id = "outputs", # div id is needed for toggling the element - h4("Condition (i.e. call)"), # display the condition call generated by this FilterState - textOutput("condition_date"), br(), - h4("Unformatted state"), # display raw filter state - textOutput("unformatted_date"), br(), - h4("Formatted state"), # display human readable filter state - textOutput("formatted_date"), br() + tags$h4("Condition (i.e. call)"), # display the condition call generated by this FilterState + textOutput("condition_date"), tags$br(), + tags$h4("Unformatted state"), # display raw filter state + textOutput("unformatted_date"), tags$br(), + tags$h4("Formatted state"), # display human readable filter state + textOutput("formatted_date"), tags$br() )), - column(4, div( - h4("Programmatic filter control"), - actionButton("button1_date", "set drop NA", width = "100\%"), br(), - actionButton("button2_date", "set keep NA", width = "100\%"), br(), - actionButton("button3_date", "set a range", width = "100\%"), br(), - actionButton("button4_date", "set full range", width = "100\%"), br(), - actionButton("button0_date", "set initial state", width = "100\%"), br() + column(4, tags$div( + tags$h4("Programmatic filter control"), + actionButton("button1_date", "set drop NA", width = "100\%"), tags$br(), + actionButton("button2_date", "set keep NA", width = "100\%"), tags$br(), + actionButton("button3_date", "set a range", width = "100\%"), tags$br(), + actionButton("button4_date", "set full range", width = "100\%"), tags$br(), + actionButton("button0_date", "set initial state", width = "100\%"), tags$br() )) ) diff --git a/man/DatetimeFilterState.Rd b/man/DatetimeFilterState.Rd index 686caf6df..b9053a4fd 100644 --- a/man/DatetimeFilterState.Rd +++ b/man/DatetimeFilterState.Rd @@ -47,26 +47,26 @@ ui <- fluidPage( useShinyjs(), include_css_files(pattern = "filter-panel"), include_js_files(pattern = "count-bar-labels"), - column(4, div( - h4("DatetimeFilterState"), + column(4, tags$div( + tags$h4("DatetimeFilterState"), fs$ui("fs") )), - column(4, div( + column(4, tags$div( id = "outputs", # div id is needed for toggling the element - h4("Condition (i.e. call)"), # display the condition call generated by this FilterState - textOutput("condition_datetime"), br(), - h4("Unformatted state"), # display raw filter state - textOutput("unformatted_datetime"), br(), - h4("Formatted state"), # display human readable filter state - textOutput("formatted_datetime"), br() + tags$h4("Condition (i.e. call)"), # display the condition call generated by this FilterState + textOutput("condition_datetime"), tags$br(), + tags$h4("Unformatted state"), # display raw filter state + textOutput("unformatted_datetime"), tags$br(), + tags$h4("Formatted state"), # display human readable filter state + textOutput("formatted_datetime"), tags$br() )), - column(4, div( - h4("Programmatic filter control"), - actionButton("button1_datetime", "set drop NA", width = "100\%"), br(), - actionButton("button2_datetime", "set keep NA", width = "100\%"), br(), - actionButton("button3_datetime", "set a range", width = "100\%"), br(), - actionButton("button4_datetime", "set full range", width = "100\%"), br(), - actionButton("button0_datetime", "set initial state", width = "100\%"), br() + column(4, tags$div( + tags$h4("Programmatic filter control"), + actionButton("button1_datetime", "set drop NA", width = "100\%"), tags$br(), + actionButton("button2_datetime", "set keep NA", width = "100\%"), tags$br(), + actionButton("button3_datetime", "set a range", width = "100\%"), tags$br(), + actionButton("button4_datetime", "set full range", width = "100\%"), tags$br(), + actionButton("button0_datetime", "set initial state", width = "100\%"), tags$br() )) ) diff --git a/man/FilterStateExpr.Rd b/man/FilterStateExpr.Rd index 23c7a46fe..bd1ede71f 100644 --- a/man/FilterStateExpr.Rd +++ b/man/FilterStateExpr.Rd @@ -36,17 +36,17 @@ ui <- fluidPage( useShinyjs(), include_css_files(pattern = "filter-panel"), include_js_files(pattern = "count-bar-labels"), - column(4, div( - h4("ChoicesFilterState"), + column(4, tags$div( + tags$h4("ChoicesFilterState"), filter_state$ui("fs") )), - column(8, div( - h4("Condition (i.e. call)"), # display the condition call generated by this FilterState - textOutput("condition_choices"), br(), - h4("Unformatted state"), # display raw filter state - textOutput("unformatted_choices"), br(), - h4("Formatted state"), # display human readable filter state - textOutput("formatted_choices"), br() + column(8, tags$div( + tags$h4("Condition (i.e. call)"), # display the condition call generated by this FilterState + textOutput("condition_choices"), tags$br(), + tags$h4("Unformatted state"), # display raw filter state + textOutput("unformatted_choices"), tags$br(), + tags$h4("Formatted state"), # display human readable filter state + textOutput("formatted_choices"), tags$br() )) ) diff --git a/man/LogicalFilterState.Rd b/man/LogicalFilterState.Rd index 5d9f09778..7cd2158e8 100644 --- a/man/LogicalFilterState.Rd +++ b/man/LogicalFilterState.Rd @@ -38,25 +38,25 @@ ui <- fluidPage( useShinyjs(), include_css_files(pattern = "filter-panel"), include_js_files(pattern = "count-bar-labels"), - column(4, div( - h4("LogicalFilterState"), + column(4, tags$div( + tags$h4("LogicalFilterState"), fs$ui("fs") )), - column(4, div( + column(4, tags$div( id = "outputs", # div id is needed for toggling the element - h4("Condition (i.e. call)"), # display the condition call generated by this FilterState - textOutput("condition_logical"), br(), - h4("Unformatted state"), # display raw filter state - textOutput("unformatted_logical"), br(), - h4("Formatted state"), # display human readable filter state - textOutput("formatted_logical"), br() + tags$h4("Condition (i.e. call)"), # display the condition call generated by this FilterState + textOutput("condition_logical"), tags$br(), + tags$h4("Unformatted state"), # display raw filter state + textOutput("unformatted_logical"), tags$br(), + tags$h4("Formatted state"), # display human readable filter state + textOutput("formatted_logical"), tags$br() )), - column(4, div( - h4("Programmatic filter control"), - actionButton("button1_logical", "set drop NA", width = "100\%"), br(), - actionButton("button2_logical", "set keep NA", width = "100\%"), br(), - actionButton("button3_logical", "set a selection", width = "100\%"), br(), - actionButton("button0_logical", "set initial state", width = "100\%"), br() + column(4, tags$div( + tags$h4("Programmatic filter control"), + actionButton("button1_logical", "set drop NA", width = "100\%"), tags$br(), + actionButton("button2_logical", "set keep NA", width = "100\%"), tags$br(), + actionButton("button3_logical", "set a selection", width = "100\%"), tags$br(), + actionButton("button0_logical", "set initial state", width = "100\%"), tags$br() )) ) diff --git a/man/RangeFilterState.Rd b/man/RangeFilterState.Rd index 1851d6890..2db5834ac 100644 --- a/man/RangeFilterState.Rd +++ b/man/RangeFilterState.Rd @@ -50,28 +50,28 @@ ui <- fluidPage( useShinyjs(), include_css_files(pattern = "filter-panel"), include_js_files(pattern = "count-bar-labels"), - column(4, div( - h4("RangeFilterState"), + column(4, tags$div( + tags$h4("RangeFilterState"), fs$ui("fs") )), - column(4, div( + column(4, tags$div( id = "outputs", # div id is needed for toggling the element - h4("Condition (i.e. call)"), # display the condition call generated by this FilterState - textOutput("condition_range"), br(), - h4("Unformatted state"), # display raw filter state - textOutput("unformatted_range"), br(), - h4("Formatted state"), # display human readable filter state - textOutput("formatted_range"), br() + tags$h4("Condition (i.e. call)"), # display the condition call generated by this FilterState + textOutput("condition_range"), tags$br(), + tags$h4("Unformatted state"), # display raw filter state + textOutput("unformatted_range"), tags$br(), + tags$h4("Formatted state"), # display human readable filter state + textOutput("formatted_range"), tags$br() )), - column(4, div( - h4("Programmatic filter control"), - actionButton("button1_range", "set drop NA", width = "100\%"), br(), - actionButton("button2_range", "set keep NA", width = "100\%"), br(), - actionButton("button3_range", "set drop Inf", width = "100\%"), br(), - actionButton("button4_range", "set keep Inf", width = "100\%"), br(), - actionButton("button5_range", "set a range", width = "100\%"), br(), - actionButton("button6_range", "set full range", width = "100\%"), br(), - actionButton("button0_range", "set initial state", width = "100\%"), br() + column(4, tags$div( + tags$h4("Programmatic filter control"), + actionButton("button1_range", "set drop NA", width = "100\%"), tags$br(), + actionButton("button2_range", "set keep NA", width = "100\%"), tags$br(), + actionButton("button3_range", "set drop Inf", width = "100\%"), tags$br(), + actionButton("button4_range", "set keep Inf", width = "100\%"), tags$br(), + actionButton("button5_range", "set a range", width = "100\%"), tags$br(), + actionButton("button6_range", "set full range", width = "100\%"), tags$br(), + actionButton("button0_range", "set initial state", width = "100\%"), tags$br() )) ) diff --git a/man/countBars.Rd b/man/countBars.Rd index 2b71cf87e..bfc88fd7b 100644 --- a/man/countBars.Rd +++ b/man/countBars.Rd @@ -61,7 +61,7 @@ labels <- countBars( ) ui <- fluidPage( - div( + tags$div( class = "choices_state", include_js_files("count-bar-labels.js"), include_css_files(pattern = "filter-panel"), diff --git a/man/init_filter_states.Rd b/man/init_filter_states.Rd index 20b4958b3..8493447c3 100644 --- a/man/init_filter_states.Rd +++ b/man/init_filter_states.Rd @@ -55,7 +55,7 @@ rf <- init_filter_states( library(shiny) ui <- fluidPage( - actionButton("clear", span(icon("xmark"), "Remove all filters")), + actionButton("clear", tags$span(icon("xmark"), "Remove all filters")), rf$ui_add(id = "add"), rf$ui_active("states"), verbatimTextOutput("expr"), diff --git a/man/toggle_button.Rd b/man/toggle_button.Rd index dcd44c5c3..86b4daf2f 100644 --- a/man/toggle_button.Rd +++ b/man/toggle_button.Rd @@ -46,8 +46,8 @@ ui <- fluidPage( actionButton("hide_content", label = "hide", icon = icon("xmark")), actionButton("show_content", label = "show", icon = icon("check")), actionButton("toggle_content", label = "toggle", icon = icon("angle-down")), - br(), - div( + tags$br(), + tags$div( id = "content", verbatimTextOutput("printout") )