JohnCoene / cicerone

🏛️ Give tours of your Shiny apps
https://cicerone.john-coene.com
Other
187 stars 7 forks source link

Tabs selection doesn’t seem to work? #31

Open kalganem opened 3 years ago

kalganem commented 3 years ago

Hi John,

Thanks for the awesome package. I'm trying to utilize the tabs selection feature but it doesn’t seem to work

I tried to run your example

library(cicerone)

guide <- Cicerone$
  new()$ 
  step(
    el = "plot",
    title = "Text Input",
    description = "This is where you enter the text you want to print."
  )$
  step(
    "summary",
    "Send the Text",
    "Send the text to the server for printing",
    tab = "summary_tab",
    tab_id = "tabz"
  )

library(shiny)

ui <- fluidPage(
  use_cicerone(), # include dependencies
  h1("tabs"),
  tabsetPanel(
    id = "tabz",
    tabPanel("plot_tab", h2("show plot here", id = "plot")),
    tabPanel("summary_tab", h2("show summary here", id = "summary"))
  )
)

server <- function(input, output){

  # initialise then start the guide
  guide$init()$start()

}

shinyApp(ui, server)

But it doesn’t go the next tab when I hit next to go the 2nd step

session info:

R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] cicerone_1.0.5.9000 shiny_1.6.0        

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.7        assertthat_0.2.1  digest_0.6.27     withr_2.4.2       later_1.2.0       mime_0.11         R6_2.5.0         
 [8] jsonlite_1.7.2    lifecycle_1.0.0   xtable_1.8-4      magrittr_2.0.1    cachem_1.0.5      rlang_0.4.11      promises_1.2.0.1 
[15] jquerylib_0.1.4   bslib_0.2.5.1     ellipsis_0.3.2    tools_4.0.3       httpuv_1.6.1      fastmap_1.1.0     compiler_4.0.3   
[22] htmltools_0.5.1.1 sass_0.4.0

Thanks

daattali commented 1 year ago

I can confirm 2 years later, both the CRAN version and the latest github version don't work with the example from the documentation https://cicerone.john-coene.com/examples/tabs.html

stephanmg commented 1 year ago

I can confirm 2 years later, both the CRAN version and the latest github version don't work with the example from the documentation https://cicerone.john-coene.com/examples/tabs.html

Same for me.