logseq-plugin-tabs icon indicating copy to clipboard operation
logseq-plugin-tabs copied to clipboard

Multiple rows of tab

Open nhan000 opened this issue 4 years ago • 6 comments

I usually have a pdf file opened and also the right sidebar, which takes up lots of space. If I open more than 5 - 6 tabs then the right most ones will be obscured by the right sidebar. Shift + scroll currently helps me navigate all the opened tabs but I was wondering if instead of expanding to the right, they can be in rows so that they're always visible. That would help me keeping tracks of the tabs I have opened much easier. Thanks so much for the great plugin!

nhan000 avatar Oct 09 '21 21:10 nhan000

Thanks for the suggestions! Technically rendering tabs in multiple rows is not so trivial because the tabs are rendered inside of an iframe. To wrap the tabs, the plugin may need to take multiple factors to make sure the iframe height is calculated correctly. Another issue here is that the white space at the last row will be the tabs iframe, which may prevent the user from interacting with the main view and surprises the user.

pengx17 avatar Oct 11 '21 03:10 pengx17

You mean that if the tabs are rendered in multiple rows it will start obscuring the information in the main view (the title of the page, the path to current block, etc.?). I have no background in programing so I don't know hard it is to do this. I suggest:

  • Having 2 rows (From what I see the main view has space for 2 rows with the current tab title height)
  • Make the tab shorter and title smaller -> fit 3 rows?
  • If you make a border surrounding the iframe then people would know that the empty space is actually occupied by the plugin.
  • I also would like to have the width of the tab fixed, not expanding/collapsing when I click into it.
  • I really want to have multiple tabs open, and I know what tab it is even with only 5-6 characters of the title displayed. The rest can be hidden. Or you can even hide all characters of the pinned tabs, since when you hover the mouse over the tab, its full title is displayed (please add this into the description of the plugin. I didn't know this hovering function until recently). Thanks a lot!

nhan000 avatar Oct 11 '21 09:10 nhan000

I think one option is to follow what Chrome does. Instead of having multiple rows of tabs, just shrink each item when there is not enough space like this: image

pengx17 avatar Oct 12 '21 02:10 pengx17

that works too!

nhan000 avatar Oct 12 '21 09:10 nhan000

I am working with a new lib that I found today "dnd-kit". Some progress so far https://stackblitz.com/edit/vitejs-vite-8penyc

pengx17 avatar May 13 '22 05:05 pengx17

I'd be happy to look into this. Currently there seems to be some strange bug, where opening more than 5-6 tabs causes constant switching between the last two.

sdasda7777 avatar Jan 12 '24 10:01 sdasda7777