-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent sidebar content layout from getting squished #380
base: master
Are you sure you want to change the base?
Conversation
The fact that layout is affected is actually pretty useful for for example sideabar tabs. It allows the extension content to "know" about how wide its viewport is and thus change its internal layout accordingly. But I wonder if there is some specific use case where that would not be wanted? |
Yeah I actually use Sideberry for sidebar tabs, and the narrow layout means the pinned tabs push the unpinned tabs out of the viewport since they are limited to a single column. 40px isn't enough to display tab titles anyway so there is no advantage in my use case. |
My setup looks like this. It's set to 63 pixels wide to leave room for the tab group headers on the left. In the collapsed state I'm fine with only seeing the icons of unpinned tabs. Only problem is that you only see the leftmost column of pinned tabs, but personally I don't need to see pinned tabs in the collapsed state at all. |
Okay, I see the issue but I don't think that should be dealt on autohide_sidebar.css side. Instead, you should change the layout of sidebery so that it doesn't try to wrap pinned tabs into single column when its viewport gets very narrow. I believe you could do that from sidebery, style editor like this: #root:is([data-pinned-tabs-position="top"],[data-pinned-tabs-position="panel"]) .PinnedTabsBar,
.NavigationBar .main-items{
min-width: 210px
} But I can't really be sure if it works just like that for you, because apparently Sidebery has a whole load of different layout options and I don't know what specific ones you are using. |
So no interest in a separate patch either? |
Right, sorry I meant to say that it might be a useful addition and I would accept it if you make it so that it's opt-in feature behind some pref like maybe Since this only requires few additional rules you can add them inside media query like so: @media (-moz-bool-pref: "userchrome.autohide-sidebar.clip-overflow"){
/* insert new rules here */
} |
I've been thinking about this and it is pretty straightforward except for one thing; when sidebar is positioned at right then clipping overflow requires one of two things. Either:
I think that option 2 feels better, but styling that has to work a bit differently. Essentially in non-hovered state the overflow should be clipped outside of window and then apply some transform to the sidebar-box to move it over web-content. The transform should be able to be computed from the two variables we are already using and it can actually animated as well. |
Btw is it completely impossible to consistently keep the sidebar open during drag and drop? If I use d&d within Sideberry, it doesn't count as hover, and there doesn't seem to be any class or pseudoclass in the browser html which indicates that I'm still interacting with the sidebar. |
Sadly yes, on Linux anyway. I filed bug 1818517 about this a while back. It doesn't concern only sidebar, but all hover vs. d&d interactions. |
I feel like the width of the sidebar content should stay the same even when hidden, to prevent the content layout from changing every time you hover/unhover. But maybe there are reasons to want that behavior I can't think of right now, and this should be a patch instead?