Repository navigation
Make the search sidebar stick to the top - #3968
thatbudakguy wants to merge 1 commit into
Conversation
Screen.Recording.2026-11-23.at.10.26.29.mov |
|
What happens if the sidebar is too long to fit on screen? I've had really annoying behavior on a lot of sites that try to stick sidebar in that cases. |
|
@sandbergja - I remember that the sticky elements were an issue for a few different accessibility tools, am I remembering right? Was there a good way to mitigate it? I do like the idea of avoiding super long scrolls. |
This lets you interact with the facets more easily when you have a long page of results. Has no effect on smaller screens or when the facets are put away. When the facet sidebar has enough facets expanded that it's taller than the page, it becomes scrollable on its own. This doesn't affect the search result scrolling.
656cf48 to
b0dd1cd
Compare
|
When the facet sidebar gets too long, it becomes independently scrollable. Here's a video: Screen.Recording.2026-11-23.at.11.30.34.mov |
|
Not sure what you mean – in that picture the total height of the sidebar is taller than the viewport, which is why it's scrollable. The bottom of the sidebar's scrollable area is just above the bottom of the viewport. If the sidebar was allowed to take the full viewport height without scrolling, it would be too tall: it would extend past the bottom of the viewport, because the header pushes it down about 120px already, so it would extend 120px past the bottom of the viewport. |
|
Hm, I sor tof see wha tyou mean... I am getting very confused, maybe just demonstrating how I find find this sort of thing confusing -- when sidebar is higher than viewport. It is not confusing when sidebar is not. But... what determines the actual scrollable height of the sidebar then? At what point does it scroll? it's locked ot the top of screen, and scrolling, but it's bottom is NOT at bottom of screen... what determines where it's bottom is then? If the sidebar is not as tall as viewport, it isn't an issue, it's always as tall as it actually is, and alwyas entirely on screen, which is the point of this PR right? But when the sidebar is taller than viewport... are you saying it can then be scrolled to be only partially in the viewport itself, but then also independently scrollable itself? This is very confusing to talk about, which is why I tried to draw a picture, but that was maybe confusing too. Or maybe I'm just confused. At any rate, I think I find this UI confusing? (in cases where sidebar is taller than viewport; when not, I find it straightforward and nice). |
|
I think running the PR locally (and perhaps looking at the changed CSS) might give you the clarity you need here. It's hard to talk about! |
|
I want to start by thanking you for spending time on default Blacklight look and feel! I think it hasn't been a focus for awhile, and having it be nicer out of the box is always nice. That being said, I think I might be with @jrochkind on this one - I'm not sure this is a generally desired change, so perhaps we should either make it configurable and default to having it off, or maybe you could share more info on why it's generally desirable? |
|
That's fair! I think it's desirable because, in its default state, blacklight has pages of results that run far past where the facet area is. When you scroll down to view those results, you stop being able to access the facet area unless you scroll back up again. I originally worked on this for geoblacklight, because there you have a facet (the bounding box facet) that is important enough that you nearly always want it on screen, even when it doesn't have a value active. @jcoyne suggested upstreaming that work using the capability to modify the sidebar's |

This lets you interact with the facets more easily when you have
a long page of results. Has no effect on smaller screens or when
the facets are put away.