Skip to content
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

[BUG] Sorting breaks tabs in groups #8

Closed
valsaven opened this issue Dec 4, 2020 · 16 comments
Closed

[BUG] Sorting breaks tabs in groups #8

valsaven opened this issue Dec 4, 2020 · 16 comments
Assignees

Comments

@valsaven
Copy link

valsaven commented Dec 4, 2020

Describe the bug
Sorting breaks tabs in groups.

About Chrome Groups: https://blog.google/products/chrome/manage-tabs-with-google-chrome/

Steps to reproduce the behavior

  1. Add a few tabs (4-5) to the group.
  2. Make sorting.
  3. The tabs will be dropped from the group, and only 1 tab will remain in the group.

Expected behavior
The tabs don't drop out of the group.
The groups themselves are either not sorted, or are sorted in alphabetical order.

Screenshots
Dec-04-2020 12-42-20

Desktop/Browser/Extension Info (please complete the following information):

  • Simple Tab Sorter Version: v0.3.0
  • Browser: Chrome
  • Version: Version 87.0.4280.88 (Official Build) (x86_64)
  • OS: MacOS 11.0.1
@pwhite2
Copy link
Owner

pwhite2 commented Dec 4, 2020

Hi @valsaven, thanks for the submitting the detailed bug report - I use Vivaldi as my daily driver and wasn't aware of this change in Chrome...

I'll try to carve some time out of my weekend to look into, and hopefully address, this issue. If I get slammed with on-call, I should be able to look into it next week.

@pwhite2
Copy link
Owner

pwhite2 commented Dec 11, 2020

Hi @valsaven,

Sorry to keep this brief, I just lost a long reply I had typed up and need to call it a night...

Long story short, tab group's seem like a work-in-progress from an extension API perspective - only the tab group ID is available from what I could tell last weekend and I stumbled across a discussion that indicated there might be better support coming in the chrome beta channel.

I need to make sure that any changes I make are backwards compatible and don't break the plugin in other browsers that support chrome extensions, and I have a few usability questions/concerns, so it might be a while before I have the time to come up with something that I'd feel comfortable with submitting as an update to the chrome web store.

With that said, how comfortable would you be with loading the plugin from source if I were to commit my work-in-progress to a feature branch? I had a chance to make some changes that I wasn't completely happy with, last weekend, but on a positive note they didn't break up the tab groups. If this is something you'd like to play with, I can sanity check my changes this weekend and push them to github so you can give it a try...

@valsaven
Copy link
Author

valsaven commented Dec 11, 2020

@pwhite2 Sure, no problem. As soon as there is a branch, I will take the extension from there and report on the results 👍

@pwhite2
Copy link
Owner

pwhite2 commented Dec 11, 2020

Thanks @valsaven, much appreciated - I'll let you know as soon as I push the changes this weekend.

@pwhite2
Copy link
Owner

pwhite2 commented Dec 14, 2020

Hi @valsaven. I just pushed a fix to https://github.com/pwhite2/simple-tab-sorter/tree/STS-8.

This "fix" is really just a patch that ignores all tabs in tab groups. As a result, it should continue to sort ungrouped tabs as it did before Tab Groups were introduced.

I took another stab at sorting tabs within Tab Groups but Chromium continued to remove them from the tab groups even when the tabs' groupIds were unaltered. I'm afraid I might have to wait until Tab Groups become first-class citizens of the Extension API before I'm able to add the level of support that I'd like for Tab Groups.

Please let me know whether this resolves the issues you were experiencing and whether you think it adds any benefit for tab group users in this limited capacity - your feedback would be greatly appreciated.

@valsaven
Copy link
Author

valsaven commented Dec 16, 2020

@pwhite2 Sorting no longer works at all. I think this is because there is no groupId property in tab object, so what we get is undefined !== -1 which is always true.

