diff --git a/R/app_ui.R b/R/app_ui.R index b705e93..5034af1 100644 --- a/R/app_ui.R +++ b/R/app_ui.R @@ -26,33 +26,7 @@ app_ui = function(request) { shiny::tabPanel( title = "Data", shiny::fluidRow( - shiny::column( - 12, - # use details and summary to create expandable section - htmltools::tags$details( - # preview of expandable section - htmltools::tags$summary("Cluster statistics (click to expand)"), - shiny::br(), - - # text to print choice - shiny::textOutput("select_text"), - shiny::br(), - - # output options - shiny::tabsetPanel( - id = "plot_tabs", - - # Tables tab - tablesUI("table1"), - - # Plots tab - plotsUI("plot1"), - - # RDS tab - rdsUI("rds1") - ) - ) - ) + shiny::column(12, clusterStatsUI(id = NULL)) ), # end fluid row # Bottom row - show tree (static html output from tfpscanner) diff --git a/R/module_cluster_stats.R b/R/module_cluster_stats.R new file mode 100644 index 0000000..ac82940 --- /dev/null +++ b/R/module_cluster_stats.R @@ -0,0 +1,28 @@ +clusterStatsUI = function(id) { + ns = NS(id) + + # use details and summary to create expandable section + htmltools::tags$details( + # preview of expandable section + htmltools::tags$summary("Cluster statistics (click to expand)"), + shiny::br(), + + # text to print choice + shiny::textOutput(ns("select_text")), + shiny::br(), + + # output options + shiny::tabsetPanel( + id = ns("plot_tabs"), + + # Tables tab + tablesUI(ns("table1")), + + # Plots tab + plotsUI(ns("plot1")), + + # RDS tab + rdsUI(ns("rds1")) + ) + ) +}