Skip to content

ui(free): result filters as native WP navigation with counts and an active state #274

Closed

Description

@MrDarkRoot

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-125 styles 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-filters block)

Required direction

  1. Use WordPress's standard list navigation pattern: ul.subsubsub with pipe separators and one .current item — the same pattern as Posts/Users screens (All products | Conflicts (2) | …). Active item gets .current plus aria-current="page".
  2. Keep every URL, the filter query parameter and the fallback behavior exactly as today (unknown filter falls back to All). No handler changes.
  3. 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.
  4. 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 via aria-current.
  • Markup matches the WP subsubsub pattern; 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 (writeleash text 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).

Activity

  1. added
    enhancementNew feature or request
    uiAdmin interface polish and UX (presentation-only)
    on Oct 13, 2026
  2. MrDarkRoot commented on Oct 15, 2026

    @MrDarkRoot
    OwnerAuthor

    Done on main. UI polish landed in #284, screenshots in #286, a11y evidence in #287, chip focus in #289.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestuiAdmin interface polish and UX (presentation-only)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions