Checkboxes not captured
- Dominant language
- JavaScript
- Stars
- 32
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
`capture` is great! It addresses the key issue I was having with `snapper` https://github.com/yonicd/snapper/issues/4 and `shinyscreenshot` https://github.com/daattali/shinyscreenshot/issues/4 due to https://github.com/niklasvh/html2canvas/issues/1595
Unfortunately, I did run into a couple of issues with `capture`. When using BS 3, checkboxes are not captured in the screenshot.

When using BS 4, checkboxes are not captured and text for a renderUI element is wrapped and spacing is off

When using BS 5, checkboxes are captured but text for the renderUI element is wrapped and spacing is off

Any suggestions?
cc-ing @cpsievert in case there might be a connection with `bslib`
Question: Any plans to send `capture` to CRAN?
The code used to generate the screenshots above is shown below.
```
library(shiny)
library(capture)
library(bslib)
viz_type <- c(
"Distribution" = "dist", "Density" = "density", "Scatter" = "scatter",
"Surface" = "surface", "Line" = "line", "Bar" = "bar", "Box-plot" = "box"
)
version <- 5
ui <- fluidPage(
tags$h2(paste("Bootstrap Theme", version)),
theme = bs_theme(version = version),
fluidRow(
column(
width = 2,
wellPanel(
capture(
selector = ".well",
filename = NULL, # no download client side
icon("camera"), "Take screenshot",
inputId = "screenshot",
options = list(backgroundColor = "#FFF")
),
selectInput(
inputId = "loi",
label = "Law:",
choices = c("normal", "uniform", "exponential")
),
selectInput(
inputId = "test",
label = "Test-multiple:",
choices = c("normal", "uniform", "exponential"),
selected = c("normal", "uniform", "exponential"),
multiple = TRUE,
selectize = FALSE
),
uiOutput("rui"),
checkboxGroupInput(
"cb_group",
"Checkbox group",
choices = c("a", "b", "c"),
# selected = c("a", "b", "c"),
inline = FALSE
),
checkboxInput("cb_single", "Checkbox Single", value = FALSE)
)
),
column(
width = 2,
uiOutput("out")
)
)
)
server <- function(input, output, session) {
output$out <- renderUI({
tags$img(src = input$screenshot)
})
output$rui <- renderUI({
selectInput(
inputId = "viz_type", label = "Plot-type:", choices = viz_type,
selected = viz_type[1],
multiple = FALSE
)
})
distrib_r <- reactive({
switch(
input$loi,
"normal" = rnorm(1000),
"uniform" = runif(1000),
"exponential" = rexp(1000)
)
})
}
shinyApp(ui, server)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.