Skip to content

Commit

Permalink
feat: cards implemented in plot module
Browse files Browse the repository at this point in the history
  • Loading branch information
mauromiguelm committed Mar 20, 2023
1 parent 6124138 commit 75fae68
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 35 deletions.
78 changes: 43 additions & 35 deletions components/base/R/ui-PlotModule.R
Original file line number Diff line number Diff line change
Expand Up @@ -241,41 +241,47 @@ PlotModuleUI <- function(id,
caption <- shiny::HTML(caption)
caption <- shiny::div(caption, class="caption")
}

div( class="plotmodule",
shiny::fillCol(
flex = c(NA,1,NA,0.001,NA),
height = height.1,
div( header, class="plotmodule-header"),
outputFunc(ns("renderfigure"), width=width.1, height=height.1) %>%
shinycssloaders::withSpinner(),
caption,
shiny::div(class="popup-modal",
modalUI(
id = ns("plotPopup"),
title = title,
size = "fullscreen",
footer = NULL,
popupfigUI()
)
),
shiny::div(class="popup-modal",
modalUI(
id = ns("plotPopup_editor"),
title = "Editor",
size = "fullscreen",
footer = NULL,
popupfigUI_editor()
# div( class="plotmodule",
# # shiny::fillCol(
# # flex = c(NA,1,NA,0.001,NA),

bslib::card(
full_screen = TRUE,
bslib::card_body_fill(
class = "plotmodule",
div( header, class="plotmodule-header"),
outputFunc(ns("renderfigure")) %>%
shinycssloaders::withSpinner(),
caption,
shiny::div(class="popup-modal",
modalUI(
id = ns("plotPopup"),
title = title,
size = "fullscreen",
footer = NULL,
popupfigUI()
)
),
shiny::div(class="popup-modal",
modalUI(
id = ns("plotPopup_editor"),
title = "Editor",
size = "fullscreen",
footer = NULL,
popupfigUI_editor()
)
),
shiny::tagList(
shiny::tags$head(shiny::tags$style(modaldialog.style)),
shiny::tags$head(shiny::tags$style(modalbody.style)),
shiny::tags$head(shiny::tags$style(modalcontent.style)),
shiny::tags$head(shiny::tags$style(modalfooter.none))
)
),
shiny::tagList(
shiny::tags$head(shiny::tags$style(modaldialog.style)),
shiny::tags$head(shiny::tags$style(modalbody.style)),
shiny::tags$head(shiny::tags$style(modalcontent.style)),
shiny::tags$head(shiny::tags$style(modalfooter.none))
)
)
)



)

}

Expand Down Expand Up @@ -307,6 +313,8 @@ PlotModuleServer <- function(
id,
function(input, output, session) {



ns <- session$ns

##--------------------------------------------------------------------------------
Expand Down Expand Up @@ -656,8 +664,8 @@ PlotModuleServer <- function(

if(is.null(func2)) func2 <- func
if(is.null(plotlib2)) plotlib2 <- plotlib
if(length(height)==1) height <- c(height,700)
if(length(width)==1) width <- c(width,1200)
if(length(height)==1) height <- "auto"
if(length(width)==1) width <- "auto"
if(length(res)==1) res <- c(res, 1.3*res)

res.1 <- res[1]
Expand Down
2 changes: 2 additions & 0 deletions components/board.expression/R/expression_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ ExpressionBoard <- function(id, pgx) {
shiny::req(pgx)

contr <- colnames(pgx$model.parameters$contr.matrix)

browser()
shiny::updateSelectInput(session, "gx_contrast", choices = sort(contr))
fam <- pgx.getFamilies(pgx, nmin = 10, extended = FALSE)
shiny::updateSelectInput(session, "gx_features", choices = fam)
Expand Down

0 comments on commit 75fae68

Please sign in to comment.