-
Notifications
You must be signed in to change notification settings - Fork 4
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
Tab swallowing not working properly #6
Comments
You are right, this is exactly the same experience I described on issue #5. A specific thing I noticed was that it seemed to be easier to get a window to swallow the tab on the left and middle panes with 3 vertical splits. One particular annoyance I have with Chrome's tab handling is that I mostly use 2 or 3 vertical splits which are all set to tabbed (stacked?) layout. When there's multiple tabbed Chrome windows, it's pretty much just trial and error to get a tab stick to the window I want. As I mentioned on #5, it's even more difficult with a tab group based on my experience. Often I've found it's easier to float both window before attempting. Also I've found it helps if the tab bars of the two windows are side by side and try to make the motion as straight as you can. 😁. But the latter strategy falls apart if you happen to grab the last tab on a window (with no other tabs on the split). It also fails if there's multiple Chrome tabbed/stacked Chrome windows. Of course, I believe we all agree this is likely not a simple issue to fix and i3 users have to be a very tiny fraction of the Chromium based browsers' userbase. 🙂 With that said, seeing how painlessly this works on Firefox,it makes me think Chromium has a somewhat too eager UX implementation. I wonder if it's creating a completely new window when you detach a tab, which will then be immediately closed if attached to an existing window. The tabs also seem to snap in to a window in this same eager way, while Firefox lets you carefully select the position using a small arrow indicator. |
@gibsonrng, not sure about the minor versions, but 102 did not fix it for me. 103 was the one that "fixed" it. (Every time I say fixed here, I mean it very loosely as it it not entirely fixed as far as I can tell). Is @ristomatti correct in assuming that this is exactly the same issue as described in #5 and not something new? If so, I would close this issue as I have already pinned #5. If so I can only repeat that this is a chromium but that I cannot "modify" as this only interacts with windows/containers and their behavior.
I also discovered different behavior when the layout is vplit instead of hsplit in i3. I don't even know if it is purely related to chromium at this point. In the following gif you can see what I mean. After v-splitting. I works fine – at no point do I use the script from this repository! In the README you can see some old information about which versions I bisected to work or partly work but I am a bit weary to do that again and get someone from the chromium team to look at it again... |
Hey @Syphdias, regarding your last gif: I think all these differences in behavior can be explained by the fact that you are sometimes working with a browser window that has only one tab. Dragging out last tab from a browser window behaves differently than the usual case with when some tabs remain in the browser window. Regarding historic behavior of the script in this project: it worked great with some versions, for example, Exact version |
I think this is exactly it what I have been struggling with. You are right, there is still an issue. But I think I cannot fix it and it is a chromium issue at heart with one of the behaviors and it changed from version to version. The two different behaviors for how a tab is converted to "dragging":
In my opinion both dragging should behave like 1 and we would all be happy. No script needed. But at some point in the development of chromium behavior 2 changed and you can no longer drag (floating) windows into other windows. This is not specific to the script but only visible with it. Since if you drag out a tab, you usually get it in tiling mode without the script. In looks like 96.0.4664.110 behaves like the version I tested (95.0.4630.0 + This is made worse by the fact that if you start with behavior 1, but accidentally drag the tab out again, you now have behavior 2. Which means you need to drop the window in tiling mode and drag the single tab to get behavior 1 again. Not sure if that could be done automatically to force behavior 1 🤔 |
Yes I believe I was 🙂. The first 102 release broke things badly and that is what I believe #5 is about. After noticing the issue I installed a beta of 103 and to my relief found out it's already fixed there. However we did not have to wait that long as a few days ago a second 102 build was released which fixed that. The issue described here matches my experience with running this script on the later 102 build.
Looks the same as for me also w/o this script running. In fact, now after a full day of using the newer 102 build, I believe dragging tabs has improved over version 101. It's definitely glitchy but still an improvement. Moving tab groups still seem to be worse than single tabs but it might also have improved a bit. One thing I've specifically noticed improving is rearranging tabs within the same window (e.g. moving a tab from the far right to a tab group on the far left. On all previous releases after tab group feature was released I had to have my tongue at the right angle and carefully try not to move the mouse pointer even a single pixel off the tab tab bar vertical axis. It seems there's now a bit more margin for error 😄.
Agree 100%. The base idea of your script is still very clever. It's a pity it can't work around the current Chromium version but at least now it's good enough for me. Heopfully it won't reappear at some point given the change history you've described. With good luck they'll add regression tests: |
In a nutshell: The script improves the tab dragging experience from multi tab out of the window, but not into another window. Workaround: Drop tab to make a new window then drag into another window – the script has no part in this. |
My main usecase has always been dragging tabs within the same browser window. Dragging tabs to another window is more rare in my workflow and this can be done quite easily with: "right click -> move tabs to another window" and dragging them within the new browser window if needed. For easier tab dragging within the same browser window I created and now use another workaround. Dragging tabs within the same browser window requires careful horizontal movement of the mouse (especially when inside a tabbed i3 layout). So I created one script that enters a "horizontal-only dragging mode" and another script that exits this mode. For extra convenience entering this mode presses down mouse button automatically and exiting this mode lifts the mouse button automatically, so I do not have to click or keep touchpad button pressed manually. I bind these scripts to First script (enters horizontal-only mouse mode): set -e
ids="$(xinput list | grep -E "\[slave.*pointer" | cut -d '=' -f 2 | cut -f 1)"
for id in $ids; do
xinput set-prop "$id" "Coordinate Transformation Matrix" 1 0 0 0 0 0 0 0 1
done
xdotool mousedown 1 Second script (exits the mode): set -e
pkill -ALRM sxhkd
xdotool mouseup 1
ids="$(xinput list | grep -E "\[slave.*pointer" | cut -d '=' -f 2 | cut -f 1)"
for id in $ids; do
xinput set-prop "$id" "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1
done |
Since you already pressing buttons this might be interesting to you, if you haven't seen it yet: #5 (comment) |
Both of you have gone to great lengths in attempting to tackle the issue! 🤯 I don't know if I've gotten more accurate with my mouse movement or if something has improved but I've only had a couple of tab drops on vertical movement during the last two days. A quick screencap with no tweaks running: recording-2022-06-16_21.47.20.mp4 |
Another trick I use if I need to move a tab to the far right, I'll pin the tab with a shortcut, then unpin it. I've assigned the keyboard shortcut with this extension (might be doable nowadays even without it): https://chrome.google.com/webstore/detail/tab-pinner-keyboard-short/mbcjcnomlakhkechnbhmfjhnnllpbmlh |
Yes, I also use
Yes, in the demo you are just dragging it very horizontally, quite hard to do with random touchpads.
Yes, I think that Chromium creating native windows during tab dragging is not the best option. This seems to create more platform dependent behaviors and bugs for little if any benefit. I have not looked at many other software projects that support cross-window tab dragging, but Firefox, Jetbrains, even Visual Studio Code handle tab dragging internally without creating native windows and work great as a result. But I would not hold my breath for this to be changed / "fixed" in the Chromium project.
Yes, in the end browser extensions probably can provide best UX for this with the current Chromium behavior. There probably are a lot of options that help with "tab organization", although I am not a huge fan of installing additional browser extensions. |
I had the idea of letting go of the native window for a split second and then grabbing the tab again to trigger the internal window dragging. But at least |
Hey, finally discovered this project (big thanks for sharing this) as tab dragging in i3 and chromium based browsers has been painful for quite some time (especially when trying to rearrange tabs in the same browser window when inside a tabbed i3 layout with multiple windows).
Just noting that I am aware of the recent chromium bug that caused complete tab dragging breakage in the last few weeks. But it looks already fixed in chromium
102.0.5005.115
based browsers. So I started testing this script with102.0.5005.115
and also multiple older browser versions before the last breakage. But in all cases I am noticing a problem. When dragging a tab to another window, the dragged window gets switched to floating mode properly, but it cannot be placed in another browser window, it just does not get swallowed when dragged to the new position. This can be seen in the following gif:In very rare cases (maybe 1%) it randomly gets swallowed in a new position.
So I started testing this with other machines, distros and older browser versions and this issue seems to appear with all versions >=
97.0.4692.71
. More specifically96.0.4664.110
was the last version there the script in this project worked really well (as described in the project README). I used the following method: https://unix.stackexchange.com/a/612981 to install older google-chrome versions on a Debian based system.Am I doing something wrong? Has dragged tab swallowing been working properly for somebody with a chromium based browser >=
97.0.4692.71
?The text was updated successfully, but these errors were encountered: