NavinoEvans added a comment.
Hi all, I think I've managed to combine the best of both versions and fix most of the outstanding issues I was planning to report. There are some hacky parts which need to be resolved by making small changes to the guiders library <https://doc.wikimedia.org/GuidedTour/master/js/source/mediawiki.libs.guiders.html#mw-libs-guiders>, but for me this is fine to go live so we have everything working instead of broken. Then we can clean it up after some discussion over the coming weeks/months. You can check how this tour works https://test.wikidata.org/w/index.php?title=Q211911&tour=wbcoordinates Note: The reference slide is a bit mismatched with slide text and attachment as there's a new UI on test.wikidata. What I've fixed is: - Next step is now triggered whether you click the next button or complete an action in the UI. - However you complete the step, the next slide will wait for the new elements to be loaded so that it can attach to it correctly (instead of floating in the middle of the page). - The `onShow` event only fires once, so you do not get actions repeated twice - Once a step is completed, the action will not be triggered again. This means you can move back/forward through steps without the actions repeating every time (and creating multiple "new statement" boxes for example) - Fixed T244747: Wikidata Tours: Stepping back shows next and previous steps at once <https://phabricator.wikimedia.org/T244747> The main hack is that I've added a new `actionBtn2` property in the step options. This is to prevent the automatic clicking on the `actionBtn` element whenever a slide advances (in the guiders library). We need to wait to advance the slide until the DOM is ready with the element to attach the guider to. The other hack is closely related, I just needed to remove the click event for the "next" button, so we could trigger the DOM change and wait for completion before advancing. Does anyone have any objections to me adding this as the main new version? As well as temporarily changing the two tours we currently have live to use `actionBtn2` instead of `actionBtn`. TASK DETAIL https://phabricator.wikimedia.org/T244994 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: NavinoEvans Cc: Lea_Lacroix_WMDE, Lydia_Pintscher, Pasleim, Ijon, Saturae, DDJJ, Richard_Nevell_WMUK, Fuzheado, Ainali, Aklapper, WMDE-leszek, Rosalie_WMDE, Alicia_Fagerving_WMSE, Mrjohncummings, NavinoEvans, Pavithraes, darthmon_wmde, Nandana, Cpaulf30, Lahi, Gq86, GoranSMilovanovic, Ivana_Isadora, Jayprakash12345, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Dinoguy1000, Mbch331, Jay8g
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
