gitbutler
gitbutler copied to clipboard
UX: make it clear "discard changes" on a file will affect all lanes
Version
0.12.5
Operating System
Windows
Distribution Method
msi (Windows)
Describe the issue
"Discard changes" is accessed from the context menu inside one particular lane, but will discard any changes to the file in all lanes - this doesn't feel like obvious behaviour to me, and since discarding already gives a modal to confirm, I think it would be good to add a check if the selected file also has changes in any other lanes, and point it out in the modal if yes.
How to reproduce
No response
Expected behavior
No response
Relevant log output
No response
Thanks for reporting, I also see how this behaviour can be confusing without pointing it out specifically.
Just in case anything got lost, one should be able to undo the discard as (roughly) indicated in the screenshot (it's the clock symbol in the bottom-left, right next to settings).
Nothing was lost, don't worry - think I actually found this while testing for #4136 😂 But yes I'm a big fan of the undo button!
Would you mind if we instead make it discard only changes that belong to the particular branch?
@mtsgrd I think that would work well! I assumed there was some reason for the current behaviour hence my suggestion for the warning, but personally I can only think of use cases for discarding only changes in the current lane.
@mtsgrd wondering if there has been any update on this? Have come across a few times where I've wanted to discard all changes to a file in a branch without affecting other branches
Hey, thanks for bringing this up again. I will try and prioritise it and get it done next week. 🙏
It appears that this https://github.com/gitbutlerapp/gitbutler/pull/4820 resolves this problem. I'm making a release in a few minutes that will contain the fix so that we can have it tested