-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support Chrome Tab groups? #4
Comments
Oh shit, thanks for pointing that out! Yes, if time allows. I'll figure something out as soon as I can. The next two weeks are gonna be hectic for me though.
|
No worries, thank you!
…On Wed, Jun 16, 2021 at 4:06 PM Łukasz A.J. Wrona ***@***.***> wrote:
Oh shit, thanks for pointing that out! Yes, if time allows. I'll figure
something out as soon as I can. The next two weeks are gonna be hectic for
me though.
Cheers
________________________________
From: Or Schiro ***@***.***>
Sent: Wednesday, June 16, 2021 10:37:23 AM
To: LAJW/history-menu ***@***.***>
Cc: Łukasz A.J. Wrona ***@***.***>; Mention ***@***.***>
Subject: [LAJW/history-menu] Support Chrome Tab groups? (#4)
Hey @LAJW<https://github.com/LAJW> !
This is a beautiful extension.
Would it be possible to support Chrome's new tab groups to offer a new
sub-menu called "Recently Closed Tab Groups"?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<
#4>, or unsubscribe<
https://github.com/notifications/unsubscribe-auth/ACUNDPWRG573D6KK23SUXW3TTBWFHANCNFSM46ZBL4KA
>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABJXQY37Z6GYCMZFBIEERDTTCVVZANCNFSM46ZBL4KA>
.
|
I had a quick look. I can't rely on Chrome API for this. I'll have to keep track of groups manually. Otherwise it would already be on its way to you. Thankfully in the meantime you can still restore tabs individually, which will recreate the groups, albeit with a few more clicks. I have an idea how to make this work, but it might take a little longer. |
I did more digging. Looks like I need to update to the new Chrome API (Manifest V3) to even access these things. I tried doing that, but Chrome forgot to implement favicons - they're supposed to be obtained in a different way, but they just give me empty strings. And that's for closed tabs, I couldn't find favicon support for history entries. They really dropped the ball here. I'll see if it's broken on the beta channel and if it is, file a bug. |
Great, thanks!
What was your idea regarding tab groups?
Detect all tabs that got closed on the exact same time?
…On Thu, Jun 17, 2021 at 2:27 AM Łukasz A.J. Wrona ***@***.***> wrote:
I did more digging. Looks like I need to update to the new Chrome API
(Manifest V3) to even access these things. I tried doing that, but Chrome
forgot to implement favicons - they're supposed to be obtained in a
different way
<https://developer.chrome.com/docs/extensions/reference/tabs/#property-Tab-favIconUrl>,
but they just give me empty strings. And that's for closed tabs, I couldn't
find favicon support for history entries
<https://developer.chrome.com/docs/extensions/reference/history/#type-HistoryItem>
.
They really dropped the ball here. I'll see if it's broken on the beta
channel and if it is, file a bug.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABJXQ7TZUR35FVVCKDAPCDTTE6OZANCNFSM46ZBL4KA>
.
|
Initially, yes, as a quick hack. But this causes problems (when closing all tabs to the right, or all other tabs). It could work, but tab's groupId is set to 0 (without the tab group API enabled). There's a new API dedicated to handling "on tabgroup deleted"/updated/etc. events (and presumably populates that groupId field), which I wanted to hook into, but it's a new API that requires an upgrade to Manifest V3. |
I see. Thanks for digging into this!
…On Thu, Jun 17, 2021 at 9:17 AM Łukasz A.J. Wrona ***@***.***> wrote:
Initially, yes, as a quick hack. But this causes problems (when closing
all tabs to the right, or all other tabs). It could work, but tab's groupId
is set to 0 (without the tab group API enabled).
There's a new API dedicated
<https://developer.chrome.com/docs/extensions/reference/tabGroups/> to
handling "on tabgroup deleted"/updated/etc. events (and presumably
populates that groupId field), which I wanted to hook into, but it's a new
API that requires an upgrade to Manifest V3.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABJXQ7FSW44J5FVDN7YZWTTTGORLANCNFSM46ZBL4KA>
.
|
Ported to Manifest V3 - Google reenabled favicon API. Sadly, Tabgroup API is (still) limited (and sessions/history API has no notion of tabgroups). I can detect tab groups being closed/created, but tab IDs are not stable, so when you restart the browser, even if I record which tab belongs to which group, I can only identify them by their URLs. Which would be fine most of the time, but I can envision edge cases where it'll break:
So, the behavior would be glitchy. Until now I stuck with relying on native APIs for everything and people have been happy with it. I'd have to think about it more. |
Thanks for your efforts!
…On Wed, 2 Nov 2022, 02:40 Łukasz Wrona, ***@***.***> wrote:
Ported to Manifest V3 - Google reenabled favicon API.
Sadly, Tabgroup API is (still) limited (and sessions/history API has no
notion of tabgroups). I can detect tab groups being closed/created, but tab
IDs are not stable, so when you restart the browser, even if I record which
tab belongs to which group, I can only identify them by their URLs. Which
would be fine most of the time, but I can envision edge cases where it'll
break:
- I can still restore only one tab at a time
- restoring large (25+) tab groups might not work (because there's an
upper limit on how many closed tabs you can fetch)
- tabs with the same URL as the one in the closed group might be
reopened accidentally/break closed tab group continuity
- can't detect that a tab group was reopened (if it was reopened
outside of the extension)
So, the behavior would be glitchy. Until now I stuck with relying on
native APIs for everything and people have been happy with it. I'd have to
think about it more.
—
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABJXQYENC4277HBKPGEM3DWGHBBXANCNFSM46ZBL4KA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hey @LAJW !
This is a beautiful extension.
Would it be possible to support Chrome's new tab groups to offer a new sub-menu called "Recently Closed Tab Groups"?
The text was updated successfully, but these errors were encountered: