e-picsa / picsa-apps

Monorepo for building tools to support E-PICSA Apps
https://picsa.app
GNU General Public License v3.0
7 stars 2 forks source link

Feat/tour events #194

Closed chrismclarke closed 1 year ago

chrismclarke commented 1 year ago

Description

Build on top of #194 to try and improve intro.js core functionality. Specifically:

closes #190

Discussion

Preview

Link to app preview if relevant

Screenshots / Videos

Demo - Crop probability tour with functionality to remove next/previous buttons for specific step, pause tour and wait for user interaction with select element, allow focus on table element larger than screen and work within nested farmer activity tool

PICSA (2).webm

github-actions[bot] commented 1 year ago

Visit the preview URL for this PR (updated for commit 08d7b02):

https://picsa-extension-toolkit--pr194-feat-tour-events-8v8cb5vb.web.app

(expires Fri, 08 Dec 2023 02:05:04 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 2435c4a5f2b9750fe5c819a7a14bcf9433816983

chrismclarke commented 1 year ago

@FaithDaka - I think this is mostly working as expected now, if you have a chance at some point would you be able to take a look to see if the updated tour syntax makes sense to you and user experience for the crop probability tour makes sense?

I've added tour property for tourOptions - allow changing full tour options for just one step (e.g. disabling previous/next buttons) clickEvents - allow the tour to add callback functions once the target element is clicked routeEvents - allow the tour to add callback functions when the url changes customElement - allow the tour to highlight any element which is checked dynamically

I've also added various additional functions to the service to try and work around some of the limitations of intro.js

FaithDaka commented 1 year ago

Hi @chrismclarke I tested the crop-probability tour using the preview. And it only had one step, which was Tap here to choose a station after which the tour ended despite scrolling through the table. I don't think that is the intended behaviour. I think the table will have to be highlighted in some way to avoid breaking the tour and also to help direct the user on what exactly they should be seeing next.

I like that the Next, Done buttons have been removed for those one step prompts, was planning on removing them as well. Thanks for the work on enhancing the functionality!

chrismclarke commented 1 year ago

Thanks for looking into things @FaithDaka I've added a bunch more commits, and I think at this point the number of custom code workarounds is near the size of the original library! 😅

I've also split the tour into 2 (similar to how you had originally), the first tour triggers if no station is selected and just handles the station list dropdown, the 2nd tour illustrates the table (with a number of additional steps to be more explicit). See updated demo in PR description

I think I'm going to merge here for now and share with the UoR team so they can provide feedback (and because I really need to stop looking at it for now! Seriously could spend a lifetime trying to fix/tweak/improve the system)