Skip to content

[Stashing] Notify user that an existing stash will be overwritten - #7230

Merged
iAmWillShepherd merged 29 commits into
stash-changes-on-branchfrom
but-you-already-have-stashed-changes
Apr 11, 2019
Merged

iAmWillShepherd merged 29 commits into
stash-changes-on-branchfrom
but-you-already-have-stashed-changes

Conversation

@iAmWillShepherd

@iAmWillShepherd iAmWillShepherd commented Apr 5, 2019 •

Copy link
Copy Markdown
Contributor

⚠️ Please review #7219 first ⚠️

Fixes #7250 - e655e8a
Related issues: #6107 and #6987

This PR updates the stash changes workflow to ask for confirmation when creating a stash would result in the previous stash being overwritten.

2019-04-11 10 13 31

@iAmWillShepherd
iAmWillShepherd changed the base branch from development to come-on-changes-lets-just-go-to-another-branch April 5, 2019 17:50
@iAmWillShepherd iAmWillShepherd added this to the 1.7.0 milestone Apr 5, 2019
William Shepherd added 2 commits April 5, 2019 15:01
This will allow users to recover their stash so long as git GC hasn't been run.
`getBranchesState` should probably be removed. It will not give branch state unless the repo is a GitHub repo.
@iAmWillShepherd iAmWillShepherd mentioned this pull request Apr 5, 2019
6 tasks done
@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

I updated the warning to only show when stashing on the current branch since that's the only time we should overwrite an existing stash entry.

2019-04-05 17 24 41

@iAmWillShepherd iAmWillShepherd added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 8, 2019
@iAmWillShepherd
iAmWillShepherd requested a review from a team April 10, 2019 21:45
@billygriffin billygriffin added the time-sensitive Pull Requests where reviews need to happen in a timely manner label Apr 10, 2019

@niik niik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems like there's a little build problem due to branchesState being referred to as state here.

public render() {
const title = __DARWIN__
? 'Are You Sure You Want To Overwrite Your Current Stash?'
: 'Are you sure you want to overwrite your current stash?'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a little meaty for a title. Could we incorporate this message into the dialog contents and make the title be something like Overwrite Stash?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I decided to get rid of this content entirely since putting it in the dialog content area would be redundant.

Comment thread app/src/ui/app.tsx Resolved
@niik niik self-assigned this Apr 11, 2019
@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

🍎

@niik

niik commented Apr 11, 2019

Copy link
Copy Markdown
Member

@desktop/engineering I have to head out but given the time sensitive nature, the fact that I've reviewed this and everyone else will be up and around for almost a full day before I get back I think it's fine if this is merged by someone else before I'm back tomorrow.

@iAmWillShepherd
iAmWillShepherd changed the base branch from come-on-changes-lets-just-go-to-another-branch to stash-changes-on-branch April 11, 2019 15:32
@shiftkey shiftkey removed the time-sensitive Pull Requests where reviews need to happen in a timely manner label Apr 11, 2019
@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

Merging now since this is going into a feature branch and having these changes in one branch makes @desktop/quality-assurance lives easier.

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.

4 participants