gitbutlerapp / gitbutler

The GitButler version control client, backed by Git, powered by Tauri/Rust/Svelte
https://gitbutler.com
Other
12.46k stars 492 forks source link

After "Integrated" status, the button "Create PR" should be "Delete" #4571

Open koppor opened 1 month ago

koppor commented 1 month ago

Version

0.12.16

Operating System

Windows

Distribution Method

msi (Windows)

Describe the issue

GitButler perfectly shows that a virtual branch is integrated:

grafik

After such an integration, the most natural thing is to delete the Virtual Branch.

However, the prominent activity is "Create PR".

How to reproduce

No response

Expected behavior

The button "Create PR" should switch to "Delete".

Maybe switching the expansion of the buttons as follows:

grafik

Relevant log output

No response

mtsgrd commented 1 month ago

Hey, thanks for bringing this up. I agree that it's a bit odd we suggest you create a PR for an integrated branch. In most cases (at least for me) deleting the branch isn't necessarily what you want to do since that removes the changes from your working directory. Instead, updating your base will remove the branch without affecting said changes on disk.

As a start I think it would make sense if we don't show the PR button when a branch has been integrated. Going a step further, I wonder if @PavelLaptev has any thoughts on how we could make it more obvious that "this branch is done, it will be automatically removed when you update your base"?

PavelLaptev commented 1 month ago

The current design allows creating a new PR on an already integrated branch.

You can view the flow in Figma. The app follows the same approach.

image

But, it seems like we might want to disable any actions on an integrated branch, except deletion. If creating PRs isn’t allowed, it might also make sense to prevent making and committing changes to the branch.

Should we consider something like this draft?

image
dougkusanagi commented 3 weeks ago

I would like to know if there is something else to do to make the branch merged to be deleted. All branches of any projects that i commit, push, merge the PR and update the workspace with the red button all in Gitbutler the branch remains in the local workspace and i have to remove it them manually (with Github Desktop usually). I think is relatable with this issue, if its not just let me know and i open a new one.

Version

0.12.20

Operating System

Windows

Distribution Method

msi (Windows)

PavelLaptev commented 3 weeks ago

I would like to know if there is something else to do to make the branch merged to be deleted.

After clicking the red 'update' button, the merged branch should disappear. If it doesn't, it might be a bug. I also think there should be a 'delete' button on the integrated lane.

https://github.com/gitbutlerapp/gitbutler/issues/4571#issuecomment-2294939172

@mtsgrd wdyt?

koppor commented 2 weeks ago

I am very open to close the issue. Last time I worked with GitButler, the branch column disappears after "update".

OK, sometimes too many columns, but this is another issue: https://github.com/gitbutlerapp/gitbutler/issues/4785