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

feat(appointments): Disable the booking button while loading #5244

Merged
merged 6 commits into from
Jul 21, 2023

Conversation

pjrobertson
Copy link
Contributor

@pjrobertson pjrobertson commented May 19, 2023

The server can take a bit of time to response after clicking the 'Book the appointment button' (see below video - might be my server/email server is slow, hence why it taskes 8+ seconds!). To improve UX and to avoid the user clicking the button multiple times, we should disable the button while loading and/or add a loading icon.

loading.mov.sm.mp4

Ideally, the code would also either replace the 'Book the appointment' text with a loading spinner, or grey out the entire popup window and add a loading icon, but that's beyond my ability 😿

@codecov
Copy link

codecov bot commented May 20, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.09 ⚠️

Comparison is base (da70650) 22.43% compared to head (1303dda) 22.35%.

❗ Current head 1303dda differs from pull request most recent head 3519b5b. Consider uploading reports for the commit 3519b5b to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5244      +/-   ##
============================================
- Coverage     22.43%   22.35%   -0.09%     
  Complexity      373      373              
============================================
  Files           238      238              
  Lines         11589    11635      +46     
  Branches       2176     2261      +85     
============================================
+ Hits           2600     2601       +1     
- Misses         8989     9034      +45     
Flag Coverage Δ
javascript 13.85% <0.00%> (-0.07%) ⬇️
php 63.96% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/components/Appointments/AppointmentDetails.vue 0.00% <0.00%> (ø)

... and 43 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pjrobertson pjrobertson force-pushed the patch-4 branch 3 times, most recently from ea72cc9 to 8c45ea1 Compare May 22, 2023 01:07
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also disable the inputs and textarea above while loading

@pjrobertson
Copy link
Contributor Author

Let's also disable the inputs and textarea above while loading

Done :)

I also disabled closing of the modal whilst the submit form is loading.

Finally, I would really like to display a loading spinner in the button - I've added an attempt at that here, but I would appreciate feedback.

@pjrobertson
Copy link
Contributor Author

Here's what the spinner looks like:

Screen.Recording.2023-05-27.at.08.38.41.mov

@pjrobertson
Copy link
Contributor Author

@tcitworld @ChristophWurst anything further I can do on this PR to get it merged? Thanks!

@ChristophWurst ChristophWurst added 3. to review Waiting for reviews enhancement New feature request labels Jul 5, 2023
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good

pjrobertson and others added 6 commits July 6, 2023 09:50
ideally: Also add a loading icon to the button/modal that shows the page is loading
Signed-off-by: Patrick Robertson <[email protected]>
Co-authored-by: Thomas Citharel <[email protected]>
Signed-off-by: Patrick Robertson <[email protected]>
@pjrobertson
Copy link
Contributor Author

@ChristophWurst - sorry to keep bugging you on this. Who should I request to review the PR (that's blocking the merge)?

Thanks!

@ChristophWurst ChristophWurst changed the title Disable the 'Book the appointment' button while loading. feat(appointments): Disable the booking button while loading Jul 21, 2023
@ChristophWurst ChristophWurst merged commit da158a0 into nextcloud:main Jul 21, 2023
38 checks passed
@pjrobertson pjrobertson deleted the patch-4 branch July 21, 2023 07:59
@pjrobertson
Copy link
Contributor Author

🎉 Thanks Christoph! I hope to try and work on a few more bugs soon as well :-)

@ChristophWurst
Copy link
Member

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants