mirror of
https://github.com/home-assistant/iOS.git
synced 2026-06-16 23:33:36 -05:00
## Summary Migrate the notification category list and the category/action editors to SwiftUI: - `NotificationCategoryListView`: local insert/delete, Realm-observed server categories section, navigation to editor. - `NotificationCategoryEditorView`: required fields, server-controlled read-only mode, hidden preview/summary text areas, reorder/insert/delete action rows, YAML service-call preview, toolbar help, preview-notification action. - `NotificationActionEditorView`: required title/identifier, conditional text-input fields, foreground/destructive/authentication toggles, server-controlled read-only mode, YAML trigger preview. Also adds three reusable components: - `YamlPreviewSection` — replaces Eureka `YamlSection` within this slice; generalises the inline version previously in `NFCTagView`. - `NotificationIdentifierField` — SwiftUI text-field helper enforcing identifier casing/validation (replaces `NotificationIdentifierEurekaRow`). - `RealmResultsObserver` — `ObservableObject` wrapping `AnyRealmCollection` with a notification token (reusable by future slices). Deletes the three old `*Configurator.swift` / `*ViewController.swift` files plus `NotificationIdentifierEurekaRow.swift`. ## Screenshots _Pending — to be added before merge._ ## Link to pull request in Documentation repository Documentation: home-assistant/companion.home-assistant# ## Any other notes Part of a five-PR Eureka → SwiftUI migration tracked in `UIKitToSwiftUIMigration.md` (siblings: #4560, #4561, #4562, #4564). The `Eureka`, `ColorPickerRow`, and `ViewRow` pods stay until all slices land. **Reconciliation with #4562:** this PR embeds `NotificationCategoryListView` inside the old `NotificationSettingsViewController` via `UIHostingController` so the list is reachable while the parent screen is still Eureka. Once #4562 merges, `NotificationSettingsView` should link directly to `NotificationCategoryListView` — the hosting-controller wrapper becomes unnecessary. `YamlSection.swift` and `RealmSection.swift` are retained — still used by `ActionConfigurator`, `NFCTagViewController`, `SettingsDetailViewController`, and `ComplicationListViewController`. `bundle exec fastlane lint` passes. Not build-verified locally yet. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>