gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

UX: make it clear "discard changes" on a file will affect all lanes

Open daniilS opened this issue 1 year ago • 7 comments
trafficstars

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

daniilS avatar Jun 20 '24 17:06 daniilS

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).

Screenshot 2024-06-20 at 22 02 15

Byron avatar Jun 20 '24 20:06 Byron

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!

daniilS avatar Jun 21 '24 10:06 daniilS

Would you mind if we instead make it discard only changes that belong to the particular branch?

mtsgrd avatar Jun 25 '24 12:06 mtsgrd

@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.

daniilS avatar Jun 25 '24 14:06 daniilS

@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

daniilS avatar Aug 05 '24 15:08 daniilS

Hey, thanks for bringing this up again. I will try and prioritise it and get it done next week. 🙏

mtsgrd avatar Aug 09 '24 20:08 mtsgrd

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

krlvi avatar Sep 05 '24 12:09 krlvi