You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
confirmation dialog shows no visual feedback when performing an action #7015
Please describe the problem you think should be solved
When discarding all changes for many files, clicking on discarding all changes will begin performing the action, but there is no visual indication it's actually doing anything until the operation is complete. The button simply doesn't appear to do anything, so it's likely the user will press cancel. In the background though, the operation is still working away...
Not specific to dark mode:
This is also the case when removing a large repository and moving it to the recycle bin.
changed the title [-]confirmation dialog hangs when performing the action[/-][+]confirmation dialog appear shows no visual feedback when performing an action[/+]on Mar 6, 2019
changed the title [-]confirmation dialog appear shows no visual feedback when performing an action[/-][+]confirmation dialog shows no visual feedback when performing an action[/+]on Mar 6, 2019
Thanks for the issue @njbmartin! We totally agree we can do a better job of indicating that something is happening here, and this issue was brought up separately by @varkor. We're discussing potential design patterns we could use here and evaluating how to hook into the process, so just wanted to say thanks and update you that we're looking at this.
I think if we pass the loading property to the discard changes dialog with the isDiscardingChanges state, we should be able to get a happy little spinner rendered:
An example where this is implemented is the "Create a New Repository" modal:
Can someone on @desktop/core or @desktop/comrades validate my assumption? If my hunch is correct, then I think this is ready for the community to pick up 😄
It would also be good to give the "Discard all changes" button an obviously-disabled appearance (this probably just involves actually disabling the element), rather than simply focusing the button.
Just spoke with @niik and he said while it might be a little tricky due to the synchronous nature of the method involved, the pattern @donokuda shared above is correct. I'm going to add help wanted here for someone to pick up since @donokuda laid out a pretty nice description of the relevant areas.
Just wanted to add some feedback now I've used the beta on Windows 10. Let me know if I should raise a new issue...
Removing a repository and selecting "Move to Recycle Bin", it still hangs with no visual feedback.
Once it's actually moved to recycle bin, you see a brief flash of the spinner and then it's gone. I'm guessing this might be because shell.moveitemtotrash() is a synchronous blocking call, and the method to show the spinner comes after?
@njbmartin Many thanks for bringing this to our attention and appreciate the details.
I am curious how long it hangs for you? I just tested it and it seems responsive and reacting as designed. The spinner was initiated briefly as you described and removing the repository was completed shortly thereafter.
Were you experiencing something different or did you expect something more expedited? A gif is helpful, but optional. Also, what version of Desktop and what version of DOS are you using?
What I tried to describe was it hanging after pressing remove. Instead of showing the spinner, it does nothing. Once the operation is actually complete, you then see the spinner very briefly while it completes the cleanup.
This may explain why... moving to recycle bin in Explorer shows it "discovering" what files to remove before actually removing them. Can't remember the last time I used explorer to remove files...
Activity
[-]confirmation dialog hangs when performing the action[/-][+]confirmation dialog appear shows no visual feedback when performing an action[/+][-]confirmation dialog appear shows no visual feedback when performing an action[/-][+]confirmation dialog shows no visual feedback when performing an action[/+]billygriffin commentedon Mar 6, 2019
Thanks for the issue @njbmartin! We totally agree we can do a better job of indicating that something is happening here, and this issue was brought up separately by @varkor. We're discussing potential design patterns we could use here and evaluating how to hook into the process, so just wanted to say thanks and update you that we're looking at this.
tierninho commentedon Mar 7, 2019
@njbmartin Thanks for filing.
I imagine something like this embedded within button would suffice. We will look into it and circle back soon.
Update: looks like @billygriffin already replied. For whatever reason, his comment didn't load in time. 🤷♂️
donokuda commentedon Mar 7, 2019
I did a little sleuthing in the Discard Changes codes and it looks like have a state that indicates we're in the middle of discarding files:
desktop/app/src/ui/discard-changes/discard-changes-dialog.tsx
Lines 32 to 36 in bca8e0f
However, we don't currently use this to show the spinner (despite what the comment above implies 😄):
desktop/app/src/ui/discard-changes/discard-changes-dialog.tsx
Lines 65 to 74 in bca8e0f
I think if we pass the
loadingproperty to the discard changes dialog with theisDiscardingChangesstate, we should be able to get a happy little spinner rendered:An example where this is implemented is the "Create a New Repository" modal:
desktop/app/src/ui/add-repository/create-repository.tsx
Line 511 in bca8e0f
Can someone on @desktop/core or @desktop/comrades validate my assumption? If my hunch is correct, then I think this is ready for the community to pick up 😄
varkor commentedon Mar 7, 2019
It would also be good to give the "Discard all changes" button an obviously-disabled appearance (this probably just involves actually disabling the element), rather than simply focusing the button.
billygriffin commentedon Mar 7, 2019
Just spoke with @niik and he said while it might be a little tricky due to the synchronous nature of the method involved, the pattern @donokuda shared above is correct. I'm going to add
help wantedhere for someone to pick up since @donokuda laid out a pretty nice description of the relevant areas.njbmartin commentedon Apr 24, 2019
Just wanted to add some feedback now I've used the beta on Windows 10. Let me know if I should raise a new issue...
Removing a repository and selecting "Move to Recycle Bin", it still hangs with no visual feedback.
Once it's actually moved to recycle bin, you see a brief flash of the spinner and then it's gone. I'm guessing this might be because
shell.moveitemtotrash()is a synchronous blocking call, and the method to show the spinner comes after?tierninho commentedon Apr 24, 2019
@njbmartin Many thanks for bringing this to our attention and appreciate the details.
I am curious how long it hangs for you? I just tested it and it seems responsive and reacting as designed. The spinner was initiated briefly as you described and removing the repository was completed shortly thereafter.
Were you experiencing something different or did you expect something more expedited? A gif is helpful, but optional. Also, what version of Desktop and what version of DOS are you using?
njbmartin commentedon Apr 24, 2019
Desktop: 1.7.0-beta4
What I tried to describe was it hanging after pressing remove. Instead of showing the spinner, it does nothing. Once the operation is actually complete, you then see the spinner very briefly while it completes the cleanup.
njbmartin commentedon Apr 24, 2019
This may explain why... moving to recycle bin in Explorer shows it "discovering" what files to remove before actually removing them. Can't remember the last time I used explorer to remove files...
tierninho commentedon Apr 24, 2019
Ah, gotcha. Thanks for the gifs, it helps to see exactly what is happening.
@desktop/core any thoughts on backend processes that might affect this? Looks like the total repo size was 390 MB.