Tree Tabs
-
@stvad So I've tried Export-Reset-Import.
Results are:
I've lost groups but not the tree structure and this time - for a different window. (which is an improvement on loosing both tree structure and groups, but )UPD: And after the restart, I still lost groups and tree structure on the window where I was losing them previously
UPD2: I've done another import on top of that - that restored the structure and groups and it seems to be holding after restart (hope this persists :)).
-
@stvad For some reason I don't receive notifications And I didn't see your response. I have to check my profile.
Anyway, good. Keep me updated on this -
Having an extension button create a popup that shows current sidebar frame (with all groups/tabs from all windows to work around the fact that the 'active' window does not have other tabs?) does not seem like a big price for entry imho (I may be biased though as I'm doing feature request instead of pull request here)
Not mentioning other browser policy is unfortunate. It will reduce discoverability, but I think on average it'll increase UX for Vivaldi users considerably.When I have time I may think of some way to publish it to Chrome store. But I will have even more testing and maintenance for compatibility.
It's such a shame Vivaldi does not have its own extensions pageRe same content - I see, that is unfortunate. But why in this case when I reload the content of the panel it does not help and only the re-adding the panel helps (And is there a less cumbersome way to do re-initialization then re-adding the panel)?
Reload by using reload button on the web panel toolbar usually does the job... So I'm not sure what's up
If you just turn off and back on the web panel it does not reload tree tabs. Which actually is really cool, since tree tabs shows up instantly. -
@kroppy seems it gets corrupted sometime during usage or something - next restart (after running and using the browser for some time) lead to the situation as before again - loss of tree and groups in one window and loss of groups in another window
-
When I have time I may think of some way to publish it to Chrome store. But I will have even more testing and maintenance for compatibility.
Thank you!
Reload by using reload button on the web panel toolbar usually does the job... So I'm not sure what's up
If you just turn off and back on the web panel it does not reload tree tabs. Which actually is really cool, since tree tabs shows up instantly.Ah, I didn' t interpret the 'home' button as reload. When I meant reload - I did 'Show desktop/mobile version' which is actually works fine it turns out if I do it for both windows.
In this case, may I suggest a hack of doing self-reload on (or a few moments after) browser startup? -
In this case, may I suggest a hack of doing self-reload on (or a few moments after) browser startup?
Sorry I didn't explain it better, issue is a bit more complex than simply reloading.
When I call chrome.windows.getCurrent or chrome.tabs.query({currentWindow: true}) for tabs, Vivaldi always returns activeWindow, so even if I reload all sidebars, all sidebars in non-active windows, will always get window (and tabs) from the active window.
No matter how many times i reload it from the sidebar, result will be the same.
Only when user manually reloads the sidebar (panel), in active window it will get correct tabs, simply because this window is automatically active.
I will have to do something else.
Anyway I found my conversation for exactly this issue in Opera, it got fixed 3 years ago And like I said, it must be in chrome itself.
https://forums.opera.com/topic/11488/sidebar-windowid/11EDIT:
I reported a bug to Vivaldi (VB-39922). So maybe they will take a look. Firefox does it right and also Opera, so why not Vivaldi? Why should we suffer because of this issue right?EDIT2:
Ok, I added a little check, on mouse press on empty space anywhere close to tabs. This way I know for 100% that this window is active and I can check if previously taken window is correct. If not, panel will auto reload. A little clunky, but this way you will have correct tabs, without the need to do it manually. Just click below tabs or on panel's scrollbar.
I will upload update soon. -
@stvad There must be something going on there... Maybe some tab with particular url from Firefox. But I can't tell what it could be. Also after I changed storage method there is no way to check, if it gets truncated or something. When I was using regular local storage It was possible to check all variables from extensions page->inspect background->in dev window->Application->Local Storage.
But permanent storage does not allow to take a look there. I can make something to "print out tabs ids and hashes" so you can run it and and tell me the results afterwards... Also you can turn on debug in options and restart vivaldi, after that you can go to extensions page and click on inspect background and tell me what console says there... -
@kroppy Ah I see. Is there a way to get tabs for all windows i.e {'windowId': [tab_list]} map and maybe then query current window id and pick only relevant tabs from that map (unless querying current window id have the same bug)?
Thanks for introducing a hack (would it work if I try to click on the tab and not nearby?)
-
@kroppy It's embarrassing but I didn't figure out a way to do the raw copy of the console output . Best I found is using copy function to copy any particular object to the clipboard, but there is a ton of them...
I'd go with the custom print script (or advice if you know how to do the raw dump of the console log) -
@stvad That's ok, I packed Nightly today, so can you check this one out?
https://drive.google.com/open?id=1jf-8QtsaFlVjvFFBaU3PYcN8C6R7VcJG -
Ah I see. Is there a way to get tabs for all windows i.e {'windowId': [tab_list]} map and maybe then query current window id and pick only relevant tabs from that map (unless querying current window id have the same bug)?
This is what chrome.tabs.query({currentWindow: true}) is for. And this is where the bug is
Even with just tabs query where I get all tabs, I have no way to get current window, until this window becomes active. Because any command to get current window returns, active, not current. I don't know how to explain this better... -
@kroppy I understand the issue. The previous suggestion was more of an attempt to distinguish between the situation 'chrome.tabs.query({currentWindow: true})' has a bug (in which case it would've been possible to work around by using other methods) vs all methods to get current window id have a bug.
-
@kroppy Thanks, I'll give it a try.
-
@stvad This version seems to be working alright so far :). Thank you!
-
@kroppy As we are talking here I have a few notes on/requests for groups:
-
A minimal request is for an active group to switch if you've switched the tab (i.e. with Cmd+Tab/Cmd1..8) and the new tab is in an inactive group, as the current situation is rather confusing.
-
Not sure how feasible is this one, as it'd likely require an override of standard shortcuts, but it'd be great if groups felt more like 'windows' w.r.t. tab switching (Cmd+1..8; Cmd+9; Cmd+PgUp/PgDown). What I mean by this is that if I'm withing some tab group and I press Cmd +1 (go to the first tab) I expect to end up with the first tab in the group active, but I end up on the first tab of the window, which can be invisible (due to 1) and so the overall experience is rather confusing (and I do it all the time ). The same goes for Cmd+9 (go to the last tab) and others.
Thanks!
-
-
@kroppy just experienced the same issue again :(. It may sound funny but I notice a correlation with 'proper' browser shutdown. I.e. previous 2 times when I happen to restart the browser were because it has crashed and in those cases, the TreeTabs have preserved its state just fine. But I just did proper browser shutdown and start - and got the recurrence of the problem as a result
-
- Oh gosh indeed, I have it fixed now. It will activate group on switch.
- Unfortunately reserved browser keys cannot be replaced Even by user. I think I discussed it here, if not here, maybe on GitLab. Also commented many times on Firefox addons page...
Ctrl or Cmd + number are blocked by all browsers. Also Ctrl+Tab, Ctrl+Shift+Tab. There are many others too.
-
rt the browser were because it has crashed and in those cases, the TreeTabs have preserved its state just fine. But I just did proper browser shutdown and start - and got the recurrence of the problem as a result
Whoooaaa this is weird!.... Can you do a tiny test? Can you exit Vivaldi from menu File->Exit? And start again to see if problem persists?
-
@kroppy did a proper shutdown (File -> exit) and got the issue reproduced again (though this time I didn't lose the groups, but all tabs ended up in 'ungrouped' and the tree structure was lost).
-
@stvad What worries me is that, if groups are there and tabs land in ungrouped, could mean that my extension can't recognize tabs for some reason. If groups are restored it means that "windows" array is properly saved, but not "tabs" array... Do you have any other extension running beside TreeTabs?