refactor: move rule editor actions into the navigation bar

- Both editor modes commit via a checkmark confirmation button
  (role: .confirm) in the navigation bar — accessibility labels
  'Add Rule' (create) and 'Done' (edit); replaces the bottom
  'Add Rule' button, so nothing floats over the form anymore
- Edit mode gains an ellipsis 'Rule Actions' menu next to the
  checkmark holding Disable/Enable Rule and destructive Delete Rule;
  the red form rows are removed
- Tests pin the checkmark to the navigation bar with its label and
  drive disable/delete through the menu; the swipe-to-reach
  workarounds are gone. 95 passing
- Spec §6 updated

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-12 16:29:32 -04:00
parent 1868d788f9
commit b8473383d3
4 changed files with 50 additions and 50 deletions

View File

@@ -344,7 +344,7 @@ reference for *what* the feature does; presentation now maps as follows:
| Apps home | `NavigationStack` + `List`; "Blocked Apps" and "Rules" sections; **rules are list rows** (kind icon, name, block summary, trailing live status — green when active); "+" toolbar button |
| Rule detail | Sheet with inline nav title (name + "Schedule, 6h left" caption), `LabeledContent` rows, "Edit Rule" row pushes the editor; hard-locked rules show a lock row instead |
| New Rule | `List` with a "Rule Type" section and preset sections as plain rows; editor pushed via `navigationDestination(item:)` |
| Rule editor | Native `Form`: an inline **Name text field** at the top (no separate rename button; empty names fall back to the kind default), `DatePicker` rows, full-width day-circle row (≥44pt tap targets) with the summary in the section header, toggle rows with footers, stepper rows. Create commits with a prominent **"Add Rule"** button on a bar-material inset (replaces Hold to Commit); edit uses toolbar **Done** plus red Disable/Delete rows |
| Rule editor | Native `Form`: an inline **Name text field** at the top (no separate rename button; empty names fall back to the kind default), `DatePicker` rows, full-width day-circle row (≥44pt tap targets) with the summary in the section header, toggle rows with footers, stepper rows. Both modes commit via a **checkmark** in the navigation bar (labels: "Add Rule" / "Done"; replaces Hold to Commit). In edit mode an **ellipsis menu** ("Rule Actions") next to the checkmark holds Disable Rule and the destructive Delete Rule |
| Onboarding / app picker | System styling, `.borderedProminent` buttons, default color scheme (no forced dark, default accent) |
Dropped custom components: `Theme`, `HoldToCommitButton`, `RuleCardView`,