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

Ability to quickly stash open tabs then open group #544

Open
1 task done
SilverEzhik opened this issue Oct 19, 2024 · 2 comments
Open
1 task done

Ability to quickly stash open tabs then open group #544

SilverEzhik opened this issue Oct 19, 2024 · 2 comments
Labels
i-enhancement New functionality

Comments

@SilverEzhik
Copy link

SilverEzhik commented Oct 19, 2024

Problem Statement

Right now, the most common thing I do with Tab Stash is stash the tabs I currently have open into a new group, then open and delete a different group. This ability lets me use Tab Stash as a sort of "session manager" where I can save and pick up browsing sessions as I go.

However, currently, Tab Stash requires me to first stash my open tabs then restore-and-delete a different tab group as two separate actions, which is not that convenient.

Preferred Solution(s)

It would be nice if it was possible to do this in one click.

That could take the shape of:

  • The ability to hold a modifier key like Alt while clicking "Open all tabs then delete this group"
  • A new button that would perform the two actions
  • An option to make this behavior be the default

Alternative Solution(s)

The closest equivalent to this I can think of is Arc Browser's Spaces feature: https://resources.arc.net/hc/en-us/articles/19228064149143-Spaces-Distinct-Browsing-Areas

The Sidebery extension seems to implement tab groups similar to Arc, though apparently without the ability to hide the tabs in different groups: https://addons.mozilla.org/en-US/firefox/addon/sidebery/

Additional Context

Here's a small patch that adds the ability to hold Alt when clicking "Open all tabs and delete this group" to make it stash all open tabs first.

diff --git a/src/stash-list/folder.vue b/src/stash-list/folder.vue
index 91c3d76..9b8c817 100644
--- a/src/stash-list/folder.vue
+++ b/src/stash-list/folder.vue
@@ -63,7 +63,7 @@
           (folder.$stats.folderCount === 0
             ? `Open all tabs and delete this group`
             : `Open all tabs and remove them from this group`) +
-          ` (hold ${bgKey} to open in background)`
+          ` (hold ${bgKey} to open in background, hold ${altKey} to stash open tabs)`
         "
         @click.prevent.stop="restoreAndRemove"
       />
@@ -630,6 +630,16 @@ export default defineComponent({
       this.attempt(async () => {
         const bg = bgKeyPressed(ev);
 
+        if (ev.altKey) {
+          const win = the.model.tabs.targetWindow.value;
+          if (win) {
+            await the.model.putItemsInFolder({
+              items: the.model.stashableTabsInWindow(win),
+              toFolder: await the.model.bookmarks.createStashFolder(),
+            });
+          }
+        }
+
         await the.model.restoreTabs(this.leafChildren, {
           background: bg,
           beforeClosing: () =>

This seems to work nice for me with my setup (stashed tabs are closed immediately).

Vote for This Issue

  • Readers: If you are also interested in seeing this feature be developed, please vote for it by giving the ORIGINAL POST a thumbs-up using the 😃 button below. You are welcome to leave comments and discuss the feature request, but "Me too!" comments are not counted by the voting system.
@SilverEzhik SilverEzhik added the i-enhancement New functionality label Oct 19, 2024
@josh-berry
Copy link
Owner

Hi, thanks for the feature request and the patch illustrating what you'd like to see. This is different enough from the regular behavior that I'm thinking it might be deserving of its own button, but I will definitely keep it in mind!

@SilverEzhik
Copy link
Author

A separate button would definitely be nicer to have. That's actually what I prototyped first, but that made for a rather cluttered set of buttons. If there was a way to customize which buttons we want to be visible (#310), that would definitely be preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i-enhancement New functionality
Projects
None yet
Development

No branches or pull requests

2 participants