gomita / visualtabs

Visualizes tabs as thumbnails in sidebar.
Other
14 stars 3 forks source link

[Feature Request] Reverse new tab order #6

Closed fabioromeo closed 4 years ago

fabioromeo commented 4 years ago

To make tabs more manegeable, it would be interesting to have an option for new tabs be added at the top instead of the bottom. This way new tabs are always in the field of view, and older tabs are tucked away but readly avaliable.

gomita commented 4 years ago

Thanks for your request. It's easy to implement but there is a problem. If you have pinned tabs, the order of tabs is like: [+ new tab] [pinned tab 1] [pinned tab 2] [pinned tab 3] ---------------<the position where the new tab is opened [normal tab1] [normal tab2] [normal tab3]

fabioromeo commented 4 years ago

Hi, do you use CSS to style the bar? Maybe it could be done with "order" command: .tab.pinned {order: 1;} .tab {order:2;} I've seen some add-ons use something like that, like this one: https://framagit.org/ariasuni/tabcenter-reborn/-/wikis/home

fabioromeo commented 4 years ago

I kinda managed to get I wanted with an ugly hack: the new tabs and the new tab button shows on top. The issue now is to put the pinned tabs at the top, and below the + button. I also have no idea how to make this an option...

#container {
    display: flex;
    flex-direction: column-reverse;
    max-height: 100vh;
}

#tabList {
    overflow-x: hidden;
    overflow-y: auto;
    flex-direction: column-reverse;
    -moz-transform: scale(1, -1);
    -webkit-transform: scale(1, -1);
    -o-transform: scale(1, -1);
    -ms-transform: scale(1, -1);
    transform: scale(1, -1);
}
.tab {
    position: relative;
    border-bottom: 1px solid var(--separator-color);
    padding: 2px;
    -moz-transform: scale(1, -1);
    -webkit-transform: scale(1, -1);
    -o-transform: scale(1, -1);
    -ms-transform: scale(1, -1);
    transform: scale(1, -1);
}

.tab[pinned] .title .thumbnail {
display:none;
}

.tab[pinned]  {
  width: 33px;
  margin: 0 auto;
  float:left;
  order: 0;
}

.tab {
    float:left;
    width: 100%;
}
gomita commented 4 years ago

Try out new version 0.20b2. https://addons.mozilla.org/firefox/addon/visualtab/versions/

fabioromeo commented 4 years ago

This works beautifully, thanks a million!

gomita commented 4 years ago

Ver.0.20b3 has been released. I added 'Close tabs to top' menu.

fabioromeo commented 4 years ago

I just notice that, while the new tabs from the "+" buttons does appears at the top, if I use the keyboard shortcut CTRL+T the new tab shows at the bottom of the list.

gomita commented 4 years ago

Ver.0.20 has been released. Now new tabs are moved at the top, not only when you open via CTRL+T, but also via Bookmarks, History, Home button.

fabioromeo commented 4 years ago

This last version solved everything I needed. Thank you very much!