Appsilon / shiny.router

A minimalistic router for your Shiny apps.
http://appsilon.github.io/shiny.router
Other
255 stars 31 forks source link

semantic tabset not working with router #73

Closed dokato closed 3 years ago

dokato commented 4 years ago

Only with the current master version of shiny.router.

A bit puzzling error to me:

library(shiny)
library(shiny.router)
library(shiny.semantic)

tabs <- tabset(id = "tab1", list(list(menu = div("First link"),
                                content = div("First content")),
                           list(menu = div("Second link"),
                                content = div("Second content")),
                           list(menu = div("Third link"),
                                ontent = div("Third content"))))
router <- make_router(
  route("index", tabs),
  route("second", h1('second'))
)

ui <- semanticPage(
  horizontal_menu(
    list(
      list(name = "One", link = route_link("index"), icon = "dog"),
      list(name = "Two", link = route_link("second"), icon = "cat")
    ),
  ),
  router_ui()
)

server <- function(input, output, session) {
  router(input, output, session)
}
shinyApp(ui, server)

It looks like the last change broke that, as version of a router from CRAN (shiny.router_0.1.1) works fine ( cc @krystian8207 )

krystian8207 commented 4 years ago

Works fine for me: tabsets

Could you provide the error message?

> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.4 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=pl_PL.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=pl_PL.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=pl_PL.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=pl_PL.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] shiny.semantic_0.4.0    shiny.router_0.1.1.9000 shiny_1.5.0.9001       

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.4.6      crayon_1.3.4      packrat_0.5.0     digest_0.6.25     later_1.0.0       mime_0.9         
 [7] R6_2.4.1          jsonlite_1.6.1    xtable_1.8-4      magrittr_1.5      rlang_0.4.6       rstudioapi_0.11  
[13] promises_1.1.0    tools_3.6.3       glue_1.4.1        htmlwidgets_1.5.1 purrr_0.3.4       httpuv_1.5.2     
[19] fastmap_1.0.1     compiler_3.6.3    htmltools_0.5.0 
dokato commented 4 years ago

Did you click on the tabset?

dokato commented 4 years ago

Putting here for future reference: https://github.com/rstudio/shiny/issues/1545

dokato commented 3 years ago

75 should fix that