{
  "active": false,
  "audible": false,
  "autoDiscardable": true,
  "discarded": false,
  "favIconUrl": "https://www.bbc.com/favicon.ico",
  "height": 942,
  "highlighted": false,
  "id": 1179,
  "incognito": true,
  "index": 2,
  "mutedInfo": {
    "muted": false
  },
  "pinned": false,
  "selected": false,
  "status": "complete",
  "title": "BBC - Homepage",
  "url": "https://www.bbc.com/",
  "width": 1792,
  "windowId": 1169
}

To be honest, I'm not sure if there is any way to track the presence of a tab in a group 🙁 I haven't found an explicit API.

@pwhite2
Copy link
Owner

pwhite2 commented Dec 18, 2020

@valsaven Thanks for giving it a shot, I really appreciate it. I agree, I've definitely come up empty handed in my search for any such API support.

I'd expect sorting to be broken if the groupId property is missing since I created this proof-of-concept with the assumption that it exists. That said, I was really surprised that your tab objects are missing the groupId property if your version of Chrome supports tab groups, so I just installed the extension in Chrome Version 87.0.4280.88 (Official Build) (x86_64) and was able to reproduce the issue.

I didn't run into this issue during development & testing of the changes because I was using Chromium Version 89.0.4340.0 (Developer Build) (x86_64). It appears that the current Chrome release branch is lagging behind Chromium in tab group support, which isn't saying much since the current API support in Chromium is still pretty weak.

If you're willing to give Chromium a shot, I'd suggest testing the extension there to see whether it behaves as documented in the STS-8 branch's User Guide. Otherwise, it looks like we'll both have to wait until proper tab group support is available to the extension API in the Chrome release branch before resuming work on this issue.

@valsaven
Copy link
Author

@pwhite2 You're welcome. I apologize for not replying - I just agreed that under current conditions (no tabs API) there was no way to fix anything.
But today I checked the extension on Version 89.0.4389.90 (Official Build) (64-bit) and now it ignores tabs in groups (predictable behavior), so I think this issue is no longer actual on new versions of Chrome.

@pwhite2
Copy link
Owner

pwhite2 commented Mar 22, 2021

@valsaven, no worries and thanks for the update. Just to confirm, the extension version that you just checked with Chrome v89 was manually installed from https://github.com/pwhite2/simple-tab-sorter/tree/STS-8 - correct? If so, I'll merge the patch and submit an update to the chrome webstore.

@valsaven
Copy link
Author

valsaven commented Apr 2, 2021

@pwhite2 No, I used the version from the Chrome Web Store.
But it's strangely: sorting ignores tabs only on Windows 10. On Linux it still fails :(

@pwhite2
Copy link
Owner

pwhite2 commented Apr 2, 2021

@valsaven I'm a bit surprised that the version from the Chrome Web Store is now ignoring tabs on Windows 10 because it doesn't contain the changes I made for you in the STS-8 branch, so the change in the behavior must be due to a change in the browser.

I consider that good news - if you have time (I don't have a linux desktop readily available to test myself) to manually install and test the extension from the STS-8 branch on Linux, I'll probably have time to merge the patch to the mainline and submit an update to the Chrome Web Store over the weekend if it works on Linux for you...

@r888800009
Copy link

The Problem still happens with Chrome Web Store Version. Maybe I should install the STS-8 version to fix it? Thx

OS MacOS
Chrome 91.0.4472.101
Version: v0.3.1

@pwhite2
Copy link
Owner

pwhite2 commented Jun 27, 2021

Hi @r888800009. Please give that a shot and let me know whether that behaves as expected. If so, I'll merge the changes and submit a new build to the Chrome Web Store. Thanks!

@r888800009
Copy link

@pwhite2 it fixed drop out tab on macOS Chrome and Linux Chromium 👍

@pwhite2
Copy link
Owner

pwhite2 commented Jun 28, 2021

Thanks @r888800009! I'll try to carve some time out at the end of the week to merge the changes and submit an update to the Chrome Web Store.

@pwhite2
Copy link
Owner

pwhite2 commented Jul 15, 2021

Thanks again for the feedback and fix verification, @valsaven and @r888800009. I'm closing this issue now that the fix has been released in the Chrome Web Store as release 0.3.2.

@pwhite2 pwhite2 closed this as completed Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants