Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add settings and favorites for wear so users can quickly execute actions they do regularly faster #1875

Merged
merged 7 commits into from Nov 9, 2021

Conversation

dshokouhi
Copy link
Member

@dshokouhi dshokouhi commented Nov 5, 2021

Summary

  • Adds a new settings section so users can set and clear favorites (clear is important in case the entity list is old like the user deleted an entity)
  • When favorites are set they load as a chip on the home screen, then as soon as entities are loaded they convert to toggles if necessary. This allows them to be executed before we finish loading

Fixes: #1881

Screenshots

image

image

image

image

image

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#610

Any other notes

Theres a lot going on in this PR in a future PR lets do the phone side for grabbing and setting favorites :)

Copy link
Contributor

@leroyboerefijn leroyboerefijn left a comment

Choose a reason for hiding this comment

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

Awesome work once again! I'm impressed with your speed 😋

Haven't tested it out yet, but looks good!

@leroyboerefijn
Copy link
Contributor

I'm not sure what the best practices are for navigation in compose. But I was wondering if the HomeActivity is not becoming too large when it will contain all of the settings pages and subpages as well?
Would it make sense to have all settings related stuff in a separate Activity?

@dshokouhi
Copy link
Member Author

Well we could move the composable to a separate file but navigating to composables instead of activities seems to be what the docs say.

https://developer.android.com/jetpack/compose/navigation

Also using the current method gives us the cool animation and handles the backstack etc..

@leroyboerefijn
Copy link
Contributor

Well we could move the composable to a separate file but navigating to composables instead of activities seems to be what the docs say.

https://developer.android.com/jetpack/compose/navigation

Also using the current method gives us the cool animation and handles the backstack etc..

Okay good then! I'll try to test it soon, am curious about the animations and functionality!

@dshokouhi
Copy link
Member Author

ok did some refactoring so HomeActivity has a bit less going on, hopefully that helps make things easier to follow

@JBassett JBassett merged commit 2c5e762 into home-assistant:master Nov 9, 2021
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.

Wear OS - Manually add entities to be shown in the wear os app
4 participants