piroor / treestyletab

Tree Style Tab, Show tabs like a tree.
http://piro.sakura.ne.jp/xul/treestyletab/
Other
3.46k stars 276 forks source link

[Bug] "Grouping tabs with spaces" snippet crops tab list #3592

Open TheFou opened 1 month ago

TheFou commented 1 month ago

I was trying some CSS to customize appearance. However, this code snippet induces a bug where the tabs list in TST is cropped at the end. The more space I use, the more tabs are cropped in TST. I tried messing with other parameters, and even removing everything in the CSS except from this snippet, and I got the same issue as soon as I enable this snippet. I tried closing / re-opening the sidebar, and even quitting / relaunching Firefox after applying, still the same. I have around 2000 tabs, in many groups via "Simple Groups" extension. The group I was testing on has ~270 opened tabs. I should mention, all tabs appear correctly in the real tab bar at the top.

Here are some screenshots, with exactly the same tabs opened. The second one with spaces uses margin-top: calc(var(--tab-size) / 5); so that you can see what's missing relative to the "normal" one.

image

image

Thanks for your help. Regards.

piroor commented 1 month ago

Hmm... sadly the CSS hack is unfriendly to the virtual scrolling architecture of TST 4.0 and later. TST 4.0's virtual scrolling assumes that all tabs have same height and zero vertical margins (except negative margin for collapsed tabs), so virtually scrolled tabs are cut off for margins added by your user stylesheets - it is unavoidable. We may need to implement something new API to register extra margins for tabs and implement a new helper addon which uses the API, instead of the CSS hack.

piroor commented 1 month ago

I'm afraid that such a new API may make virtual scrolling calculations more slow. Does anyone have something solution idea?

TheFou commented 1 month ago

Thanks for considering the issue. I can't help unfortunately, I'm a simple user... Hope you'll figure something out. Regards.