multi-account-containers icon indicating copy to clipboard operation
multi-account-containers copied to clipboard

Undo "Sort Tabs"

Open theres-waldo opened this issue 7 years ago • 18 comments

I have a Firefox window with a lot of tabs (~70), and I had them neatly arranged into a hierarchy using Tree Style Tabs.

I accidentally pressed the "Sort Tabs" button in the popup dialog that comes up when pressing the Multi-Account Container extension's toolbar button, and now tab tree has been completely messed up.

It would be nice to have a way to undo this operation.

theres-waldo avatar Nov 14 '18 22:11 theres-waldo

I just got the same thing. Now focus in tree style tab keep jumping everywhere because the order shown by tree style tab is completely different than the one in the background I guess. Painful with my nearly 900 tabs opened.

Disabling and re-enabling tree style tab might work, but then i'll probably lose the tabs hierarchy.

Edit: even with restarting the browser in-between, disabling / re-enabling tree style tab did not work, I guess I will need to uninstall / re-install to clear the configuration and data.

Edit 2: it seems going to tree style tabs options in the advanced section and unchecking the rechecking the “Optimize tree restoration with cache” option did the job, you should try it @theres-waldo

I don't know if Firefox APIs would let the containers extension send an event to tree style tabs to tell it it should reload the tree without the cache or something.

sgautrin avatar Nov 29 '18 19:11 sgautrin

I've also made this same mistake (also with tree-style-tabs and containers) and my mitigation now is to just never push that button. That said, an "undo" option if I hit it by mistake would be a life-saver

The ability to disable the "Sort Tabs" button in some configuration file or menu would help me out. (This feels like an advanced option that general users do not need). Should I open that as a separate issue?

booniepepper avatar Dec 21 '18 20:12 booniepepper

This can be solved in a pretty simple way: just add one are-you-sure prompt with Yes/No before sort tabs run.

This won't require any heavy development like undo or new configuration options and save from occidental clicks (yes, I've done that with my ~100 tabs, too 😁 )

valeryplotnik avatar Jan 04 '20 14:01 valeryplotnik

… add one are-you-sure prompt …

With respect: let's not add such things.

Instead, place the feature in an area where accidents will be less likely.

Maybe adjacent to, or after, Manage Containers.

grahamperrin avatar Apr 29 '21 02:04 grahamperrin

Just had this exact same thing happen, and of course the first thing I find is an open issue about it that's been around for 4 years...

Is there even any ongoing development of this feature at all?

TheBrain0110 avatar May 05 '22 18:05 TheBrain0110

please add "disable" or "hide" option to this sort tabs button. I have 100+ tabs and this button got clicked accidentally many times. :tired_face: if you can provide a hack that's also a great help. :weary:

oshanz avatar May 22 '22 15:05 oshanz

This just happened to me... all my tabs... all gone :sob: Please add an option to hide the button. If you point me at the right files I'll even submit a PR myself!

Edit: for anyone who needs to open the containers extension menu a bunch to open existing tabs in containers, the extension "Easy Container Shortcuts" allows you to bind this to keybinds 👍

zyansheep avatar Dec 16 '24 20:12 zyansheep

This just happened to me... all my tabs... all gone 😭 Please add an option to hide the button. If you point me at the right files I'll even submit a PR myself!

Hiding option isn't a great solution for discoverability. A better solution could be to have a confirmation dialog. Something like:

Confirm sorting tabs
[yes] [no]

[ ] Do not show this message next time

dannycolin avatar Dec 16 '24 22:12 dannycolin

It might be better if the confirmation only shows up if the user has more than a certain no of open tabs so it won't be inconvenient for everyone

Parvchannel avatar Jan 08 '25 11:01 Parvchannel

Could I work on it ?

Parvchannel avatar Jan 08 '25 11:01 Parvchannel

@Parvchannel Any reason why you closed #2714?

I've heard a number of reports from users who had their tab strip "messed up." There's even a recent bug filed for Firefox that seems to be the result of a user accidentally pressing the Ctrl + Comma keyboard shortcut for this add-on's "sort tabs" feature. https://bugzilla.mozilla.org/show_bug.cgi?id=1956278

I think a confirmation dialog is a measured mitigation for this issue. It looks like #2714 does not account for the case of requesting tab sort via keyboard shortcut. I'd like to understand if intercepting the keyboard shortcut at https://github.com/mozilla/multi-account-containers/blob/a60f5bb1be87e636241f22600902c9a70cee786a/src/js/background/backgroundLogic.js#L19 requires a different approach than the content script method in #2714.

apostrophest avatar Apr 09 '25 15:04 apostrophest

Implementation tip: The prompt could be implemented in the browser_action popup panel, and launched by calling browser.browserAction.openPopup() from the commands.onCommand event handler. That would not require a content script. The browserAction.openPopup() method currently requires a user gesture in Firefox, so the openPopup() method should be called synchronously from the commands.onCommand handler.

Rob--W avatar Apr 09 '25 18:04 Rob--W

This has happened to me several times, and this is badly breaking things with Tab Groups. So IMHO either:

  • Implement the ability to disable the shortcut
  • Implement a confirmation dialog

lissyx avatar Apr 10 '25 09:04 lissyx

This has happened to me several times, and this is badly breaking things with Tab Groups. So IMHO either:

  • Implement the ability to disable the shortcut

Firefox has built-in UI that enables you to customize/clear the shortcut for any extension: https://support.mozilla.org/en-US/kb/manage-extension-shortcuts-firefox

Rob--W avatar Apr 10 '25 09:04 Rob--W

This has happened to me several times, and this is badly breaking things with Tab Groups. So IMHO either:

  • Implement the ability to disable the shortcut

Firefox has built-in UI that enables you to customize/clear the shortcut for any extension: https://support.mozilla.org/en-US/kb/manage-extension-shortcuts-firefox

I did not, however that's still something hard to discover and that people will maybe find after they badly broke their Tab Groups like me. Assuming one does not know how to recover previous sessionstore state, it ends up in people loosing valuable data.

lissyx avatar Apr 10 '25 09:04 lissyx

This was turning me mad for months! Finally found a solution from https://www.reddit.com/r/firefox/comments/1kaig3m/pressing_ctrl_just_randomly_rearranges_my_tab/. Definitely needs a rethinking if this should be a keyboard shortcut. It can be a dropdown menu item. Also what does sorting mean here?

xolve avatar Apr 29 '25 08:04 xolve

We are going to remove the default shortcut on update to the next version in https://github.com/mozilla/multi-account-containers/pull/2758.

Rob--W avatar Apr 29 '25 14:04 Rob--W

Just happened to me as well with like 300 tabs open. You have no idea how much I hate not only that this useless option exists, but that it does not even asks you to confirm if you indeed want that, which imo should be treated as potentially destructive as closing all opened tabs.

VL4DST3R avatar Sep 20 '25 12:09 VL4DST3R