Closed skrishn closed 3 months ago
@skrishn
These operations are async requests and we need to wait till all these actions are completed hence we have added the loading indicator.
@sumitzarkar, I understand why it is happening, can we just assume the that when liking or disliking it is a pretty simple operation and 99.9% of the time it will be successfully and just increment the count synchronously, so there is no page reload/refresh. If it fails after the async request we could do a refresh of the UI to set the state due to the error?
@chris-fox
The only issue with this is if in the popup details the like/dislike field is shown then to reflect the new updated values we have to refresh the entire details. If we are not concerned about the updation of the like/dislike field values in feature details we can avoid the loading indicator and do other tasks in the background like you mentioned
yea, let's do that. I don't have a use case for wanting the like/dislike fields in the feature details. We can wait to see if we get customer requests for refreshing the details after a like/dislike.
@chris-fox
We have one more way to show progress indicator as we are using calcite-buttons, this will avoid user clicking same button multiple time when the operation is in progress
@sumitzarkar, that looks good.
I am seeing the new loading icon next to the like/dislike buttons but I still see the entire feature details panel reload after the like/dislike action completes.
Yes, I see the same. @sumitzarkar can we fix this feature panel loading?
@chris-fox @skrishn
I am seeing the new loading icon next to the like/dislike buttons but I still see the entire feature details panel reload after the like/dislike action completes.
We have removed the logic to refresh the attributes in info card
Note: The only drawback would be if a like or dislike field is added in popup details those will not reflect the updates when like/dislike is updated.
We have fixed this and will deliver it in the next code drop
@sumitzarkar I see the numbers jumping after hitting like/dislike
@skrishn
I see the numbers jumping after hitting like/dislike
We don't have control over this. We see this behavior as we are showing the button's loading indicator and updating the button's lable
@sumitzarkar I'm still seeing this on QA too. As I mentioned in the call, I see this behavior after the recent code drop. Please look to see if there is a way to avoid the number sliding to the left as the loading indicator updates the value.
@skrishn, this is the default behavior of the calcite button when you set the loading property to true. This was to prevent the user from rapidly clicking the like or dislike button before we could apply the edits to the feature service.
https://developers.arcgis.com/calcite-design-system/components/button/
I guess an alternative would be to disable the buttons until the edit is applied. In this way they wouldn't show the loading icon, but would grey out until the edit was complete. This might be a weird user experience though.
@skrishn @chris-fox
Please confirm if any changes requried in this
@sumitzarkar No action is required at this point. We can consider the alternative from Chris based on user feedback.
There is a delay/page refresh once like or dislike is clicked. We want to avoid it to improve the experience.