-
Notifications
You must be signed in to change notification settings - Fork 8
Upgrade cicerone to use the latest [email protected] #63
base: master
Are you sure you want to change the base?
Conversation
|
Sorry it took me so long to come around to reviewing this. I don't really get
As far as I remember these are separate functionalities, the first is to initialise the driver tour, the second to highlight a specific element, regardless of tour. The Do you mind looking into the Otherwise looks good, thanks! EDIT: Also add yourself as contributor to the |
|
@yogat3ch do you need help with the tab thing? I'm happy to tackle that or help in another way. |
|
Hey @JohnCoene, |
|
If a user has a first step in one tab and it's second in another tab we need to first navigate to that tab prior to highlighting the element as it is otherwise not visible on screen. |
|
@JohnCoene Ah, I see. We chained two guides together based on the tab input changing. I didn't realize there was a way to do it within cicerone. |
|
We can have multiple cicerone tours in one Shiny app (as you have explained doing yourself) this would break |
@JohnCoene Are you saying if there were multiple cicerone tours in an app it would break something called It sounds like |
This PR is a relatively substantial overhaul to the
ciceronepackage in order to create a more seamless experience of using the full feature set of driver.js withcicerone. This was accomplished by:ciceronesuch that functionality of particular argument can be clearly determined.Changes
highlightandinitialisemethods are now the same function and do what one would expect: create a one-off highlight on the intended element from a reactive context.prep_elementprepending of#to theelementwhen not a class or ID can be muted withel_as_is = TRUEonCicerone$stepandhighlightinitmethod in cicerone.js to preserveShinyand expected driver.js functionality while also allowing users to run their own code.id(the id of the driver), andthis.get_driver(id)to call the driver object to run their own API calls inside a callback.Testing
There is now a demo app in inst/shiny-examples/basic-guide/app.R for use in development and for testing. This app demonstrates a critical subset of the functionality added in this release and can be used for reviewing this PR.
Legacy functionality
R
Legacy functionality was preserved to the greatest extent possible, and deprecation warnings have been provided for all legacy argument names, with substitution and replacement occurring where possible.
See
deprecate_replaceNo longer supported
I was unable to determine what the purpose of the legacy JS code related to
tabandtab_idwas, so it was omitted. This includes the usage ofonHighlightTab. If we wish to retain this, please feel free to open a branch off of this one to re-integrate it.