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
One of the things I miss most from Classic Desktop (apart from my beloved comparison graph) is the ability to discard all changes. I've used this pretty frequently after commiting the subset of the changes that I care about. I'd love to have this option back.
The alternatives, discarding the files one-by-one or resorting to the terminal (🙀), take quite a bit more time.
Include Fixes #4197 at the top of the description for your PR and a checklist as you progress through (helpful for you and us!)
Read our PR process doc to understand how we do PRs in this repo and what code review looks like
When you finish the PR, add a comment saying it's ready for review, include before/after screenshots in the description, and describe any major changes
@xamm That's a great question! We plan to add automated end-to-end coverage in the future for some general use cases, in fact this is something we're actively working on. We have a few unit test files in app/test/unit but I don't think we have coverage for this file right now. Thanks for asking!
PS. No need to add test coverage with your pull request.
Activity
donokuda commentedon Mar 7, 2018
Hi @mdiep!
If I understand correctly, you can discard all changes by right clicking in the
X Changed Filesheader:mdiep commentedon Mar 7, 2018
Wow. That is… not discoverable.
In that case, I'd like to see a menu item for this.☺️
mdiep commentedon Mar 7, 2018
Classic Desktop also had this as an option in the context menu on the individual files. It might not be a bad idea to add it back there too.
Also, discarding an individual file isn't in the main menu either.
[-]Discard All Changes[/-][+]Discard All Changes isn't discoverable[/+]donokuda commentedon Mar 7, 2018
I totally agree 😄
👍I'm for this since it's more discoverable than the header.
donokuda commentedon Mar 10, 2018
If anyone wanted to tackle this, I think this will make a good issue for someone to pick up! 😄
For the UI, we'll want to implement the right click menu item:
The relevant lines of code to add the menu item can be found here:
desktop/app/src/ui/changes/changed-file.tsx
Lines 103 to 114 in d328cf7
You'll want to add similar to how the "Discard All Changes" item is implemented in the changes list:
desktop/app/src/ui/changes/changes-list.tsx
Lines 152 to 156 in d328cf7
@desktop/core + @desktop/comrades Am I missing anything for this one?
nerdneha commentedon Mar 12, 2018
@xamm go for it!
Some helpful tips for completing a PR:
Fixes #4197at the top of the description for your PR and a checklist as you progress through (helpful for you and us!)tierninho commentedon Mar 12, 2018
@xamm That's a great question! We plan to add automated end-to-end coverage in the future for some general use cases, in fact this is something we're actively working on. We have a few unit test files in
app/test/unitbut I don't think we have coverage for this file right now. Thanks for asking!PS. No need to add test coverage with your pull request.