Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ importFrom(shiny,dataTableOutput)
importFrom(shiny,renderDataTable)
importFrom(shinyWidgets,progressBar)
importFrom(shinyWidgets,updateProgressBar)
importFrom(shinybusy,add_busy_spinner)
importFrom(shinybusy,remove_modal_spinner)
importFrom(shinybusy,show_modal_spinner)
importFrom(shinyjs,delay)
importFrom(shinyjs,disable)
importFrom(shinyjs,disabled)
Expand Down
4 changes: 3 additions & 1 deletion R/mod_reportsTab.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ reportsTabUI <- function(id){
#' @param mapping tibble capturing the current data mappings [reactive].
#'
#' @importFrom magrittr extract
#' @importFrom shinybusy show_modal_spinner remove_modal_spinner
#'
#' @export

Expand Down Expand Up @@ -84,12 +85,13 @@ reportsTab <- function(input, output, session, charts, data, mapping){
mapping = mapping(),
charts=charts_keep()
)

show_modal_spinner(text="Creating html report. This might take a while for multiple charts/large data sets.") # show the modal window
rmarkdown::render(tempReport,
output_file = file,
params = params, ## pass in params
envir = new.env(parent = globalenv()) ## eval in child of global env
)
remove_modal_spinner() # remove it when done
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line doesn't run if report fails - Demographics Table, Shift Table - and spinner just spins.

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just drop these two modules for this release? They don't work on my workstation.

Copy link
Contributor Author

@jwildfire jwildfire Jun 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, Shift Table is no longer in the default build after SafetyGraphics/safetyCharts#67, demographics table is exporting for me, but it's just printing the R object (screenshot below). The download RTF button on the chart page is the real "export" workflow for now. So, I think we should just set the export flag to false for it for now. Filed SafetyGraphics/safetyCharts#70 to deal with that in safetyCharts.

We should probably discuss that workflow a bit more with @elimillera at some point, but I think I'm ok waiting until after 2.0

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line doesn't run if report fails - Demographics Table, Shift Table - and spinner just spins.

Yeah, I'm not sure the best workflow here. I guess at the very least we should have some trycatch() logic that throws a decent message to the modal if the export fails.

I think I'm going to leave #517 for a different PR that deals with some of the other issues in the export. I'll close this one, and make a new PR that just resolves #576.

}
)
}
4 changes: 3 additions & 1 deletion R/mod_safetyGraphicsUI.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#' @param standards a list of information regarding data standards. Each list item should use the format returned by safetyGraphics::detectStandard.
#'
#' @importFrom shinyjs useShinyjs
#'
#' @importFrom shinybusy add_busy_spinner
#'
#' @export

safetyGraphicsUI <- function(id, meta, domainData, mapping, standards){
Expand All @@ -32,6 +33,7 @@ safetyGraphicsUI <- function(id, meta, domainData, mapping, standards){
#app UI using calls to modules
ui<-tagList(
shinyjs::useShinyjs(),
add_busy_spinner(spin = "atom", position="bottom-right"),
tags$head(
tags$style(app_css),
tags$link(
Expand Down