cicerone
cicerone copied to clipboard
Upgrade cicerone to use the latest [email protected]
This PR is a relatively substantial overhaul to the cicerone
package in order to create a more seamless experience of using the full feature set of driver.js with cicerone
. This was accomplished by:
- Creating snake case parity between the driver.js documentation and argument names in
cicerone
such that functionality of particular argument can be clearly determined. - Inclusion of all driver.js configuration options as explicit arguments
Changes
- The
highlight
andinitialise
methods are now the same function and do what one would expect: create a one-off highlight on the intended element from a reactive context. - The
prep_element
prepending of#
to theelement
when not a class or ID can be muted withel_as_is = TRUE
onCicerone$step
andhighlight
- Users can supply callback JS code and the callbacks are created internally to the
init
method in cicerone.js to preserveShiny
and expected driver.js functionality while also allowing users to run their own code. - Users can reference
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_replace
No longer supported
I was unable to determine what the purpose of the legacy JS code related to tab
and tab_id
was, so it was omitted. This includes the usage of onHighlightTab
. If we wish to retain this, please feel free to open a branch off of this one to re-integrate it.