Skip to content

Migrate shortcuts settings to HA components#7033

Open
himu-gupta wants to merge 3 commits into
home-assistant:mainfrom
himu-gupta:feature/manage-shortcuts-material3
Open

Migrate shortcuts settings to HA components#7033
himu-gupta wants to merge 3 commits into
home-assistant:mainfrom
himu-gupta:feature/manage-shortcuts-material3

Conversation

@himu-gupta

@himu-gupta himu-gupta commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates ManageShortcutsView to Home Assistant Material 3 components while preserving the existing shortcut create, update, delete, pinned shortcut, server selection, and entity selection behavior.

Fixes #6258

Checklist

  • New or updated tests have been added to cover the changes following the testing guidelines.
  • The code follows the project's code style and best_practices.
  • The changes have been thoroughly tested, and edge cases have been considered.
  • Changes are backward compatible whenever feasible. Any breaking changes are documented in the changelog for users and/or in the code for developers depending on the relevance.

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

@himu-gupta himu-gupta marked this pull request as ready for review June 18, 2026 09:50
Copilot AI review requested due to automatic review settings June 18, 2026 09:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ManageShortcutsView with HA design system components (buttons, text fields, dropdowns, dividers, radio group)
  • Removed the per-section HATheme wrapper around EntityPicker and instead applied HATheme at 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

@TimoPtr

TimoPtr commented Jun 18, 2026

Copy link
Copy Markdown
Member

Update the description with screenshots of your work.

@TimoPtr TimoPtr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@home-assistant home-assistant Bot marked this pull request as draft June 18, 2026 13:36
@home-assistant

Copy link
Copy Markdown

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@himu-gupta himu-gupta force-pushed the feature/manage-shortcuts-material3 branch from b01e4b4 to a7e3f6a Compare June 18, 2026 21:06
@himu-gupta himu-gupta marked this pull request as ready for review June 18, 2026 21:06
@home-assistant home-assistant Bot requested a review from TimoPtr June 18, 2026 21:06
@himu-gupta

Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework UI of ManageShortcutsView to use Material3

3 participants