feat(soccer-app): add country filter to team sidebar - #26
Conversation
added 2 commits
August 10, 2026 14:47
Add a labeled country dropdown with an 'All countries' option to the soccer team sidebar. Countries are derived from the team data and combined with the existing search and sorting behavior. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Task-Id: 01KZP2732VZZ0ZXPECPMY2TXAH Prompt-Version: 1c9c10e027a2
- Add compact active-filter summary with live result count and removable chips for the active country/search filters, plus a "Clear all" button - Improve keyboard accessibility: aria-label on the country select, Escape to reset it, and visible focus rings on interactive filter controls - Document filtering behavior and accessibility in soccer-app/README.md Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Task-Id: 01KZP3HT7ZZW1G3XTV6BTFFCJW Prompt-Version: 1c9c10e027a2
Owner
Author
Follow-up changes (commit 5fcb41e)Addressed the requested follow-ups on the country filter work: Compact active-filter summary
Improved keyboard accessibility for the country filter
README
Build & test results
No open review comment threads were present on the PR, so there were no individual threads to reply to. |
Owner
Author
Background agent — COMPLETED
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements TG-5: Add country filter from the "improve soccer team browsing filters" epic.
<select>with an associated<label htmlFor>) to the soccer team sidebar.ALL_COUNTRIESsentinel.getCountries()helper (de-duplicated, alphabetically sorted).queryTeams()now accepts an optionalcountryargument and appliesmatchesSearch+matchesCountrybefore sorting.Files changed
soccer-app/src/utils/teamQuery.ts— addedALL_COUNTRIES,getCountries(),matchesCountry(), and an optionalcountryparameter toqueryTeams().soccer-app/src/App.tsx— addedcountrystate, rendered the labeled country<select>, wired it intoqueryTeams.soccer-app/src/App.css— styling for.filter-controls,.filter-label,.country-filtermatching the existing sidebar look.Accessibility
<select>has an explicitidlinked to a<label htmlFor="country-filter">, so it is announced correctly by screen readers.<select>is used, which is keyboard-operable and accessible by default.Build & test results
Dependencies were installed with
npm install(the soccer-app node_modules were not present).mise run build→ PASS (tsc -b && vite build, built in ~113ms, no type errors).mise run lint→ PASS (oxlint, no warnings/errors).The repo has no automated test suite; changes were validated via the type-checked build and lint.
Decisions made
<select>dropdown (rather than a custom button group like the sort control) for accessibility and to scale gracefully as more countries are added.ALL_COUNTRIESsentinel and an "All countries" label;queryTeams's newcountryparameter is optional and defaults to all countries, preserving backward compatibility with existing callers.Agent notes
teamQuery.tsutility already cleanly separated matching/sorting logic, so extending it for country filtering was straightforward and testable.mise run build/mise run lintfailed becausesoccer-app/node_moduleswas not installed (tsc/oxlint not found); runningnpm installinsoccer-appresolved it.soccer-app; styling uses a dark slate palette (#0f172a,#334155,#3b82f6accents); query/filter logic lives insrc/utils/teamQuery.ts.teamQuery.ts(pure functions, easy to cover) and enablingpipeline.buildCommand/pipeline.lintCommandin the blueprint so build/lint gating is active.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.
🤖 Generated with Claude Code