feat(alarmas): simplify alarm cards and add vacation summary row
Restyle the Alarmas root per the functional redesign: alarm cards drop
the always-visible edit/skip/delete button row for a minimal giant
time + station + switch layout. Tap opens the editor, swipe deletes
(with an AlertDialog confirmation), and the hero banner gains an
inline "Saltar" pill for the featured (soonest-firing) alarm's skip
action. No capability from the old button row is lost, only the
trigger location moved; estado_alarmas.dart and its scheduling/
snooze/dismiss-guard tests are untouched.
The vacation inline panel becomes a tappable summary row (range count
+ next-range countdown, computed over the existing estado.vacaciones)
that pushes a Vacaciones manager screen. That destination is a
placeholder for now (_PantallaVacacionesTemporal, holding the old
panel's body verbatim so add/delete-range capability is preserved) --
WU9 replaces it with the real PantallaVacaciones per design ADR-6.
New ARB keys (en/es only; other 11 locales are WU18's job):
alarmHeroSkipAction, alarmDeleteConfirmTitle/Message,
vacationRangesCount, vacationSummary{Active,Upcoming}Countdown.
This commit is contained in:
@@ -502,21 +502,36 @@ Calls Unchanged by Transport Extraction
|
||||
**Modified tests**: `pantalla_alarmas_editor_test.dart` (+ new card-gesture scenarios); `estado_alarmas_test.dart`,
|
||||
`estado_alarmas_snooze_test.dart` must pass unmodified
|
||||
|
||||
- [ ] 8.1 RED — tapping a simplified alarm card (giant time + station + switch) opens the editor pre-filled;
|
||||
- [x] 8.1 RED — tapping a simplified alarm card (giant time + station + switch) opens the editor pre-filled;
|
||||
swiping triggers delete with confirmation; no capability from the old always-visible button row is lost.
|
||||
- [ ] 8.2 RED — the hero banner's inline "Saltar" action skips the featured (soonest-firing) alarm, consistent with
|
||||
- [x] 8.2 RED — the hero banner's inline "Saltar" action skips the featured (soonest-firing) alarm, consistent with
|
||||
existing skip-next behaviour.
|
||||
- [ ] 8.3 RED — the vacation panel is now a summary row (range count + next-range countdown) that pushes a screen
|
||||
- [x] 8.3 RED — the vacation panel is now a summary row (range count + next-range countdown) that pushes a screen
|
||||
on tap (destination screen not yet built — assert `PluriPushScaffold.push` is invoked; WU9 builds it).
|
||||
- [ ] 8.4 GREEN — simplify `_TarjetaAlarma` to giant time/name/switch; move Edit/Skip/Delete behind tap/swipe.
|
||||
- [ ] 8.5 GREEN — add the hero banner's inline "Saltar" pill calling the existing skip-next path.
|
||||
- [ ] 8.6 GREEN — replace `_PanelVacaciones`'s inline list with a summary row wired to push the Vacaciones manager
|
||||
screen.
|
||||
- [ ] 8.7 REFACTOR — confirm no scheduling/dismiss-guard code path was touched; `estado_alarmas_test.dart` and
|
||||
`estado_alarmas_snooze_test.dart` pass unmodified.
|
||||
- [ ] 8.8 Verify — tap/swipe/hero-skip scenarios all green; confirm
|
||||
- [x] 8.4 GREEN — simplify `_TarjetaAlarma` to giant time/name/switch; move Edit/Skip/Delete behind tap/swipe.
|
||||
**Corrected at apply time**: proposal.md's own WU8 row says "giant time + station + switch" (not "name") —
|
||||
the card shows the STATION (or `noStationUseInternalSound`), not the alarm's custom name; the name stays
|
||||
editable inside the editor sheet, unchanged. Tap-to-edit and swipe-to-delete-with-confirmation implemented via
|
||||
`Dismissible` (`confirmDismiss` shows an `AlertDialog`, `onDismissed` calls the existing `eliminarAlarma`) plus
|
||||
an inner `Material(type: MaterialType.transparency) > InkWell` (the known `PluriGlassSurface`-ink-splash hazard
|
||||
from WU7, pre-empted here rather than rediscovered). All 4 old per-card chips (repeat/vacation/volume/fade) and
|
||||
notice lines (next-execution/skipped/vacation-paused) are dropped from the collapsed card per "minimal cards"
|
||||
— still reachable via the editor once opened; only the hard-guarded trio (edit/skip/delete) is a capability
|
||||
that must never be lost, and it isn't.
|
||||
- [x] 8.5 GREEN — add the hero banner's inline "Saltar" pill calling the existing skip-next path.
|
||||
- [x] 8.6 GREEN — replace `_PanelVacaciones`'s inline list with a summary row wired to push the Vacaciones manager
|
||||
screen. **Design decision, not specified by any ADR (WU8 has none)**: the summary row's "range count +
|
||||
next-range countdown" is computed directly over the existing `estado.vacaciones` (no new `EstadoAlarmas` query
|
||||
method — ADR-6's pure query additions are WU9's job). The push target is `_PantallaVacacionesTemporal`, a
|
||||
private placeholder holding the OLD inline panel's body verbatim (hint text, "Add" action, per-range delete) —
|
||||
same "keep the real action, drop only the header" rule WU3a/WU3b established — so add/delete-range capability
|
||||
is never dropped, not even for one commit, and WU9 replaces this whole widget with the real `PantallaVacaciones`.
|
||||
- [x] 8.7 REFACTOR — confirm no scheduling/dismiss-guard code path was touched; `estado_alarmas_test.dart` and
|
||||
`estado_alarmas_snooze_test.dart` pass unmodified. Also removed now-dead code the simplification orphaned:
|
||||
the `_InfoChip` widget and the `_programacion` helper (both were only reachable from the old chips row).
|
||||
- [x] 8.8 Verify — tap/swipe/hero-skip scenarios all green; confirmed
|
||||
`pantalla_alarma_sonando_dismiss_guard_test.dart` was not touched by this WU (it only edits the root list
|
||||
screen).
|
||||
screen) — re-ran it alongside the scoped suite, byte-identical, all 8 cases green.
|
||||
|
||||
## WU9 — Vacaciones manager (new screen)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user