Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form timer not working #4252

Open
3 tasks done
srtalbot opened this issue Sep 9, 2024 · 5 comments
Open
3 tasks done

Form timer not working #4252

srtalbot opened this issue Sep 9, 2024 · 5 comments
Assignees
Labels
App bug Something isn't working 🚦 Severe Severe Impact Issue

Comments

@srtalbot
Copy link
Contributor

srtalbot commented Sep 9, 2024

The form timer is only counting the time spent on the review page. It does not count all the time spent on the previous pages in it's total count. This leads to longer forms requiring more than 30s on the review page before submission, even if they have spent 30s or more on the whole form.

Acceptance criteria

  • Pull into a react context, a higher level component to capture the entire form rather than just a specific page
  • Form timer count includes all time spent on all form pages.
  • Form timer only counts required questions that are answered by the client (dependent on their path)
@srtalbot srtalbot added 🚦 Severe Severe Impact Issue bug Something isn't working App labels Sep 9, 2024
@jprince-cds
Copy link

jprince-cds commented Sep 18, 2024

Affecting:

  1. TBS in Freshdesk ticket #18996.
  2. DND in Freshdesk ticket #19058.
  3. CSA in Freshdesk ticket #19272.
  4. ISED in Freshdesk ticket #19359

We should let them know once it is fixed.

@thiessenp-cds thiessenp-cds self-assigned this Sep 26, 2024
@thiessenp-cds
Copy link
Contributor

thiessenp-cds commented Sep 26, 2024

Ouch our poor users :(

Looking at the current solution. The delay to show the submit button is calculated based on:
2 + Number of Required Questions * 2 = TIME IN SECONDS TO DELAY

So if a form has 10 required questions, the submit button would be delayed 40 seconds (2 + 10 * 2 = 22).

Some options to work the Pages navigation to the Review page in are:

  1. the submit button delay could begin calculating one the initial Page
  2. add a maximum delay for the submit button, something like 3-10 seconds
  3. (any other ideas? :)

@thiessenp-cds
Copy link
Contributor

After our quick discussion. We decided on the option below and possibly returning to this if we want to add a maximum delay on time (cap).

Update the existing logic to calculate the Number of Required Questions based on the form pages path a user follows. In the code this would mean using the group history to only tally required questions on visited pages.

@thiessenp-cds thiessenp-cds linked a pull request Sep 26, 2024 that will close this issue
@Abi-Nada Abi-Nada self-assigned this Oct 7, 2024
@Abi-Nada
Copy link

Abi-Nada commented Oct 7, 2024

@Abi-Nada to QA Test

@thiessenp-cds
Copy link
Contributor

thiessenp-cds commented Oct 9, 2024

TODOs

  • Add logic to tally the required questions count by pages navigated (group history)
  • Add a form start timer to a new context
  • Update the time calculation to: start timer - (required questions calculation) = countdown delay
  • Add some unit tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App bug Something isn't working 🚦 Severe Severe Impact Issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants