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

add option to move repository to trash when removing from app #4703

Merged
merged 7 commits into from
Jul 13, 2018

Conversation

say25
Copy link
Member

@say25 say25 commented May 16, 2018

Closes #2108

@@ -29,6 +42,7 @@ export class ConfirmRemoveRepository extends React.Component<
}

public render() {
const trashName = __DARWIN__ ? 'Trash' : 'Recycle Bin'

This comment was marked as spam.

This comment was marked as spam.

}
}

private onConfirmRepoRemoval = (repository: Repository) => {
this.props.dispatcher.removeRepositories([repository])
this.props.dispatcher.removeRepositories([repository], false)

This comment was marked as spam.

This comment was marked as spam.

@say25
Copy link
Member Author

say25 commented May 16, 2018

@shiftkey I'm looking for feedback/help/ideas at this point.

@iAmWillShepherd iAmWillShepherd added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label May 16, 2018
@shiftkey shiftkey removed the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label May 20, 2018
@say25 say25 changed the title [WIP] Move Repo to Trash on Remove Move Repo to Trash on Remove May 21, 2018
@say25
Copy link
Member Author

say25 commented May 21, 2018

@shiftkey, read issue again and realized that the state idea isn't what is asked for by the original requestor.

With these changes:

  • When removing a repo with the confirm modal, it will give the user the option to the move the repo to the trash as well
  • Missing Repos are uneffected

Copy link

@Tibunt Tibunt left a comment

Choose a reason for hiding this comment

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

Rimove outh2 verifycasion cloud


<div>
<p>
<strong>

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@@ -746,12 +746,15 @@ export class App extends React.Component<IAppProps, IAppState> {
repository,
})
} else {
this.props.dispatcher.removeRepositories([repository])
this.props.dispatcher.removeRepositories([repository], false)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@@ -736,7 +736,7 @@ export class App extends React.Component<IAppProps, IAppState> {
}

if (repository instanceof CloningRepository || repository.missing) {

This comment was marked as spam.

@shiftkey shiftkey changed the title Move Repo to Trash on Remove add option to move repository to trash when removing from app Jun 20, 2018
@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jun 21, 2018
@say25
Copy link
Member Author

say25 commented Jun 25, 2018

@shiftkey Im sure you are busy but any other requested changes?

@shiftkey
Copy link
Member

@say25 I'll come back to this this week - haven't forgotten, just a bit busy today!

Copy link
Member

@shiftkey shiftkey left a comment

Choose a reason for hiding this comment

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

I think I'm good to merge this, but I'll let it sit for the weekend and give @desktop/core @desktop/comrades a chance to add their feedback

Thanks for the amazing work again @say25!

@lee-dohm
Copy link
Contributor

lee-dohm commented Jul 9, 2018

What if the repository is on a drive that doesn't have a "Trash" or "Recycle Bin"? Will it detect that and not show the option? cf atom/tree-view#856

@shiftkey
Copy link
Member

@lee-dohm are you using the shell.moveItemToTrash(fullPath) for this? Technically we're already using this as part of the discard changes flow, so I'm surprised we've not encountered this issue already due to that...

@lee-dohm
Copy link
Contributor

I'd have to dig into the code but, to my recollection, yes. I'll take a look later today and report back.

@lee-dohm
Copy link
Contributor

@shiftkey
Copy link
Member

@lee-dohm I've moved the discussion about shell.moveItemToTrash on Windows out to #5157.

I think there might be some iterations on this down the track, but for now this is a great first step. Thanks again @say25!

@shiftkey shiftkey merged commit d319d49 into desktop:master Jul 13, 2018
@say25 say25 deleted the Delete-Repos-On-Remove branch July 13, 2018 18:19
@Tibunt

This comment has been minimized.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 16, 2018
@desktop desktop unlocked this conversation Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants