At the moment there is only the snackbar immediately after closing a tab, but if you accidentally dismiss it or take too long to decide that you didn't actually want to close the tab, there's no way to restore it afterwards.
A new section for the library?
I can view the last few (10/15/...?) tabs I've closed and restore them. Restoring a tab should restore its state as completely as possibly (i.e. similar to session restoring) and remove the respective tab from the list of recently closed tabs.
"reopen closed tab" might be a way to do this in the home "open tabs" menu.
Samsung Internet does this: https://github.com/mozilla-mobile/fenix/issues/1694#issuecomment-488438466
There is already a History section in the Library doesn't this work about the same way?
@yoasif How does that work - is that actually a list of tabs, or just a menu item that is basically the equivalent of pressing Ctrl + Shift + T, i.e. it simply restores the most recently closed tab. For that use case, we already sort of have the snack bar, and beyond that I'd prefer also being able to chose which tab to restore.
@ekager No, history only shows the individual pages I've been visiting, but has nothing about tabs.
@buttercookie42 In my brief testing, it reopens the last tab, but the menu item remains, so the user can reopen the next recently opened tab until Samsung Internet doesn't know about previously closed tabs.
There is no option to pick from a list of recently closed tabs - so it is very much like control-shift-t
FWIW, Fennec has "recently closed" tabs inside of history, which feels closer to what you want @buttercookie42.
This feature restores tabs, not pages (unlike history in Fenix).
Exactly, that's the angle I'm coming from.
A new section for the library?
Although thinking some more about it, the library in Fenix is currently a bit more cumbersome to reach than in Fennec, where entering the URL bar's edit mode was enough to load the home panels.
Vivaldi has a pretty nice way of doing this.
They integrate a trash tab in their tab switcher, very much like the "open tabs vs. private tabs" tab switcher in Fennec. The recently closed tabs is a very basic list of tabs (basic Chromium), but it gets the job done in a way that is not currently possible in Fenix.
Bromite makes it a top level menu in their meatball menu, and Opera hides it behind a meatball menu inside of their tab switcher.
I think that the Vivaldi way is actually better than the Fennec way, since history isn't close to the tab switcher, and requires more work to get to.
Vivaldi's tab switcher - normal, private, synced? and recently closed.
Fennec's tab switcher: normal and private:
Now I'm using Fenix Nightly as a daily driver I find the absence of the ability to reopen recently closed tabs feature quite frustrating, especially as this already exists in Fennec.
@yoasif @madb1lly @buttercookie42 thanks for the great suggestions!
Can you help me think through common use cases of this? What are the different scenarios where you would need to go back and open your recently closed tabs? Is it just in case of accidentally closing a tab (as stated in the issue description above) or are there other use cases? Is it ever about wanting to keep your homescreen clean without having to actively save your tabs as a collection?
@vesta0 I think that there is possibly an interesting way that this feature would interact with https://github.com/mozilla-mobile/fenix/issues/5865.
Right now, Fenix users must "Quit" the app in order to close open tabs.
If there was an easy way to restore their tabs after they were closed (if https://github.com/mozilla-mobile/fenix/issues/5865 were to be implemented) the risk of real data loss could be mitigated.
Just one additional idea, but I think that the accidentally closed tab is valuable enough to implement alone - every other browser that I can think of (besides Focus) has this feature, and history is clearly not the same thing as tab restoration.
As far as how it relates to collections - I think https://github.com/mozilla-mobile/fenix/issues/5652 continues to be relevant, and there isn't really much overlap between collections and reopening closed tabs - for example, I don't think closed tabs ought to "belong" to collections - because then I would have to reopen a collection to get access to a closed tab.
The same would apply to history as well, FWIW -- it would be strange (imo) if opening a new collection modified my history such that history was a property of the collection, and that each collection had its own history and set of closed tabs.
I haven't used collections actively in a while (due to https://github.com/mozilla-mobile/fenix/issues/5652) and more specifically because my tab list would end up being twice as large each time I opened a collection, but IIRC, collections do save "tabs" (and not links/bookmarks), so for less ephemeral tab storage, they certainly fit the bill, but this bug really seems to be more about the "forgotten" or accidental use cases, not of a user actively "saving" a tab to a recently closed tabs list.
I know that on desktop at least, there is a limit to the amount of windows or tabs that can be restored - I have heard that this may actually be unlimited in some way in Chrome, but I haven't done the testing to verify that - in any case, I personally wouldn't use my browser for a few weeks and try to "reopen" a tab from a few weeks ago from this feature - I would definitely have preferred to save that in a collection.
For me it's definitively about either having accidentally closed a tab but having missed the opportunity to use the immediate undo popup, or about tabs that I've deliberately closed because I thought I didn't need them any more, but then soon afterwards it turns out that there actually was something in that tab that I still require.
Especially the latter case is also the reason I'd prefer a list of closed tabs, because it isn't always the last tab I closed that I want to reopen, so I'd rather be able to restore the correct tab immediately instead of having to reopen them all one by one until hitting the correct one (though on Desktop with a keyboard the Ctrl + Shift + T shortcut is still handy regardless).
Hi @vesta0,
I'm not sure I made any suggestions, but thanks!
My use cases are the same as @buttercookie42 describes. I don't recall ever wanting to open a recently closed tab from a previous session, only the current session.
Cheers ๐
This has accessibility implications. I often end up accidentally closing tabs due to problems with my fine motor skills (sometimes multiple tabs). For the same reason I find it hard to use the popup. In Fennec this was by far the most used section of history for me.
can the b:a11y label be added accordingly
What we need is Undo closed tab in Tabs context menu. same as on desktop. And that will act same way as on desktop. So as Duplicate tabs and Close all other tabs. This menu has just 3 points, so there is plenty room for new items.
Please file new issues for new feature requests with the info filled out!
Hello @ekager,
Just to clarify, the OP does appear to have followed the template, so are you replying directly to @regs01?
Thanks ๐
@regs01 that is a good suggestion and it would be very helpful. I think it's worth raising as a separate feature request, unless someone else has already done that.
Cheers ๐
QA please test: Behavior is to save the last closed 5 tabs in the recently closed tab menu with the back state ready to be restored. On restoration they are removed from the recently closed list. Clearing history will remove these tabs as well. When a 6th tab is removed, the oldest tab will be deleted.
@topotropic let me know if you're happy with 5 saved or want more I couldn't find the discussions we had about it anymore ๐ค
Known issue: When a user presses the undo snackbar after deletion, the tab will still appear in recently closed (this needs the Undo function to be moved into AC which will happen at a later date)
personally a feature i find myself wishing for on chromium based browsers (as I had used them mainly for a long time), is for the last 5 tabs to show and for all tabs closed within the last x minutes to show. x could be 10 minutes. :)
Closed private tabs are currently added to the list as well, they should probably be excluded.
Desktop has recently closed private tabs for the duration of the current private browsing session for what it's worth, as did Fennec (i.e. closing the last open private clears recently closed private tabs). They should certainly be kept separately, though.
Yep that was a bug. We're filtering out private tabs when you "close all" tabs, but not singularly. Filed https://github.com/mozilla-mobile/android-components/issues/8390 and will be fixed by https://github.com/mozilla-mobile/android-components/pull/8391
Verified as fixed on Nightly 9/17 and 9/16. Scenarios covered:
I will close this as verified and we will follow separately the known/new issues.
does that mean that I should make a new issue about my comment above? @sflorean
Hi @ekager,
I'm just noting here (as I only just checked it) that Fennec kept track of the last 10 closed tabs and this list also persists between sessions which could be useful if the phone runs out of battery or something.
Cheers ๐
Most helpful comment
Vivaldi has a pretty nice way of doing this.
They integrate a trash tab in their tab switcher, very much like the "open tabs vs. private tabs" tab switcher in Fennec. The recently closed tabs is a very basic list of tabs (basic Chromium), but it gets the job done in a way that is not currently possible in Fenix.
Bromite makes it a top level menu in their meatball menu, and Opera hides it behind a meatball menu inside of their tab switcher.
I think that the Vivaldi way is actually better than the Fennec way, since history isn't close to the tab switcher, and requires more work to get to.
Vivaldi's tab switcher - normal, private, synced? and recently closed.
Fennec's tab switcher: normal and private: