Show indicator when loading slots and show toast in case of error
Demo (before changing icon to material)
https://user-images.githubusercontent.com/2197836/173613401-972af52b-6ad0-4d68-a7fe-0257ececaae3.mp4
Codecov Report
Patch coverage has no change and project coverage change: -0.01% :warning:
Comparison is base (
bddcaa3) 22.62% compared to head (4d3172f) 22.61%. Report is 50 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #4289 +/- ##
============================================
- Coverage 22.62% 22.61% -0.01%
Complexity 395 395
============================================
Files 241 241
Lines 11843 11848 +5
Branches 2305 2306 +1
============================================
Hits 2679 2679
- Misses 9164 9169 +5
| Flag | Coverage Δ | |
|---|---|---|
| javascript | 13.81% <0.00%> (-0.01%) |
:arrow_down: |
| php | 64.26% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files Changed | Coverage Δ | |
|---|---|---|
| src/components/Appointments/AppointmentDetails.vue | 0.00% <ø> (ø) |
|
| ...rc/components/Editor/AvatarParticipationStatus.vue | 0.00% <ø> (ø) |
|
| src/components/Editor/Invitees/InviteesList.vue | 0.00% <0.00%> (ø) |
|
| src/mixins/EditorMixin.js | 3.53% <0.00%> (ø) |
|
| src/views/Appointments/Booking.vue | 0.00% <0.00%> (ø) |
|
| src/views/EditSidebar.vue | 0.00% <ø> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I thought about having a LoadingIcon component in the nextcloud-vue components to share between apps. I created a PR a while ago already, see https://github.com/nextcloud/nextcloud-vue/pull/2727. The component itself is good to go, I think. I just wanted to add some documentation to the PR and haven't had time yet.
I finished the PR in the vue-components for the loading icon, see https://github.com/nextcloud/nextcloud-vue/pull/2727 Might be good to use it here.
Hm, I dislike the error toast for the slots being unable to be fetched. There is nothing gained from showing this to the user as they can't do anything about it. The neccessary info is there already with "No slots available". This will be anonoymous users a lot of the time.
they can't do anything about it
The difference between « no slots available » and « an error has occurred » is that they can report it to whoever gave them the link. If it's just a timeout issue like in https://github.com/nextcloud/calendar/issues/4637#issuecomment-1282128225 it's possible it won't be noticed by the server admin.
they can't do anything about it
The difference between « no slots available » and « an error has occurred » is that they can report it to whoever gave them the link. If it's just a timeout issue like in #4637 (comment) it's possible it won't be noticed by the server admin.
That's true if it's an internal user booking a slot, but for external users they won't bother. It just gives the impression that things don't work.
That's true if it's an internal user booking a slot, but for external users they won't bother. It just gives the impression that things don't work.
Yeah but not showing it gives the impression to the external user that there are never any slots and they can never book an appointment. :-) At least making it apparent there was an error (versus saying "no slots" after a failed fetch) means the external user has the information to decide whether to reach out via some other channel to book and/or report the issue.