feat(buscar): add discovery landing state, filter pills, counter, and sort

This commit is contained in:
2026-07-29 08:45:36 +02:00
parent 3a803ce2bf
commit 9bd828139f
29 changed files with 1789 additions and 655 deletions
+9 -9
View File
@@ -434,24 +434,24 @@ Results Counter, One-Tap Clear-All-Filters on Empty Results, Client-Side Search
**Verify**: `flutter test test/pantallas/pantalla_buscar_shimmer_test.dart test/estado/estado_busqueda_test.dart && flutter analyze && dart format --set-exit-if-changed $(git diff --name-only --diff-filter=ACM HEAD -- '*.dart')`
**Modified tests**: `pantalla_buscar_shimmer_test.dart`, `estado_busqueda_test.dart` (non-sort paths unmodified)
- [ ] 6.1 No spike needed here — the sort ruling is already verified (Engram 2505): server-side `order`/`reverse`
- [x] 6.1 No spike needed here — the sort ruling is already verified (Engram 2505): server-side `order`/`reverse`
exist but are rejected; `OrdenEmisoras` is the only extension point. Do not re-derive.
- [ ] 6.2 RED — empty query renders discovery content (near-you / genres / trending / Países entry); non-empty query
- [x] 6.2 RED — empty query renders discovery content (near-you / genres / trending / Países entry); non-empty query
replaces it with the results view.
- [ ] 6.3 RED — active-filter pills (country/language/quality) with a close affordance; results counter text; the
- [x] 6.3 RED — active-filter pills (country/language/quality) with a close affordance; results counter text; the
one-tap "Quitar los 2 filtros" action on a 2-filter/0-result fixture.
- [ ] 6.4 RED — regression guard: every rendered "Ordenar" option maps to a real `OrdenEmisoras` case with its own
- [x] 6.4 RED — regression guard: every rendered "Ordenar" option maps to a real `OrdenEmisoras` case with its own
test.
- [ ] 6.5 GREEN — move the discovery content (near-you/genres/trending, Países entry point) from
- [x] 6.5 GREEN — move the discovery content (near-you/genres/trending, Países entry point) from
`pantalla_inicio.dart`'s old sections into `pantalla_buscar.dart`'s empty-query landing state; **delete** the
moved sections from `pantalla_inicio.dart` now (completes WU5's deferred cleanup, task 5.9).
- [ ] 6.6 GREEN — collapse the 3 always-visible `FilterChip` rows into an active-pills bar with bottom-sheet
- [x] 6.6 GREEN — collapse the 3 always-visible `FilterChip` rows into an active-pills bar with bottom-sheet
pickers; add the results counter and clear-all-filters action.
- [ ] 6.7 GREEN — extend `enum OrdenEmisoras` (`orden_emisoras.dart:4`) only with criteria backed by existing
- [x] 6.7 GREEN — extend `enum OrdenEmisoras` (`orden_emisoras.dart:4`) only with criteria backed by existing
`Emisora` fields (`bitrate`, `votes`, `clickcount`); wire "Ordenar" client-side only — no `order`/`reverse`
param added to any request.
- [ ] 6.8 REFACTOR — confirm `estado_busqueda_test.dart`'s non-sort paths still pass unmodified.
- [ ] 6.9 Verify — no test in this WU asserts an `order` param on any outgoing request; sort-option regression guard
- [x] 6.8 REFACTOR — confirm `estado_busqueda_test.dart`'s non-sort paths still pass unmodified.
- [x] 6.9 Verify — no test in this WU asserts an `order` param on any outgoing request; sort-option regression guard
green.
## WU7 — Países browser + `_get` transport extraction