xwp / stream

🗄️ Stream plugin for WordPress
https://wordpress.org/plugins/stream/
GNU General Public License v2.0
407 stars 116 forks source link

Contexts filter is difficult to use with large sites #1408

Open iandunn opened 1 year ago

iandunn commented 1 year ago

Problem

The Show all Contexts dropdown list is difficult to navigate when there are a large number of items, because of how small it is. Only 5 entries are visible at a time, but one site I work on has 1,036 total.

That's ok if I already know exactly what I want, since I can just search for it. If I want to explore what the available contexts are, though, or if I can't remember the exact term, then I have to scroll through the list. Many of the parent contexts have more than 5 children, so it can sometimes be difficult to see which parent a child context belong too.

Potential Solutions

  1. Make the dropdown list bigger. Increasing the height, and/or using columns would allow for many more entries to be shown at once.

    .select2-dropdown {
    -width: 100%;
    +width: 50vw;
    }
    
    .select2-container--default .select2-results > .select2-results__options {
    -max-height: 200px;
    +max-height: 75vh;
    +columns: 2;
    }
  2. Move the parent contexts to a separate dropdown menu. The user would first choose a parent, and then that would populate the list of child contexts.
  3. Redesign the entire UI with large sites in mind. I don't know exactly what that would look like, but I'm sure a designer would have some ideas.

I think 3 might be ideal, but 1 is probably the easiest and most practical. 2 could also work, though.