Skip to content

Commit

Permalink
Data Selection is "Optional" (#373)
Browse files Browse the repository at this point in the history
* Data Selection is "Optional"

* propose to put buttons under each other and change color, as before they seemt to be on the same level

* Merged develop and adjusted design

---------

Co-authored-by: Lea@Mac <[email protected]>
  • Loading branch information
PaulJonasJost and LeaSeep authored Nov 8, 2024
1 parent db2cd09 commit 78ec773
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 29 deletions.
82 changes: 54 additions & 28 deletions program/shinyApp/R/data_selection/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -149,44 +149,70 @@ data_selection_main_panel <- mainPanel(
icon = icon('plus'),
style = "color: #000000; background-color: transparent; border-color: transparent"
),
div(
div(
id = "geneAnno_toggle",
style = "display: none;",
class = "AddGeneSymbols_ui",
uiOutput("AddGeneSymbols_organism_ui"),
uiOutput("AddGeneSymbols_ui"),
hr(style = "border-top: 1px solid #858585;")
),

fluidRow(
column(5,
div(class = "DataSelection",
h4("Row selection - biochemical entities"),
uiOutput("providedRowAnnotationTypes_ui"),
uiOutput("row_selection_ui"),
uiOutput("propensityChoiceUser_ui")
)),
column(6,
div(class = "SampleSelection",
h4("Sample selection") %>% helper(type = "markdown", content = "DataSelection_RowSelection"),
uiOutput("providedSampleAnnotationTypes_ui"),
uiOutput("sample_selection_ui")
))
),
div(
id = "SaveInputAsRDS",
downloadButton(
outputId = "SaveInputAsList",
label = "Save file input to upload later"
) %>% helper(type = "markdown", content = "DataSelection_compilation_help")
actionButton(
"select_data", "Select Data",
width = "100%",
icon = icon('filter'),
style = "color: #fffff; background-color: white; border-color: #000000"
)
)),
br(),
conditionalPanel(
condition = "input.select_data % 2 == 0",
fluidRow(column(5,
actionButton(
"use_full_data", "Use Full Dataset",
width = "100%",
icon = icon('rocket'),
style = "color: #fffff; background-color: #70BF4F47; border-color: #000000"
)
))
),
br(), br(), br(),
hr(style = "border-top: 1px solid #858585;"),
actionButton(
inputId = "NextPanel",
label = "Start the Journey",
width = "100%",
icon = icon('rocket'),
style = "color: #fffff; background-color: #70BF4F47; border-color: #000000"
conditionalPanel(
condition = "input.select_data % 2 == 1",
hr(style = "border-top: 1px solid #858585;"),
fluidRow(
column(5,
div(class = "DataSelection",
h4("Row selection - biochemical entities"),
uiOutput("providedRowAnnotationTypes_ui"),
uiOutput("row_selection_ui"),
uiOutput("propensityChoiceUser_ui")
)),
column(6,
div(class = "SampleSelection",
h4("Sample selection") %>% helper(type = "markdown", content = "DataSelection_RowSelection"),
uiOutput("providedSampleAnnotationTypes_ui"),
uiOutput("sample_selection_ui")
))
),
div(
id = "SaveInputAsRDS",
hr(style = "border-top: 1px solid #858585;"),
downloadButton(
outputId = "SaveInputAsList",
label = "Save file input to upload later"
) %>% helper(type = "markdown", content = "DataSelection_compilation_help")
),
hr(style = "border-top: 1px solid #858585;"),
actionButton(
inputId = "NextPanel",
label = "Start the Journey",
width = "100%",
icon = icon('rocket'),
style = "color: #fffff; background-color: #70BF4F47; border-color: #000000"
),
),
# hidden button
hidden(actionButton(
Expand Down
2 changes: 1 addition & 1 deletion program/shinyApp/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ server <- function(input,output,session){
})

## Log Selection ----
observeEvent(input$NextPanel,{
observeEvent(c(input$NextPanel, input$use_full_data),{
# Do actual selection before logging
print(selectedData())
# add row and col selection options
Expand Down

0 comments on commit 78ec773

Please sign in to comment.