JohnCoene / cicerone

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

Support class selectors #7

Closed lz100 closed 4 years ago

lz100 commented 4 years ago

I think the driver js support selecting by class,

driver.highlight('.class')

Your selector is forced to paste the "#" id selector, is it possible to open for other selectors or an additional argument to optionally add add the "#" and set it to TRUE by default? Old users will not notice the difference

highlight = function(el, session = NULL, by_id = TRUE){
    if(by_id) el <- paste0("#", el)
    ...
}
JohnCoene commented 4 years ago

Indeed, I had thought most would be just happy with id but it's limiting the use of the underlying library.

I have added a is_id argument to the step and highlight methods.