cicerone icon indicating copy to clipboard operation
cicerone copied to clipboard

Unable to move to next to screen

Open shuwei325 opened this issue 3 years ago • 3 comments

Dear John,

I'm developing an App and I need to include a step by step guide involving different navbar and tabs. I tried the argument tab and tab_id following this Tab guide.

I'm sure I'm using the 1.0.4 version and by using exactly the same code provided in this page, I cannot go to the second step (which is in the summary_tab) by clicking on the "Next" button. Is anyone else have this problem?

Thank you for your time and consideration.

shuwei325 avatar Mar 24 '21 17:03 shuwei325

I am encountering this as well, using the first example I cannot get the code to switch to the second tab and I cannot get this method to work in my own app. Is there a new approach for switch tabs during a tour? :)

KoderKow avatar Apr 23 '21 02:04 KoderKow

Yes, there are some issues.

Apologies.

I will come around to fixing these for the next release. I know the author of the underlying JavaScript library is overhauling the API, as soon as this is done I shall do the same with {cicerone} so it is much more robust.

JohnCoene avatar Apr 24 '21 08:04 JohnCoene

Hi @JohnCoene, I found the problem for this (also mentioned in #31) but I don't know Javascript enough to fix it. It comes from these lines:

https://github.com/JohnCoene/cicerone/blob/4791dd6f411e2aec765f8e38522e7c4b9085fe16/srcjs/exts/cicerone.js#L99-L104

https://github.com/JohnCoene/cicerone/blob/4791dd6f411e2aec765f8e38522e7c4b9085fe16/srcjs/exts/cicerone.js#L110-L112

Removing

opts.steps[index].onHighlightStarted = new Function("return " + opts.steps[index].onHighlightStarted)();

makes it work (tabs change when we click on "Next"). I hope it helps to fix it

etiennebacher avatar Jan 20 '22 22:01 etiennebacher

@etiennebacher I needed this feature to work together with the bs4Dash framework. After some digging I found a way that makes it work for me (submitted as PR #51 ):

https://github.com/JohnCoene/cicerone/blob/66fc2baebb08a1eee9388e0d0d5336b9da148238/srcjs/exts/cicerone.js#L98:L105

to make it work for bs4Dash I had to additionally adjust the call to the Input binding as follows: Shiny.inputBindings.bindingNames['bs4Dash.tabItemInput'].binding.setValue(tabs, step.tab);

lhabegger avatar Dec 05 '22 15:12 lhabegger