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

Add cancel button to the QuestionnaireFragment #1829

Closed
Itskiprotich opened this issue Jan 25, 2023 · 8 comments · Fixed by #1837
Closed

Add cancel button to the QuestionnaireFragment #1829

Itskiprotich opened this issue Jan 25, 2023 · 8 comments · Fixed by #1837
Labels
effort:small Small effort - 2 days P2 Medium priority issue type:enhancement New feature or request

Comments

@Itskiprotich
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Provide an option where a user can cancel the data collection

Describe the solution you'd like
Add a cancel button

Describe alternatives you've considered
N/A

Additional context
Cancel Button
Would you like to work on the issue?
Yes

@PallaviGanorkar PallaviGanorkar added type:enhancement New feature or request P2 Medium priority issue effort:small Small effort - 2 days labels Jan 30, 2023
@omarismail94
Copy link
Contributor

@Itskiprotich have you been facing issues with the up/back button that currently cancels the questionnaire collection?

@shelaghm FYI

@Itskiprotich
Copy link
Contributor Author

@omarismail94 the up/back button works well. However, for uniformity design-wise, I find it ideal to have both submit and cancel buttons.

@jingtang10 jingtang10 linked a pull request Feb 2, 2023 that will close this issue
7 tasks
@jingtang10
Copy link
Collaborator

Thanks @Itskiprotich for raising this issue and creating the PR.

@shelaghm @rowo @joiskash @kunjan8794 please note the change that is being proposed in this ticket. I do feel this is a very reasonable feature, but also something that would require an option to turn it on/off.

One thing I'm not totally sure is just whether this is something that should be default to on or off? Any thoughts?

Also I don't know if it's a good idea to limit this to single page questionnaire... ? should paginated questionnaires also have an option to include a cancel button? if so should it be on the first page or every page? if every page how do we position this button together with the prev/next buttons?

@joiskash
Copy link
Collaborator

joiskash commented Feb 2, 2023

This looks good! I would vote for default on

@shelaghm
Copy link

shelaghm commented Feb 3, 2023

Re: paginated

I've mocked up some options so we can discuss what the best option is.
Screenshot 2023-02-03 at 11 18 20

My preference is for A, not including a cancel button on paginated questionnaires. The existing arrow serves the same action of exiting the questionnaire.
B, I worry about adding a third button next to back/next navigation buttons and I think it might add confusion. Depending on phone size/text size the buttons are also too close to each other and worry about accidental taps.
C, I believe breaks some of the Android standard navigation patterns, so not sure if this a good idea either.

What do you all think? Other options we should explore for this?

@shelaghm
Copy link

shelaghm commented Feb 8, 2023

Discussion w/ Jing and team:

  • Default is A, and if showing the cancel button is on, then show B
  • Also show a cancel dialog with "Do you want to exit the questionnaire?" Yes/No.
    @santosh-pingle

@Itskiprotich
Copy link
Contributor Author

@shelaghm I have updated the feature to include the confirmation dialog within the SDC.
Cancel Button

@shelaghm
Copy link

Thank you! Looks great @Itskiprotich

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:small Small effort - 2 days P2 Medium priority issue type:enhancement New feature or request
Projects
Status: Complete
Development

Successfully merging a pull request may close this issue.

6 participants