Skip to content

Commit

Permalink
Style code (GHA)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaliniPandurangan committed Aug 28, 2023
1 parent da0216d commit e575302
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
1 change: 0 additions & 1 deletion components/board.upload/R/upload_module_computepgx.R
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,6 @@ upload_module_computepgx_server <- function(
observe(check_process_status())

observe({

if (process_counter() > 0) {
shiny::insertUI(
selector = "#current_dataset",
Expand Down
14 changes: 7 additions & 7 deletions components/ui/ui-PlotModule.R
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ PlotModuleUI <- function(id,
if (any(class(caption) == "reactive")) {
caption <- caption()
}

e <- bslib::card(
full_screen = FALSE,
style = paste0("height:", height.1, ";overflow: visible;"),
Expand Down Expand Up @@ -400,9 +400,9 @@ PlotModuleServer <- function(id,
id,
function(input, output, session) {
ns <- session$ns

filename <- ns("title")
stopwords = c('-title', '-pltmod-title', '-plot-title', '-pltsrv-title', '-plotmodule-title')
stopwords <- c("-title", "-pltmod-title", "-plot-title", "-pltsrv-title", "-plotmodule-title")
x <- unlist(strsplit(filename, "-"))
x <- x[!x %in% stopwords]
filename <- paste(x, collapse = "-")
Expand Down Expand Up @@ -521,7 +521,7 @@ PlotModuleServer <- function(id,

if (do.png && is.null(download.png)) {
download.png <- shiny::downloadHandler(
filename = paste0(filename,".png"),
filename = paste0(filename, ".png"),
content = function(file) {
png.width <- input$pdf_width * 80
png.height <- input$pdf_height * 80
Expand Down Expand Up @@ -617,7 +617,7 @@ PlotModuleServer <- function(id,

if (do.pdf && is.null(download.pdf)) {
download.pdf <- shiny::downloadHandler(
filename = paste0(filename,".pdf"),
filename = paste0(filename, ".pdf"),
content = function(file) {
pdf.width <- input$pdf_width
pdf.height <- input$pdf_height
Expand Down Expand Up @@ -787,7 +787,7 @@ PlotModuleServer <- function(id,
## if(do.csv && is.null(download.csv) ) {
if (do.csv) {
download.csv <- shiny::downloadHandler(
filename = paste0(filename, '.csv'),
filename = paste0(filename, ".csv"),
content = function(file) {
shiny::withProgress(
{
Expand Down Expand Up @@ -1088,7 +1088,7 @@ PlotModuleServer <- function(id,
colBL <- "#00448855"
colRD <- "#88004455"

plotlyExport <- function(p, file = paste0(filename, ".pdf") , format = tools::file_ext(file),
plotlyExport <- function(p, file = paste0(filename, ".pdf"), format = tools::file_ext(file),
width = NULL, height = NULL, scale = 1, server = NULL) {
is.docker <- file.exists("/.dockerenv")
is.docker
Expand Down
5 changes: 3 additions & 2 deletions components/ui/ui-TableModule2.R
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@ TableModuleServer <- function(id,
# x <- x[!x %in% stopwords]
# filename <- paste(x, collapse = "-")
# print(filename)
filename <- vapply(strsplit(filename, "-"), function(x) #remove uninformative information.
paste(x[seq.int(2)], collapse = "-"), character(1L))
filename <- vapply(strsplit(filename, "-"), function(x) { # remove uninformative information.
paste(x[seq.int(2)], collapse = "-")
}, character(1L))
filename <- paste0(filename, ".csv")

if (is.null(func2)) func2 <- func
Expand Down

0 comments on commit e575302

Please sign in to comment.