-
Notifications
You must be signed in to change notification settings - Fork 616
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 missing scroll bar to remaining screens #3895
Add missing scroll bar to remaining screens #3895
Conversation
When adding a |
Honestly I thought about adding the Scaffold to the Lazy Column as we should always use the 2 together no matter what. In reality WearAppTheme + Scaffold + ThemeLazyColumn should always be used together right? Not sure if we should combine them or just continue to keep it separate but IMO we use it as a theme to show the scroll bar and time in the lazy column while scrolling so the 3 feel very much related. |
WearAppTheme is not always followed by a scaffold (eg navigation), but it's a function so you can create multiple and use them as needed :) Combining Scaffold + ThemeLazyColumn would make sense because they both use the same state for the scroll indicator. |
completed in the latest commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A general pattern for composables is:
val scalingLazyListState = rememberScalingLazyListState()
WearAppTheme {
ThemeLazyColumn(state = scalingLazyListState) {
...
}
}
But as the ThemeLazyColumn
now includes a Scaffold
, which was almost always the only reason to get the state in a variable, can't it be removed in a lot of places?
...in/java/io/homeassistant/companion/android/complications/views/ComplicationConfigMainView.kt
Outdated
Show resolved
Hide resolved
wear/src/main/java/io/homeassistant/companion/android/conversation/views/ConversationView.kt
Outdated
Show resolved
Hide resolved
wear/src/main/java/io/homeassistant/companion/android/conversation/views/ConversationView.kt
Outdated
Show resolved
Hide resolved
Do you mean to stick with the default which also gets the latest state? I think so but was used to always grabbing the state and sending it in :) |
I think simply putting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installed and tested, I think you got all screens now. Love how simple something like the sensor list is with these changes.
Summary
We had a play store review failure. One of the failing items was missing scroll bars when a user is scrolling.
To fix this I am adding
Scaffold
toThemeLazyColumn
to ensure we always show the scroll bars and timeScreenshots
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes