Repository navigation
ui(free): result filters as native WP navigation with counts and an active state #274
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requestuiAdmin interface polish and UX (presentation-only)Admin interface polish and UX (presentation-only)
Description
Part of a presentation-only UI/UX polish set for the WriteLeash Free admin screens. Shared constraints and the merge gate are at the bottom of this issue — read them before starting.
Problem
The Results screen product filters are rendered as a row of loose buttons with no visible active state:
wordpress/writeleash/includes/free/class-free-admin.php:2641-2646:<p class="writeleash-filters">contains<a class="button">per choice, with<strong>used for the active choice. Six choices: All products / Conflicts / Changes needing attention / Uncertain changes / Undo conflicts / Uncertain restorations.wordpress/writeleash/includes/free/free-selection.css:120-125styles them as a flex row; there is no.current/active styling, no counts, and the row wraps awkwardly at narrow widths.- Reference screenshot:
wordpress/assets/screenshot-4.png(the button row above the Products table).
Scope
wordpress/writeleash/includes/free/class-free-admin.php(filter renderer only, ~L2639-2646)wordpress/writeleash/includes/free/free-selection.css(replace.writeleash-filtersblock)
Required direction
- Use WordPress's standard list navigation pattern:
ul.subsubsubwith pipe separators and one.currentitem — the same pattern as Posts/Users screens (All products | Conflicts (2) | …). Active item gets.currentplusaria-current="page". - Keep every URL, the
filterquery parameter and the fallback behavior exactly as today (unknown filter falls back to All). No handler changes. - Counts are optional and cheap only: render
Label (n)where an existing repository call already provides the number for every filter in one place. Do NOT add new storage, caches or per-filter queries for this issue. If counts are not available cheaply, ship the pattern without counts and say so in the PR. - Keep the existing empty-state row ("No retained products on this page match this view.") unchanged.
Acceptance criteria
- Active filter is visually unambiguous (
.current) and exposed viaaria-current. - Markup matches the WP
subsubsubpattern; keyboard reachable; focus visible. - Wraps gracefully at 782px and 375px (no horizontal overflow).
- URLs/query params unchanged; deep links to a filter still work.
- Screenshots (all filters, active vs inactive) in the PR.
Shared constraints (all UI-polish issues)
- Presentation only: do not change planner math, frozen decimal/display contracts, storage, handlers, nonces, form field names, routes, capabilities or job logic.
- Native WordPress UI only:
.wrap,.button,.widefat,.notice, Dashicons. No React, no CSS framework, no gradients/hero/decorative art, no new icon fonts. - All CSS stays scoped under
.writeleash-admin; do not touch global wp-admin styles or other screens. - WordPress admin palette only; meaning is never conveyed by color alone; visible focus
2px #2271b1; body-text contrast ≥ 4.5:1. - Works at 1440 / 1024 / 782 / 375 px and at 200% zoom.
- User-facing strings stay translatable (
writeleashtext domain); if strings change, note it in the PR.
Merge gate (required)
Single-owner repository. The implementing agent MUST open a pull request and MUST NOT merge it: no self-merge, no auto-merge, no direct push to main, no force-push after review starts. Only @MrDarkRoot reviews and merges. PR_FAST and CI_COVERAGE must be green, and these files carry the admin + acceptance ownership gates (.github/ci/path-ownership.json).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestuiAdmin interface polish and UX (presentation-only)Admin interface polish and UX (presentation-only)
Activity
MrDarkRoot commentedon Oct 15, 2026
Done on main. UI polish landed in #284, screenshots in #286, a11y evidence in #287, chip focus in #289.