firefox-csshacks icon indicating copy to clipboard operation
firefox-csshacks copied to clipboard

Add option to toggle between autohiding and sitckied sidebar

Open matru opened this issue 1 year ago • 5 comments
trafficstars

I am refering about modification to chrome/autohide_sidebar.css.As a TST user for vertical tabs, it would be great to have the option to toggle between the two states, but I am not sure if there's anything to mimick the toggle through css only?

matru avatar Aug 09 '24 01:08 matru

You can't really do state toggles with CSS, but you can sort of achieve this if you use existing states. If you add this bit:

#sidebar-box[hidden]{
  display: flex;
  --uc-sidebar-width: var(--uc-sidebar-hover-width);
}

So now, when sidebar is supposed to be hidden, it's actually shown as "stickied" - and apparently works at least on first glance. The just move the sidebars-button into the toolbar it's found in toolbar customization palette if it's not in your toolbar already.

The downside is that then you can't have the sidebar to be hidden, and that if sidebar shows as stickied, then activating another sidebar with hotkey such as Ctrl+B will change sidebar to autohide-mode as well.

MrOtherGuy avatar Aug 09 '24 02:08 MrOtherGuy

This is perfect, I don't need the sidebar to be completely hidden. The only issue I see is that sometimes TST/other addons bug out, and I noticed (maybe subjectively) that if I completely disable and enable sidebars, the issues vanish.

Thank you!

matru avatar Aug 09 '24 15:08 matru

One thing that I noticed is that when opening a private tab, it opens non-sliding and blank, not even showing the current tabs. It easily fixes itself if I trigger the sidebar (shift-b).

matru avatar Aug 09 '24 17:08 matru

@MrOtherGuy Also, is there a way to get right click to work on the toggled tab? I am using Tree Style Tabs, so that would be very useful.

matru avatar Oct 12 '24 13:10 matru

I don't think that's possible - presumably because Firefox is going to think that sidebar is currently disabled - it's sort of weird that other functionality is working at all.

MrOtherGuy avatar Oct 12 '24 13:10 MrOtherGuy