Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

445 unify html tags #268

Merged
merged 3 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions R/tm_g_gh_boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -223,24 +223,24 @@ ui_g_boxplot <- function(id, ...) {
a <- list(...)

teal.widgets::standard_layout(
output = div(
output = tags$div(
fluidRow(
teal.widgets::plot_with_settings_ui(id = ns("boxplot"))
),
fluidRow(column(
width = 12,
br(), hr(),
h4("Selected Data Points"),
tags$br(), tags$hr(),
tags$h4("Selected Data Points"),
DT::dataTableOutput(ns("brush_data"))
)),
fluidRow(column(
width = 12,
br(), hr(),
h4("Descriptive Statistics"),
tags$br(), tags$hr(),
tags$h4("Descriptive Statistics"),
DT::dataTableOutput(ns("table_ui"))
))
),
encoding = div(
encoding = tags$div(
### Reporter
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
###
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_gh_correlationplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ ui_g_correlationplot <- function(id, ...) {

teal.widgets::standard_layout(
output = templ_ui_output_datatable(ns),
encoding = div(
encoding = tags$div(
### Reporter
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
###
Expand Down
8 changes: 4 additions & 4 deletions R/tm_g_gh_density_distribution_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,18 @@ ui_g_density_distribution_plot <- function(id, ...) {
a <- list(...)

teal.widgets::standard_layout(
output = div(
output = tags$div(
fluidRow(
teal.widgets::plot_with_settings_ui(id = ns("plot"))
),
fluidRow(column(
width = 12,
br(), hr(),
h4("Descriptive Statistics"),
tags$br(), tags$hr(),
tags$h4("Descriptive Statistics"),
DT::dataTableOutput(ns("table_ui"))
))
),
encoding = div(
encoding = tags$div(
### Reporter
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
###
Expand Down
14 changes: 7 additions & 7 deletions R/tm_g_gh_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ ui_lineplot <- function(id, ...) {
include_css_files("custom"),
teal.widgets::standard_layout(
output = teal.widgets::plot_with_settings_ui(id = ns("plot")),
encoding = div(
encoding = tags$div(
### Reporter
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
###
Expand All @@ -231,10 +231,10 @@ ui_lineplot <- function(id, ...) {
uiOutput(ns("shape_ui")),
radioButtons(ns("stat"), "Select a Statistic:", c("mean", "median"), a$stat),
checkboxInput(ns("include_stat"), "Include Statistic Table", value = TRUE),
div(
tags$div(
sliderInput(
ns("relative_height"),
div(
tags$div(
"Relative height of plot to table(s)",
title =
paste(
Expand Down Expand Up @@ -566,15 +566,15 @@ srv_lineplot <- function(id,
),
selected = x_type
)
div(
tags$div(
tags$label("Line configuration for:", tags$code(x)),
div(
tags$div(
class = "flex",
div(
tags$div(
class = "flex-grow-1",
color_input
),
div(
tags$div(
class = "flex-grow-1",
type_input
)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_gh_scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ ui_g_scatterplot <- function(id, ...) {

teal.widgets::standard_layout(
output = templ_ui_output_datatable(ns),
encoding = div(
encoding = tags$div(
### Reporter
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
###
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_gh_spaghettiplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ g_ui_spaghettiplot <- function(id, ...) {
include_css_files("custom"),
teal.widgets::standard_layout(
output = templ_ui_output_datatable(ns),
encoding = div(
encoding = tags$div(
### Reporter
teal.reporter::simple_reporter_ui(ns("simple_reporter")),
###
Expand Down Expand Up @@ -272,7 +272,7 @@ g_ui_spaghettiplot <- function(id, ...) {
teal.widgets::panel_group(
teal.widgets::panel_item(
title = "Plot Aesthetic Settings",
div(
tags$div(
toggle_slider_ui(
ns("yrange_scale"),
label = "Y-Axis Range Zoom",
Expand Down
8 changes: 4 additions & 4 deletions R/toggleable_slider.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#' value <- c(20.3, 81.5) # dichotomous slider
#' # value <- c(50.1) # normal slider
#' app <- shinyApp(
#' ui = div(
#' ui = tags$div(
#' teal.goshawk:::toggle_slider_ui(
#' "toggle_slider", "Select value",
#' min = 0.2, max = 100.1, value = value,
Expand Down Expand Up @@ -91,10 +91,10 @@ toggle_slider_ui <- function(id,

show_or_not <- function(show) if (show) identity else shinyjs::hidden
ns <- NS(id)
div(
tags$div(
include_css_files("custom"),
shinyjs::useShinyjs(),
div(
tags$div(
class = "flex justify-between mb-1",
tags$span(tags$strong(label)),
actionButton(ns("toggle"), "Toggle", class = "btn-xs")
Expand Down Expand Up @@ -124,7 +124,7 @@ toggle_slider_ui <- function(id,
width = width
)
} else {
div(
tags$div(
numericInput(
ns("value_low"),
"From:",
Expand Down
6 changes: 3 additions & 3 deletions R/utils-arbitrary_lines.r
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
#' @keywords internal
ui_arbitrary_lines <- function(id, line_arb, line_arb_label, line_arb_color, title = "Arbitrary Horizontal Lines:") {
ns <- NS(id)
div(
tags$div(
tags$b(title),
textInput(
ns("line_arb"),
div(
tags$div(
class = "teal-tooltip",
tagList(
"Value:",
icon("circle-info"),
span(
tags$span(
class = "tooltiptext",
"For multiple lines, supply a comma separated list of values."
)
Expand Down
10 changes: 5 additions & 5 deletions R/utils-data_constraints.r
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
templ_ui_constraint <- function(ns, label = "Data Constraint") {
div(
tags$div(
id = ns("constraint_var_whole"), # give an id to hide it
radioButtons(ns("constraint_var"), label, choices = "NONE"),
shinyjs::hidden(div(
shinyjs::hidden(tags$div(
id = ns("constraint_range"),
div(
tags$div(
class = "inline-block;",
numericInput(ns("constraint_range_min"), label = "Min", value = 0, min = 0, max = 0)
),
div(
tags$div(
class = "inline-block;",
numericInput(ns("constraint_range_max"), label = "Min", value = 0, min = 0, max = 0)
)
)),
shinyjs::hidden(div(
shinyjs::hidden(tags$div(
id = ns("all_na"),
helpText("All values are missing (NA)")
))
Expand Down
6 changes: 3 additions & 3 deletions R/utils-templ_ui.r
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
templ_ui_output_datatable <- function(ns) {
div(
tags$div(
teal.widgets::plot_with_settings_ui(id = ns("plot")),
br(), hr(),
h4("Selected Data Points"),
tags$br(), tags$hr(),
tags$h4("Selected Data Points"),
DT::dataTableOutput(ns("brush_data"))
)
}
Expand Down
4 changes: 2 additions & 2 deletions man/tm_g_gh_boxplot.Rd

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

4 changes: 2 additions & 2 deletions man/tm_g_gh_correlationplot.Rd

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

4 changes: 2 additions & 2 deletions man/tm_g_gh_density_distribution_plot.Rd

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

4 changes: 2 additions & 2 deletions man/tm_g_gh_lineplot.Rd

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

4 changes: 2 additions & 2 deletions man/tm_g_gh_scatterplot.Rd

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

4 changes: 2 additions & 2 deletions man/tm_g_gh_spaghettiplot.Rd

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

2 changes: 1 addition & 1 deletion man/toggle_slider_ui.Rd

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

Loading