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

jqui_resizable wrapped plotly plots no longer work post version 2.21 if toc_float is also enabled #2551

Open
3 of 5 tasks
janlimbeck opened this issue Apr 15, 2024 · 0 comments

Comments

@janlimbeck
Copy link

janlimbeck commented Apr 15, 2024

I am trying to generate a sequence of several plotly plots which should be individually resizable. This has worked fine in version 2.21 but did break with more recent releases when also toc_float is enabled.

The below code works as expected in versions upto 2.21 but the plotly plots can no longer be resized in later versions.

---
title: "Test report"
output: 
  html_document:
    toc: true
    toc_float: true
---

```{r tagList, echo=FALSE, results = 'asis'}
suppressPackageStartupMessages({
  library(shiny)
  library(shinyjqui)
  library(plotly)
})


tList <- tagList()

cat('# First chapter')

for (i in 1:3) {
  tList[[i]] <- div(jqui_resizable(ggplotly(qplot(1:10, 1:10))))
}

tList
> xfun::session_info('rmarkdown')
R version 4.3.0 (2023-04-21 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22621), RStudio 2023.12.1.402

Locale:
  LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8    LC_MONETARY=English_United States.utf8 LC_NUMERIC=C                          
  LC_TIME=English_United States.utf8    

Package version:
  base64enc_0.1.3   bslib_0.6.1       cachem_1.0.8      cli_3.6.2         digest_0.6.34     ellipsis_0.3.2    evaluate_0.23     fastmap_1.1.1     fontawesome_0.5.2
  fs_1.6.3          glue_1.7.0        graphics_4.3.0    grDevices_4.3.0   highr_0.10        htmltools_0.5.7   jquerylib_0.1.4   jsonlite_1.8.8    knitr_1.45       
  lifecycle_1.0.4   magrittr_2.0.3    memoise_2.0.1     methods_4.3.0     mime_0.12         R6_2.5.1          rappdirs_0.3.3    rlang_1.1.3       rmarkdown_2.21   
  sass_0.4.8        stats_4.3.0       stringi_1.8.3     stringr_1.5.1     tinytex_0.49      tools_4.3.0       utils_4.3.0       vctrs_0.6.5       xfun_0.42        
  yaml_2.3.8       

Pandoc version: 3.1.1

Checklist

When filing a bug report, please check the boxes below to confirm that you have provided us with the information we need. Have you:

  • formatted your issue so it is easier for us to read?

  • included a minimal, self-contained, and reproducible example?

  • pasted the output from xfun::session_info('rmarkdown') in your issue?

  • upgraded all your packages to their latest versions (including your versions of R, the RStudio IDE, and relevant R packages)?

  • installed and tested your bug with the development version of the rmarkdown package using remotes::install_github("rstudio/rmarkdown")?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant