diff --git a/AGENTS.md b/AGENTS.md index 07ac8f017..4006cfc7f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1271,7 +1271,8 @@ audit (#1207) locked in. New CTAs: | Render sub-views inside a Pattern A section (e.g. protests / submissions current-vs-archive) | `?view=` query param + a server-rendered `.chip-row` of real anchors (each carries `data-active="true|false"` + `aria-selected`). Reference: the protests / submissions chip rows in `web/pages/admin.bans.php` (`?section=protests&view=archive` / `?section=submissions&view=archive`). Pre-#1275 the chips called `Swap2ndPane()` — a `web/scripts/sourcebans.js` helper deleted at #1123 D1, leaving them dead — and the page rendered both views simultaneously. The new shape only renders the active view's data path; back/forward and link sharing both work. | | Lay out a sub-paged admin route's chrome (the 14rem vertical sidebar at `>=1024px`, the `
` accordion at `<1024px`) | `web/themes/default/core/admin_sidebar.tpl` (the partial) + the `.admin-sidebar-shell` / `.admin-sidebar` / `.admin-sidebar__details` / `.admin-sidebar__summary` / `.admin-sidebar__nav` / `.admin-sidebar__link` / `.admin-sidebar-content` rules in `web/themes/default/css/theme.css` (#1259). The active link reuses the shared `.sidebar__link[aria-current="page"]` rule from the main app shell so the dark-pill-in-light / brand-orange-in-dark treatment is single-source. | | Render the trailing "Back" link on edit-* admin pages (the only surface that calls `new AdminTabs([], …)`) | `web/themes/default/core/admin_tabs.tpl` is the back-link-only partial (it still has a defensive `{foreach}` for legacy themes, but `web/includes/View/AdminTabs.php` only routes here when `$tabs === []`). Page handlers like `admin.edit.ban.php` / `admin.rcon.php` / `admin.email.php` call `new AdminTabs([], $userbank, $theme)` and the partial emits the right-aligned Back anchor (`.admin-tabs__back` in theme.css). | -| Add or rename an admin-admins advanced-search filter | `web/pages/admin.admins.php` (filter-building loop + active-filter map for pagination) + `web/pages/admin.admins.search.php` (DTO population) + `web/includes/View/AdminAdminsSearchView.php` (`active_filter_*` properties) + `web/themes/default/box_admin_admins_search.tpl` (input + pre-fill). The form is single-submit AND-semantics with a backward-compat shim for legacy `advType=…&advSearch=…` URLs (#1207 ADM-4); cover new filters in `web/tests/integration/AdminAdminsSearchTest.php`. | +| Add or rename an admin-admins advanced-search filter | `web/pages/admin.admins.php` (filter-building loop + active-filter map for pagination) + `web/pages/admin.admins.search.php` (DTO population + `$active_filter_count` increment for the new slot) + `web/includes/View/AdminAdminsSearchView.php` (`active_filter_*` properties) + `web/themes/default/box_admin_admins_search.tpl` (input + pre-fill). The form is single-submit AND-semantics with a backward-compat shim for legacy `advType=…&advSearch=…` URLs (#1207 ADM-4); cover new filters in `web/tests/integration/AdminAdminsSearchTest.php`. | +| Wrap a filter `
` in a default-collapsed `
` disclosure (admin-admins advanced search; the public banlist / commslist filter bars are candidates for the same shape per #1303's notes) | `.filters-details` rules in `web/themes/default/css/theme.css` + reference shape in `web/themes/default/box_admin_admins_search.tpl` (`
` with a `` carrying the title + chevron + optional "N active" count badge). The View carries paired `int $active_filter_count` + `bool $has_active_filters` properties (#1303); the page handler increments the count once per populated value slot, NEVER per match-mode toggle. The disclosure auto-expands on a post-submit paint so the Clear-filters affordance stays one click away. Visual vocabulary mirrors `core/admin_sidebar.tpl`'s mobile `
` accordion (chevron + `prefers-reduced-motion: reduce` override). | | Add a shared "1 of these required" badge for an either/or input pair | `web/themes/default/page_submitban.tpl` (`data-required-group="…"` + the inline guard script — vanilla JS `// @ts-check`, blocks submit when both are empty) | | Bootstrap (paths, autoload, theme) | `web/init.php` | | Routing (`?p=…&c=…&o=…`) | `web/includes/page-builder.php` — unrecognised admin `c=…` returns the 404 page slot via `web/pages/page.404.php` + `Sbpp\View\NotFoundView` (#1207 ADM-1) | diff --git a/web/includes/View/AdminAdminsSearchView.php b/web/includes/View/AdminAdminsSearchView.php index 8200bae31..e78dd35cd 100644 --- a/web/includes/View/AdminAdminsSearchView.php +++ b/web/includes/View/AdminAdminsSearchView.php @@ -39,6 +39,18 @@ * (admin.admins.search.php) is the only place that knows whether a * given $_GET shape came from a modern submit, a legacy * `advType=…&advSearch=…` URL, or nothing at all. + * + * #1303 — collapsible disclosure + * ------------------------------ + * The form is wrapped in a `
` + * default-collapsed disclosure so the unfiltered admin list paints + * above the fold. `$has_active_filters` (derived from the nine + * `active_filter_*` value slots — match-mode toggles don't count + * because they always carry a default) drives the `[open]` attribute, + * so any post-submit page paints with the form expanded. The chrome + * mirrors `core/admin_sidebar.tpl`'s mobile `
` pattern + * (chevron + label + `prefers-reduced-motion: reduce` override). The + * count badge ("Filters · N active") rides `$active_filter_count`. */ final class AdminAdminsSearchView extends View { @@ -74,6 +86,16 @@ final class AdminAdminsSearchView extends View * to mark the matching `