Skip to content

Commit

Permalink
add divs to hide
Browse files Browse the repository at this point in the history
  • Loading branch information
LeaSeep committed Nov 6, 2024
1 parent 523d0b3 commit 9eef386
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 55 deletions.
1 change: 1 addition & 0 deletions program/shinyApp/R/sample_correlation/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ sample_correlation_server <- function(id, data, params){
req(selectedData_processed())
req(input$SampleAnnotationChoice)
req(input$Do_SampleCorrelation > 0)
shinyjs::showElement(id = "div_sampleCorrelation_main_panel")
waiter <- Waiter$new(
html = LOADING_SCREEN,
color="#A208BA35"
Expand Down
112 changes: 57 additions & 55 deletions program/shinyApp/R/sample_correlation/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,61 +29,63 @@ sampleCorrelation_main_panel <- function(ns){
mainPanel(
id = "main_sampleCorrelation",
textOutput(outputId = ns("SampleCorr_Info"), container = pre),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("100%"),
plotOutput(
outputId = ns("SampleCorrelationPlot")
)
),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("70%", "30%"),
NULL,
actionButton(
inputId = ns("only2Report_SampleCorrelation"),
label = "Send only to Report",
class = "btn-info"
)
) %>% helper(type = "markdown", content = "SampleCorr_Downloads"),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("70%", "30%"),
NULL,
downloadButton(
outputId = ns("getR_SampleCorrelation"),
label = "Get underlying R code and data",
icon = icon(name = "code")
)
),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("70%", "30%"),
NULL,
downloadButton(
outputId = ns("SavePlot_SampleCorrelation"),
label = "Save plot",
class = "btn-info"
)
),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("70%", "30%"),
NULL,
radioGroupButtons(
inputId = ns("file_ext_SampleCorrelation"),
label = "File Type:",
choices = c(".png", ".tiff", ".pdf"),
selected = ".png"
)
),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("50%", "50%"),
cellArgs = list(style = "padding: 5px"),
div(textAreaInput(
inputId = ns("NotesSampleCorrelation"),
label = "Notes:",
placeholder = NOTES_PlACEHOLDER,
width = "1000px"
) %>% helper(type = "markdown", content = "TakingNotesMD_help"),
helpText(NOTES_HELP)),
NULL
),
div(id = "div_sampleCorrelation_main_panel",
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("100%"),
plotOutput(
outputId = ns("SampleCorrelationPlot")
)
),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("70%", "30%"),
NULL,
actionButton(
inputId = ns("only2Report_SampleCorrelation"),
label = "Send only to Report",
class = "btn-info"
)
) %>% helper(type = "markdown", content = "SampleCorr_Downloads"),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("70%", "30%"),
NULL,
downloadButton(
outputId = ns("getR_SampleCorrelation"),
label = "Get underlying R code and data",
icon = icon(name = "code")
)
),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("70%", "30%"),
NULL,
downloadButton(
outputId = ns("SavePlot_SampleCorrelation"),
label = "Save plot",
class = "btn-info"
)
),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("70%", "30%"),
NULL,
radioGroupButtons(
inputId = ns("file_ext_SampleCorrelation"),
label = "File Type:",
choices = c(".png", ".tiff", ".pdf"),
selected = ".png"
)
),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("50%", "50%"),
cellArgs = list(style = "padding: 5px"),
div(textAreaInput(
inputId = ns("NotesSampleCorrelation"),
label = "Notes:",
placeholder = NOTES_PlACEHOLDER,
width = "1000px"
) %>% helper(type = "markdown", content = "TakingNotesMD_help"),
helpText(NOTES_HELP)),
NULL
),
)
)
}

Expand Down
1 change: 1 addition & 0 deletions program/shinyApp/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ server <- function(input,output,session){
hideTab(inputId = "tabsetPanel1", target = "Enrichment Analysis")
shinyjs::hide("mainPanel_DataSelection")
shinyjs::hideElement(id = "data_summary")
shinyjs::hideElement(id = "div_sampleCorrelation_main_panel")

# Init res_tmp and par_tmp objects if they do not yet exist ----
if(!exists("res_tmp")){
Expand Down

0 comments on commit 9eef386

Please sign in to comment.