rstudio / shinydashboard

Shiny Dashboarding framework
https://rstudio.github.io/shinydashboard/
Other
886 stars 300 forks source link

Download buttons are not shown on server 1 while present on server 2 #330

Closed splaisan closed 4 years ago

splaisan commented 4 years ago

Thanks for any help to fix this weird one!

The button is at the middle bottom of the left server screenshot and absent on the right one Screen Shot 2019-09-04 at 12 12 32

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] shinyBS_0.61                  htmlTable_1.13.1              stringr_1.4.0                 shinyjs_1.0                   DT_0.8                        shinydashboard_0.7.1         
 [7] shiny_1.3.2                   DNABarcodes_1.14.0            dplyr_0.8.3                   DNABarcodeCompatibility_1.0.2 readr_1.3.1                   Matrix_1.2-17                

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.2        pillar_1.4.2      compiler_3.6.1    later_0.8.0       numbers_0.7-1     tools_3.6.1       zeallot_0.1.0     digest_0.6.20     jsonlite_1.6      checkmate_1.9.4  
[11] tibble_2.1.3      lattice_0.20-38   pkgconfig_2.0.2   rlang_0.4.0       rstudioapi_0.10   crosstalk_1.0.0   yaml_2.2.0        xfun_0.9          knitr_1.24        sourcetools_0.1.7
[21] htmlwidgets_1.3   vctrs_0.2.0       hms_0.5.1         grid_3.6.1        tidyselect_0.2.5  glue_1.3.1        R6_2.4.0          BH_1.69.0-1       purrr_0.3.2       tidyr_0.8.3      
[31] magrittr_1.5      backports_1.1.4   promises_1.0.1    htmltools_0.3.6   rsconnect_0.8.15  assertthat_0.2.1  mime_0.7          xtable_1.8-4      httpuv_1.5.1      stringi_1.4.3    
[41] crayon_1.3.4    

Matrix products: default BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] parallel stats graphics grDevices utils datasets methods base

other attached packages: [1] dplyr_0.8.3 htmlTable_1.13.1 DNABarcodeCompatibility_1.0.2 DNABarcodes_1.14.0 Matrix_1.2-17
[6] shinyjs_1.0 DT_0.8 shinyBS_0.61 shinydashboard_0.7.1 shiny_1.3.2

loaded via a namespace (and not attached): [1] Rcpp_1.0.2 compiler_3.6.0 pillar_1.4.2 later_0.8.0 numbers_0.7-1 tools_3.6.0 digest_0.6.20 checkmate_1.9.4 jsonlite_1.6 tibble_2.1.3
[11] lattice_0.20-38 pkgconfig_2.0.2 rlang_0.4.0 rstudioapi_0.10 crosstalk_1.0.0 yaml_2.2.0 xfun_0.9 knitr_1.24 stringr_1.4.0 htmlwidgets_1.3 [21] grid_3.6.0 tidyselect_0.2.5 glue_1.3.1 R6_2.4.0 BH_1.69.0-1 purrr_0.3.2 tidyr_0.8.3 magrittr_1.5 backports_1.1.4 promises_1.0.1
[31] htmltools_0.3.6 rsconnect_0.8.15 assertthat_0.2.1 mime_0.7 xtable_1.8-4 httpuv_1.5.1 stringi_1.4.3 crayon_1.3.4


the shiny code
[ui.R.txt](https://github.com/rstudio/shinydashboard/files/3574030/ui.R.txt)
[server.R.txt](https://github.com/rstudio/shinydashboard/files/3574032/server.R.txt)
splaisan commented 4 years ago

could it be because the button is at startup hidden(...) by, in the UI

 hidden(downloadButton("download_single_results", "Download results"))

later undone in the server side by

show("download_single_results")

which works on the good instance and fails to show on the bad one?

splaisan commented 4 years ago

Yes, it was a function prevalence issue, corrected by replacing show() bu shinyjs::show()