Skip to content

confirmation dialog shows no visual feedback when performing an action #7015

Closed

Description

@njbmartin

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...

image

Not specific to dark mode:
image

This is also the case when removing a large repository and moving it to the recycle bin.

image

Activity

  1. 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
  2. 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
  3. billygriffin commented on Mar 6, 2019

    @billygriffin
    Contributor

    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.

  4. added
    design-input-needed
    on Mar 6, 2019
  5. tierninho commented on Mar 7, 2019

    @tierninho
    Contributor

    @njbmartin Thanks for filing.

    I imagine something like this embedded within button would suffice. We will look into it and circle back soon.

    image

    Update: looks like @billygriffin already replied. For whatever reason, his comment didn't load in time. 🤷‍♂️

  6. donokuda commented on Mar 7, 2019

    @donokuda
    Contributor

    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:

    /**
    * Whether or not we're currently in the process of discarding
    * changes. This is used to display a loading state
    */
    readonly isDiscardingChanges: boolean

    However, we don't currently use this to show the spinner (despite what the comment above implies 😄):

    <Dialog
    id="discard-changes"
    title={
    discardingAllChanges
    ? toPlatformCase('Confirm Discard All Changes')
    : toPlatformCase('Confirm Discard Changes')
    }
    onDismissed={this.props.onDismissed}
    type="warning"
    >

    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:

    a happy little spinner

    An example where this is implemented is the "Create a New Repository" modal:

    loading={this.state.creating}

    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 😄

  7. varkor commented on Mar 7, 2019

    @varkor

    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.

  8. billygriffin commented on Mar 7, 2019

    @billygriffin
    Contributor

    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.

  9. added
    help wanted
    and removed
    design-input-needed
    on Mar 7, 2019
  10. njbmartin commented on Apr 24, 2019

    @njbmartin
    Author

    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.

    image

    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?

  11. tierninho commented on Apr 24, 2019

    @tierninho
    Contributor

    @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?

    Screen Shot 2019-04-23 at 3 17 10 PM

  12. njbmartin commented on Apr 24, 2019

    @njbmartin
    Author

    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.

    TyyZRnTjDv

  13. njbmartin commented on Apr 24, 2019

    @njbmartin
    Author

    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...

    WxLvQDsBUt

  14. tierninho commented on Apr 24, 2019

    @tierninho
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions