mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-14 05:49:07 +08:00
I'd like to unify our admin filtering around a central component that achieves some simple styling. It looks like this: <img width="2190" height="328" alt="image" src="https://github.com/user-attachments/assets/ae223ab9-e12f-4e99-a2b8-968aa3a51805" /> 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. <img width="2206" height="1108" alt="image" src="https://github.com/user-attachments/assets/6ce6d2f1-1ed1-4168-a6fc-77760fd34384" /> <img width="2204" height="1182" alt="image" src="https://github.com/user-attachments/assets/b0409bc3-9da0-4ae1-b1a3-dd3dcde2a0b3" /> <img width="2224" height="1156" alt="image" src="https://github.com/user-attachments/assets/f82ef6dd-f5d4-46f0-9a57-00349522ef8f" /> |
||
|---|---|---|
| .. | ||
| about.gjs | ||
| api-keys-list.gjs | ||
| api-keys-new.gjs | ||
| api-keys-show.gjs | ||
| color-palette.gjs | ||
| color-palettes.gjs | ||
| components.gjs | ||
| emojis-list.gjs | ||
| emojis-new.gjs | ||
| flags.gjs | ||
| themes.gjs | ||
| user-fields-list.gjs | ||
| webhooks-form.gjs | ||
| webhooks-list.gjs | ||