Skip to content

[Stashing] Adds ability to stash changes - #7210

Merged
niik merged 198 commits into
developmentfrom
stash-changes-on-branch
Apr 15, 2019
Merged

niik merged 198 commits into
developmentfrom
stash-changes-on-branch

Conversation

@iAmWillShepherd

@iAmWillShepherd iAmWillShepherd commented Apr 3, 2019 •

Copy link
Copy Markdown
Contributor

Related issues: #6107 and #6987

This PR addresses the following user story:

I'm doing work on a branch, and something comes up where I need to temporarily go to a different branch to do something entirely different. I'm forced to either WIP commit my work and undo it when I come back or leave Desktop to stash it temporarily. I want to just be able to switch branches, do whatever I needed to do, and come back with my changes right where I left them.

2019-04-03 15 17 56

Important bits

  • Created a feature flag that enables this in the dev.
  • New dialog that gives user an opportunity to stash changes upon checking out a new branch. Note that this dialog will only appear if there are changes in your working directory.
  • Adds styling to Stashed Changes item so it looks like the mockup; interaction is wired up to show the IStashEntry associated with the branch
  • Stash entries are deleted to enforce the one stash per branch constraint. We decided that we'd instead like to modify the stash entry's message, but that is not straight forward since there is no stash function that we can rely on.
  • Stash dialog notifies user that they will overwrite their stash entry when there is already an associated stash for the branch.
  • Stash diff view, thanks @outofambit for taking care of this piece.

William Shepherd and others added 22 commits April 2, 2019 15:38
Co-Authored-By: Markus Olsson <[email protected]>
…onal

This is needed since we are now using the ListRow component outside of the List component. We made fields optional to simplify development of this feature.

Co-Authored-By: Markus Olsson <[email protected]>
@iAmWillShepherd
iAmWillShepherd changed the base branch from development to all-stash-functions April 3, 2019 16:33
@iAmWillShepherd
iAmWillShepherd changed the base branch from all-stash-functions to development April 4, 2019 13:05
Comment thread app/src/lib/stores/app-store.ts Resolved
Comment thread app/src/lib/stores/app-store.ts Resolved
Comment thread app/src/lib/stores/app-store.ts Resolved
Comment thread app/src/lib/stores/app-store.ts Resolved
Comment thread app/src/lib/stores/app-store.ts Resolved
Comment thread app/src/lib/stores/git-store.ts Resolved
Comment thread app/src/models/stash-entry.ts Resolved
Comment thread app/src/ui/changes/changes-list.tsx Resolved
: new Array<FileChange>()

const diffComponent =
this.props.selectedStashedFile && this.props.stashedFileDiff ? (

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.

Explicit check.

@outofambit outofambit changed the title Adds ability to stash changes [Stashing] Adds ability to stash changes Apr 12, 2019
niik
niik previously approved these changes Apr 15, 2019
@niik

niik commented Apr 15, 2019

Copy link
Copy Markdown
Member

Approved given that all new functionality in this PR is behind a feature flag. I've done a quick audit of all comments made to ensure that they're tracked separately in issues.

@niik
niik merged commit 20a99fc into development Apr 15, 2019
@iAmWillShepherd iAmWillShepherd mentioned this pull request Apr 17, 2019
4 tasks done
@outofambit
outofambit deleted the stash-changes-on-branch branch July 19, 2019 20:15
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 time-sensitive Pull Requests where reviews need to happen in a timely manner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants