Skip to content

Commit

Permalink
attempt to display comparison builder first
Browse files Browse the repository at this point in the history
  • Loading branch information
mauromiguelm committed Apr 25, 2024
1 parent d359b7f commit babf850
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 27 deletions.
52 changes: 27 additions & 25 deletions components/board.upload/R/upload_module_preview.R
Original file line number Diff line number Diff line change
Expand Up @@ -540,29 +540,31 @@ upload_table_preview_contrasts_server <- function(

output$table_contrasts <- shiny::renderUI({

if(selected_contrast_input() == FALSE) {
# I will set selected_contrast_input to true for now (selection page will be disabled)
# if(selected_contrast_input() == FALSE) {
# ask user if preferrence is upload contrast or create contrast online
div(
style = "display: flex; gap: 80px; flex-direction: column; justify-content: center; align-items: center; height: 50%;",
div(h4("Please choose one of the following options:")),
div(
style = "display: flex; justify-content: center; gap: 20px;",
actionButton(
ns("goUploadComparison"),
label = " Upload comparisons file",
class = "btn btn-primary m-1",
icon("upload")
),
actionButton(
ns("goOnlineComparison"),
label = " Build my comparisons",
class = "btn btn-primary m-1",
icon("pen-to-square")
)
)
#TODO remove this is not needed
# div(
# style = "display: flex; gap: 80px; flex-direction: column; justify-content: center; align-items: center; height: 50%;",
# div(h4("Please choose one of the following options:")),
# div(
# style = "display: flex; justify-content: center; gap: 20px;",
# actionButton(
# ns("goUploadComparison"),
# label = " Upload comparisons file",
# class = "btn btn-primary m-1",
# icon("upload")
# ),
# actionButton(
# ns("goOnlineComparison"),
# label = " Build my comparisons",
# class = "btn btn-primary m-1",
# icon("pen-to-square")
# )
# )

)
} else {
# )
# } else {
# only display buttons if goOnlineComparison is false

action_buttons1 <- div(
Expand Down Expand Up @@ -698,14 +700,14 @@ upload_table_preview_contrasts_server <- function(
)
}
)
}
# }

})

# control state of comparison builder
observeEvent(input$run_build_comparisons, {
show_comparison_builder(TRUE)
})
# observeEvent(input$run_build_comparisons, {
# show_comparison_builder(TRUE)
# })

observeEvent(input$goUploadComparison, {
selected_contrast_input(TRUE)
Expand Down
4 changes: 2 additions & 2 deletions components/board.upload/R/upload_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ UploadBoard <- function(id,
upload_gset_methods <- reactiveVal(NULL)
upload_gx_methods <- reactiveVal(NULL)
process_counter <- reactiveVal(0)
show_comparison_builder <- shiny::reactiveVal(FALSE)
selected_contrast_input <- shiny::reactiveVal(FALSE)
show_comparison_builder <- shiny::reactiveVal(TRUE)
selected_contrast_input <- shiny::reactiveVal(TRUE)
reset_upload_text_input <- shiny::reactiveVal(0)

output$navheader <- shiny::renderUI({
Expand Down

0 comments on commit babf850

Please sign in to comment.