-
Notifications
You must be signed in to change notification settings - Fork 32
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
Query filters: Fix scrollbar overlaying dropdown menu #473
Query filters: Fix scrollbar overlaying dropdown menu #473
Conversation
Context: Current Situation:
I guess the simplest solution here is to let the filters wrap, as shown in the video below. This method also addresses the issues raised in this PR. Thoughts on this? @jasmussen @marko-srb wrap.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Works for me, with a small change 🙂
Or @WordPress/meta-design |
I think @fcoveram's intent with the filter bar design he worked on was for them to scroll horizontally, and if that is the case, this z-index fix seems good. But I'd love if he had time to take a look. Depending on that feedback, letting the dropdowns stack seems acceptable to me as well. |
@jasmussen is right about the horizontal intention. To give more context, the idea of showing search and filter actions in two bars began with the need for displaying the number of results by a11y reasons and placing apart the sort action, as the latter is not a filter. In most cases, especially in the index family's landing page (Showcase, Themes, Patterns, and Plugins), the page is a curated list of items, whereas the search result/archive allows users to play with filters and sorting. Therefore, outlining these two use cases reinforced the context difference. Since the layout changed in wporg-showcase-2022#167, I'm drawn to follow @StevenDufresne's reference. I thought about it during the design, yet the sort action will be placed at the end of the list in a filter-actions context. If we consider the two bars idea valid, I'm happy to create a ticket to address it. |
262f081
to
b5bb9ef
Compare
@fcoveram thanks for the details. The two bars idea makes sense to me, I reckon we can follow Steve's example and this is supposed to be shipped before launching? If not, the simpler solution (let the filters wrap) should be used first. This will only bring benefits (users with smaller screens can see the Sort option), with no downsides (the experience for users with larger screens remains unchanged). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in it's current state
Fixes #467 (To be specific, #467 (comment))
Related: WordPress/wporg-showcase-2022#248
This PR adds a toggle function for
overflow-x
. When a theme assignsoverflow-x: scroll
to the query filter, change it tooverflow-x: hidden
when the dropdown menu is opened. And if it's closed, change it back toscroll
.Approach here was employed due to the overlapping issue can't be easily resolved just by adjusting the
z-index
orposition
of the query filter and the dropdown menu for a few potential reasons:Screenshots