Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

204 Add "rendering in progress" info #253

Merged
merged 12 commits into from
Feb 28, 2024
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ repos:
- R6
- rmarkdown
- shiny
- shinybusy
- shinyWidgets
- yaml
- zip
Expand Down
10 changes: 6 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Imports:
R6,
rmarkdown (>= 2.19),
shiny (>= 1.6.0),
shinybusy,
shinyWidgets (>= 0.5.1),
yaml (>= 1.1.0),
zip (>= 1.1.0)
Expand All @@ -50,10 +51,11 @@ RdMacros:
lifecycle
Config/Needs/verdepcheck: rstudio/bslib, mllg/checkmate,
rstudio/htmltools, yihui/knitr, r-lib/lifecycle, r-lib/R6,
rstudio/rmarkdown, rstudio/shiny, dreamRs/shinyWidgets,
yaml=vubiostat/r-yaml, r-lib/zip, davidgohel/flextable, rstudio/DT,
yihui/formatR, tidyverse/ggplot2, deepayan/lattice, cran/png,
insightsengineering/rtables, r-lib/testthat, rstudio/tinytex
rstudio/rmarkdown, rstudio/shiny, dreamRs/shinybusy,
dreamRs/shinyWidgets, yaml=vubiostat/r-yaml, r-lib/zip,
davidgohel/flextable, rstudio/DT, yihui/formatR, tidyverse/ggplot2,
deepayan/lattice, cran/png, insightsengineering/rtables,
r-lib/testthat, rstudio/tinytex
Config/Needs/website: insightsengineering/nesttemplate
Encoding: UTF-8
Language: en-US
Expand Down
3 changes: 3 additions & 0 deletions R/DownloadModule.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,13 @@ download_report_button_srv <- function(id,
},
content = function(file) {
shiny::showNotification("Rendering and Downloading the document.")
shinybusy::block(id = ns("download_data"), text = "", type = "dots")
Sys.sleep(3)
chlebowa marked this conversation as resolved.
Show resolved Hide resolved
input_list <- lapply(names(rmd_yaml_args), function(x) input[[x]])
names(input_list) <- names(rmd_yaml_args)
if (is.logical(input$showrcode)) global_knitr[["echo"]] <- input$showrcode
report_render_and_compress(reporter, input_list, global_knitr, file)
shinybusy::unblock(id = ns("download_data"))
},
contentType = "application/zip"
)
Expand Down
3 changes: 3 additions & 0 deletions R/Previewer.R
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,13 @@ reporter_previewer_srv <- function(id,
},
content = function(file) {
shiny::showNotification("Rendering and Downloading the document.")
shinybusy::block(id = ns("download_data_prev"), text = "", type = "dots")
Sys.sleep(3)
input_list <- lapply(names(rmd_yaml_args), function(x) input[[x]])
names(input_list) <- names(rmd_yaml_args)
if (is.logical(input$showrcode)) global_knitr[["echo"]] <- input$showrcode
report_render_and_compress(reporter, input_list, global_knitr, file)
shinybusy::unblock(id = ns("download_data_prev"))
},
contentType = "application/zip"
)
Expand Down
5 changes: 5 additions & 0 deletions inst/css/Previewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ a.disabled {
margin-top:10px;
color:#337ab7;
}

/* prevents oversizing elements covered by shinybusy::block */
.nx-block-temporary-position {
min-height: 0 !important;
}
Loading