UX: unify filters for colors, themes, and components #33863
+239
−253
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'd like to unify our admin filtering around a central component that achieves some simple styling. It looks like this:
This sort of filter has already been implemented in the AI plugin, for the plugin index, and for color palettes. These implementations haven't been all tied up into a single component yet.
In this PR I've put some stand-alone filters through the new
AdminFilterControls
component.This includes:
Filtering by theme (when you have 8 or more themes). We didn't have a filter here yet, but it's useful in some extreme cases (including development!)
Filtering by color palette. This existed already, but now uses the shared component.
Filtering by component. We already had a filter here, but it wasn't using this new unified style. This was a little trickier because it's not unusual for sites to have many components, so we paginate and filter these server-side. I've added support for callbacks in
AdminFilterControls
so it can support either client or server based filtering.