dreamRs / esquisse

RStudio add-in to make plots interactively with ggplot2
https://dreamrs.github.io/esquisse
Other
1.76k stars 227 forks source link

Esquisse creates duplicate IDs / invalid HTML #244

Closed daattali closed 8 months ago

daattali commented 1 year ago

Running a simple esquisse example:

library(shiny)

ui <- fluidPage(
  esquisse::esquisse_ui("test")
)

server <- function(input, output, session) {
  esquisse::esquisse_server("test", data_rv = reactive(mtcars), import_from = NULL)
}

shinyApp(ui, server)

This creates (at least) two sets of elements that share an ID. There are two elements with ID test-controls-fill_color and two elements with ID test-controls-color_ribbon. You can verify this by running in the javascript console: document.querySelectorAll("#test-controls-color_ribbon")

There should not be any element on the page with a duplicate ID

pvictor commented 1 year ago

Thanks for reporting, an issue in shinyWidgets::colorPickr(), should be fixed now.

Victor