rstudio / bslib

Tools for theming Shiny and R Markdown via Bootstrap 3, 4, or 5.
https://rstudio.github.io/bslib/
Other
482 stars 58 forks source link

selectize choices being cut off #901

Closed scrapeable closed 11 months ago

scrapeable commented 11 months ago

running bslib version 0.5.1

This weird bug keeps happening where choices in my selectizeinput keep getting the ends of them cut off, it usually happens for the same word too. This bug is illusive, I snapped the below screenshot working on a different app.

selectize-bslib-bug

However if I type around in the selectizeinput in the below reprex it usually starts happening even on basic apps, after sometime. If I have the app running for a long time it always happens. Once the bug starts happening it just gets progressively worse and more words / parts of words cut off.

library(shiny)
library(bslib)

ui <- bslib::page(

  # included tagList as that's what I'm using in my larger app
  tagList(
    selectizeInput(
      inputId = "select_plot",
      label = "Choose a Visual",
      choices = c("Histogram", "Box Plot", "Word Cloud", "Pie Chart", "Donut Chart", "Rosetype Plot", "Bar Plot", "Stacked Bar Plot", "Radar Plot", "Line Plot", "Step Plot", "Area Plot", "River Plot", "Scatter Plot", "Correlation Matrix", "Heatmap"),
      options = list(placeholder = "Plot Type..."),
      selected = "Line Plot",
      multiple = FALSE,
      width = "100%"
    )
  )

)

server <- function(input, output) {

}

shinyApp(ui = ui, server = server)
gsmolinski commented 11 months ago

Maybe the same as this: https://github.com/rstudio/shiny/issues/3552

cpsievert commented 11 months ago

As mentioned here, there's decent chance this issue has been fixed in the development version of Shiny. We'd be grateful if you could try it out before the release and report back!

# install.packages("pak")
pak::pak("rstudio/shiny")
gsmolinski commented 11 months ago

I confirm that for at least this usecase:

library(shiny)

ui <- fluidPage(
  selectInput("test", label = NULL, choices = "Środa Śląska")
)

server <- function(input, output, session) {

}

shinyApp(ui, server)

Problem is solved :)

Thank you!

scrapeable commented 11 months ago

@cpsievert once I upgraded to development version I did not notice the issue again this weekend, so on my end things look good too!

github-actions[bot] commented 9 months ago

This issue has been automatically locked. If you have found a related problem, please open a new issue (with a reproducible example or feature request) and link to this issue. :raising_hand: Need help? Connect with us on Discord or Posit Community.