Migrate shortcuts settings to HA components#7033
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Manage Shortcuts settings UI to use Home Assistant’s Material 3 design system components while keeping the underlying shortcut creation/update/delete, pinning, and server/entity selection behavior intact.
Changes:
- Replaced legacy Material components in
ManageShortcutsViewwith HA design system components (buttons, text fields, dropdowns, dividers, radio group) - Removed the per-section
HAThemewrapper aroundEntityPickerand instead appliedHAThemeat the fragment level for consistent theming
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app/src/main/kotlin/io/homeassistant/companion/android/settings/shortcuts/views/ManageShortcutsView.kt | Migrates UI elements to HA components (Material 3) and updates layout/spacing/styles accordingly |
| app/src/main/kotlin/io/homeassistant/companion/android/settings/shortcuts/ManageShortcutsSettingsFragment.kt | Wraps the screen content in HATheme to provide HA theming to the migrated view |
|
Update the description with screenshots of your work. |
There was a problem hiding this comment.
I would like you to check the work already made by @hdcodedev in https://github.com/hdcodedev/home-assistant-android/tree/feat/shortcuts-v2 he already put a lot of effort into it and we should reuse it as a base.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
b01e4b4 to
a7e3f6a
Compare
|
Thanks, I checked @hdcodedev's feat/shortcuts-v2 branch again. It looks like a much broader v2 rewrite: new shortcuts data/repository layer, navigation, new screens/view models, screenshot tests/baselines, and supporting plan scripts across app/common.\n\nFor this PR I kept the scope intentionally narrow around #6258: migrate the existing Manage Shortcuts screen to the HA/Material 3 components while preserving the current behavior and avoiding the broader architecture/data-layer rewrite. I also fixed the Copilot pinned-shortcut label issue in a7e3f6a.\n\nIf the preferred direction is to continue from that v2 rewrite instead, I agree this small migration PR should probably be superseded by that work rather than mixing the two approaches in one PR. |
Summary
Migrates
ManageShortcutsViewto Home Assistant Material 3 components while preserving the existing shortcut create, update, delete, pinned shortcut, server selection, and entity selection behavior.Fixes #6258
Checklist
Screenshots
Verified locally on an emulator through the debug playground settings route. The Manage Shortcuts screen rendered correctly in the default Dashboard state, scrolled state, and Entity shortcut type state.
Link to pull request in documentation repositories
No documentation updates required.
Any other notes
Verified with:
./gradlew --no-daemon --console=plain ktlintCheck :build-logic:convention:ktlintCheck --continue./gradlew --no-daemon --console=plain :app:assembleMinimalDebug