feat(soccer-app): add clear-filters action and active-filter count - #28
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Task-Id: 01KZP34B939B9MRW20KF0XAQCX Prompt-Version: 1c9c10e027a2
…BS/shared-orchestration-context-the-parent-epic-sever' into bgagent/01KZP34B939B9MRW20KF0XAQCX/shared-orchestration-context-the-parent-epic-sever
…n-context branch Scope .clear-filters-btn CSS to its parent container to resolve a styling collision introduced when the predecessor branch's active-filters feature (with its own .clear-filters-btn) was merged in alongside this PR's .filter-summary clear-filters button. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Task-Id: 01KZP3SFAG2XV8YE4GN0BK9308 Prompt-Version: 1c9c10e027a2
Re-stack updateAbsorbed the updated predecessor branch ( Resolution: scoped both rule sets to their parent containers ( Build/test:
|
Background agent — COMPLETED
|
Summary
Implements TG-8: Add clear-filters action from the "improve soccer team browsing filters" epic.
ALL_COUNTRIES), andpointssorting. The existing URL-sync effect automatically clears the query string once the state resets.countActiveFiltershelper inurlState.tsthat counts how many of the three controls differ fromDEFAULT_CONTROLS, reusing the existing shared defaults so counting, clearing and URL persistence stay consistent.Files changed
soccer-app/src/App.tsx— clear handler, active filter count, summary bar UIsoccer-app/src/App.css—.filter-summary,.active-filter-count,.clear-filters-btnstylessoccer-app/src/utils/urlState.ts— newcountActiveFiltershelperBuild and test results
mise run build→ PASS (tsc -b && vite build, built in ~154ms; note:npm installwas required first becausetsc/oxlintbinaries were not present).mise run lint→ PASS (oxlint, no warnings/errors).Decisions made
DEFAULT_CONTROLSconstant for both clearing and counting so the definition of "cleared" state stays aligned with the URL persistence logic (introduced by TG's sibling URL-state work).points, matching the epic's spec that clearing restores "points sorting".By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.
Agent notes
teamQuery.tsandurlState.tscleanly separate query/URL logic, so the change was small and additive. ReusingDEFAULT_CONTROLSmade "clear" trivially correct and self-synchronizing with the URL effect.mise run build/lintfailed withtsc: not found/oxlint: not found; runningnpm installinsoccer-appfirst resolved it. Worth noting for future tasks in this repo.soccer-appscope; dark-theme CSS with slate/blue palette (#0f172a/#1e293b/#334155/#3b82f6); URL state uses short param names (q,country,sort) and omits default values.teamQuery/urlStatehelpers, and configuring the blueprint's build/lint commands so gating is active.