-
Notifications
You must be signed in to change notification settings - Fork 762
Fix hunk drag to respect selected lines #11918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix hunk drag to respect selected lines #11918
Conversation
|
@godnight10061 is attempting to deploy a commit to the GitButler Team on Vercel. A member of the Team first needs to authorize it. |
Byron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for tackling this, this seems like something we really want fixed as it's surprising if the selection isn't respected.
There I wonder if the visualisation should also be indicating that it's just the selected lines that are dragged, it still looks like it's the entire hunk.
Meanwhile, let's also put it back into draft while there are conflicts. Maybe @mtsgrd or @Caleb-T-Owens can chime in to see if this generally the way to go in the frontend.
In the backend, I don't think any of the changes should be needed.
3ac4864 to
a2f24ec
Compare
|
Indeed, thanks for putting together a fix for this. It was never implemented, by reasonably should. I see you've just recently pushed some more commits, and there's a lint issue there.. but let me check this branch out in a couple of hours, and we'll get it merged as soon as possible. 🙏 |
|
Wow, I am loving it! Now it's not surprising anymore and the info-box one is dragging around has just the right size and information. Something that my eye found less pleasing was the line break for 'lines'. Maybe removing the
@PavelLaptev would probably have some notes as well now. |
|
@godnight10061 thank you for he PR! I noticed that we can select lines to drag if the change is assigned or unassigned. Screen.Recording.2026-01-22.at.13.15.11.mov |
|
Thanks a lot @PavelLaptev! Is this something that can be generalised in code so it's applied generically? |
I’m not sure if this can be generalized, but I believe it should be, or the behavior will be inconsistent. |
|
@Byron, as we discussed this offline, we can merge this. However, let’s not forget to implement the ability to drag hunk lines in other places where it’s possible to do so. |
7a9c8bf to
c4d26c7
Compare
| with: | ||
| shared-key: e2e-blackbox-rust-binaries | ||
| save-if: ${{ github.ref == 'refs/heads/master' }} | ||
| - uses: dtolnay/rust-toolchain@stable |
Check failure
Code scanning / zizmor
unpinned action reference
| with: | ||
| shared-key: e2e-playwright-rust-binaries | ||
| save-if: ${{ github.ref == 'refs/heads/master' }} | ||
| - uses: dtolnay/rust-toolchain@stable |
Check failure
Code scanning / zizmor
unpinned action reference
546d7d1 to
abd12e0
Compare
1a907d6 to
f2b2bdc
Compare

Fixes #2513.
Testing:
Before/After:
after.mp4
before.mp4