Improve ServerChooser UI and use server avatar#6990
Conversation
970b392 to
1d66efe
Compare
|
This PR is also changing quite a lot in the deeplink handling which doesn't seem completely necessary (keep the PR small). Is it possible to split the changes? |
|
The active checkmark always appears to be added to the sheet, but I'm not sure this makes sense in situations where the active server is unclear to the user, so when used outside the webview context when opening links or syncing Thread credentials from settings. |
It doesn't change the deep link it adds a viewModel to extract the logic out of the activity. Do you want a dedicated PR that introduce the viewModel? |
Actually it is helpful for people that have the same name on two servers that have the same username. So you know which one is the currently activated. |
1d66efe to
c3f9e27
Compare
c3f9e27 to
7c1b5bb
Compare
jpelgrom
left a comment
There was a problem hiding this comment.
The server chooser waits for network requests to complete before showing servers. If a server is offline or slow to reach, you may be waiting up to okhttp's network timeout for that to happen. This shouldn't happen; any network requests to load the image should be async to showing the actual sheet.
Simulated example with 5s:
delay-server.mp4
| private val ROW_MIN_HEIGHT = HADimens.SPACE20 | ||
| private val AVATAR_SIZE = HADimens.SPACE12 | ||
| private val AVATAR_BADGE_SIZE = HADimens.SPACE5 | ||
| private val AVATAR_BADGE_ICON_SIZE = HADimens.SPACE3 |
There was a problem hiding this comment.
Everything here feels a bit too big to me, but maybe that is personal preference. Material 3 guidelines for a two-line list suggest 72dp min height (vs 80dp), 40dp avatar size (vs 48dp).
Summary
This PR refactor the ServerChooser to be more modern and migrate to our new theme. While at it this PR also add the avatar of the server and make the bottom sheet more friendly.
Checklist
Screenshots
Any other notes
This is based on #6989