Skip to content

[Bug]: slider_input with some themes #456

@guiguilegui

Description

@guiguilegui

Guidelines

  • I agree to follow this project's Contributing Guidelines.

Project Version

No response

Platform and OS Version

No response

Existing Issues

No response

What happened?

Hello!
Super great package!
I'm not sure if this is related to issue #295 , but the slider input has weird behaviour with most of the themes.

Steps to reproduce

If we add a theme to the sample code for the slider_input, we get a buggy vertical slider instead. This behaviour happens for most of the themes.

image

Code to reproduce:

library(shiny)
library(shiny.semantic)

ui_cyborg <- shinyUI(                                                              
        semanticPage(                                                             
          title = "Slider example",                                               
          theme = "cyborg",                                                     
          tags$br(),                                                              
          slider_input("slider", 10, 0, 20, class = "labeled ticked"),            
          p("Selected value:"),                                                   
          textOutput("slider")                                                    
        )                                                                         
      )  

server <- shinyServer(function(input, output, session) {                    
  output$slider <- renderText(input$slider)                                 
})           

shinyApp(ui = ui_cyborg, server = server)  
> sessionInfo()                                                                   
R version 4.2.3 (2023-03-15 ucrt)                                                 
Platform: x86_64-w64-mingw32/x64 (64-bit)                                         
Running under: Windows 10 x64 (build 19045)                                       
                                                                                  
Matrix products: default                                                          
                                                                                  
locale:                                                                           
[1] LC_COLLATE=French_Canada.utf8  LC_CTYPE=French_Canada.utf8                    
[3] LC_MONETARY=French_Canada.utf8 LC_NUMERIC=C                                   
[5] LC_TIME=French_Canada.utf8                                                    
                                                                                  
attached base packages:                                                           
[1] stats     graphics  grDevices datasets  utils     methods   base              
                                                                                  
other attached packages:                                                          
[1] shiny_1.8.0          shiny.semantic_0.5.0                                     
                                                                                  
loaded via a namespace (and not attached):                                        
 [1] Rcpp_1.0.12           magrittr_2.0.3        xtable_1.8-4                     
 [4] R6_2.5.1              rlang_1.1.3           fastmap_1.1.1                    
 [7] tools_4.2.3           cli_3.6.2             jquerylib_0.1.4                  
[10] htmltools_0.5.7       ellipsis_0.3.2        digest_0.6.34                    
[13] lifecycle_1.0.4       purrr_1.0.2           later_1.3.2                      
[16] sass_0.4.8            htmlwidgets_1.6.4     vctrs_0.6.5                      
[19] promises_1.2.1        memoise_2.0.1         glue_1.7.0                       
[22] cachem_1.0.8          mime_0.12             compiler_4.2.3                   
[25] bslib_0.6.1           semantic.assets_1.1.0 jsonlite_1.8.8                   
[28] httpuv_1.6.14

Expected behavior

The sample code works for the default theme:

library(shiny)
library(shiny.semantic)

ui <- shinyUI(                                                              
        semanticPage(                                                             
          title = "Slider example",                                               
          tags$br(),                                                              
          slider_input("slider", 10, 0, 20, class = "labeled ticked"),            
          p("Selected value:"),                                                   
          textOutput("slider")                                                    
        )                                                                         
      )                                                                           
server <- shinyServer(function(input, output, session) {                    
  output$slider <- renderText(input$slider)                                 
})                                                                          

shinyApp(ui = ui, server = server)

image

The "readable" theme is an additional example of a theme that works as expected.

Attachments

No response

Screenshots or Videos

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions