Treestyletab: [feature request] Open new tabs at top of the list

Created on 7 May 2018  路  9Comments  路  Source: piroor/treestyletab

Currently, the behavior for new tabs is that they open at the bottom of the list of vertical tabs. Allow an option to open new tabs at the top of the list (but still after the pinned tabs, of course) is useful because your eyes tend to stay at the top. That's where the address bar, bookmark bar, search bar, and window title bar is, and for many people, where the status bar is.

I haven't found a way to get this behavior yet and I'm hoping people will be interested in such a feature.

out of purpose

Most helpful comment

I'm surprised this isn't already an option! Honestly I initially thought the configuration option for where to add tabs in a tree would also apply to new tabs at the root level and not just tabs being nested, I was confused to learn what it really meant.

My $0.02, TST is a massive improvement on web browsing UX, but the biggest (and really only) drawback from a UX perspective is that the web browser is designed with all UI elements at the top of the window but TST has the new tab button and new root tabs at the bottom of the window. Not everyone learns keyboard shortcuts, so for those using the GUI TST introduces a jarring shift in interfacing by having to go up and down the window for common actions. It's really a drag in certain workflows, especially on a HiDPI monitor with a small trackpad!

What makes you think this is out of purpose? Curious given all the knobs and switches you offer in the preferences window.

By the way, TST is a huge productivity gain for me and my partner, and I thank you for that. You've honestly made our lives and jobs easier and more efficient by a non-trivial amount. I'm going to try contributing to bug squashing as well :)

All 9 comments

Hmm, like as #1881, I'm negative to add this feature because it is out of purpose of "Tree" style tabs. However, currently the new tab menu in the TST sidebar is not extendable, and I don't know it is possible or not to develop a separate addon just for the purpose working together with TST.

Anyway, TST provides ability to override actions on the "new tab" button in the sidebar via API, so please try to develop a separate addon for the purpose at first. And if you couldn't make it compatible to TST, please tell me again. I'll add more APIs required to work together with it.

I'm surprised this isn't already an option! Honestly I initially thought the configuration option for where to add tabs in a tree would also apply to new tabs at the root level and not just tabs being nested, I was confused to learn what it really meant.

My $0.02, TST is a massive improvement on web browsing UX, but the biggest (and really only) drawback from a UX perspective is that the web browser is designed with all UI elements at the top of the window but TST has the new tab button and new root tabs at the bottom of the window. Not everyone learns keyboard shortcuts, so for those using the GUI TST introduces a jarring shift in interfacing by having to go up and down the window for common actions. It's really a drag in certain workflows, especially on a HiDPI monitor with a small trackpad!

What makes you think this is out of purpose? Curious given all the knobs and switches you offer in the preferences window.

By the way, TST is a huge productivity gain for me and my partner, and I thank you for that. You've honestly made our lives and jobs easier and more efficient by a non-trivial amount. I'm going to try contributing to bug squashing as well :)

This is the biggest drawback. This is most obvious function users are looking for. If https://addons.mozilla.org/en-US/firefox/addon/tree-tabs/ has this obvious and highly requested functionality I don't see technical reason for Tree Style Tab not to have it.

Another reason why this is useful is that when your list is large enough that it's scrollable, any time you open a new tab the focus on the list will be at the bottom since that's where the new tab is. This is counterintuitive to the workflow that I assume most people have--with regards to web browsing, we tend to process on a "stack" workflow where we deal with most recently created tabs first as opposed to a "queue" workflow where we tackle oldest tabs first.

Firefox can do this natively as of FF61.

browser.tabs.insertAfterCurrent = true:聽Opens all links, bookmarks, history items next to current tab.聽

Firefox can do this natively as of FF61.
browser.tabs.insertAfterCurrent = true: Opens all links, bookmarks, history items next to current tab.

Doesn't work with extension. And treestyletab has setting for it in "New Tab Behavior".

The functionality works as designed. I guess you were asking to have the new tab placed the at the top of the entire tab list. This parameter causes tabs to be entered at the top of the stack "below" the current tab.

Sorry for the confusion.

Anyone tried to create an addon for the purpose "open new tab at leftmost position"? It is easily implemented with codes like following:

/* you'll put this codes into a background script */
const NEWTAB_URL = 'about:newtab'; /* this should be configurable like TST */
const delay = 200; /* msec */
browser.tabs.onCreated.addListener(async newTab => {
  if (newTab.openerTabId /* ignore tabs opened with its parent */ ||
      newTab.url != NEWTAB_URL /* ignore tabs opened with specific URL */)
    return;

  /* wait until TST completely processed the new tab. */
  if (delay > 0)
    await new Promise(resolve => setTimeout(resolve, delay));

  /* get the first unpinned tab in the same window */
  const tabs = await browser.tabs.query({
    windowId: newTab.windowId,
    pinned: false
  });
  /* and move it to the leftmost position */
  if (tabs[0].id != newTab.id)
    browser.tabs.move(newTab.id, { index: tabs[0].index });
});

This is a public domain code snippet.

@piroor I think this can be closed.

Was this page helpful?
0 / 5 - 0 ratings