-
Notifications
You must be signed in to change notification settings - Fork 349
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
Fix list animations for split tunneling #5145
Fix list animations for split tunneling #5145
Conversation
DROID-321 Fix list animation for split tunneling
When adding or removing apps for split tunneling the list does not animate nicely. Items pop in and out. The row item also has alpha which causes it to look extra weird. |
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.
Reviewable status: 0 of 4 files reviewed, 2 unresolved discussions
android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/BaseCell.kt
line 92 at r1 (raw file):
Spacer(modifier = Modifier.weight(1.0f)) Column(modifier = modifier.wrapContentWidth().wrapContentHeight()) { bodyView() }
I looked through the uses of this modifier
, as far as I can tell it is only used to animate rows, thus I repurposed correctly it to the top most element.
android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SplitTunnelingCell.kt
line 72 at r1 (raw file):
.padding(vertical = Dimens.listItemDivider) .background( MaterialTheme.colorScheme.primaryContainer.compositeOver(
Since primaryContainer
has alpha we need to compositeOver
the background color to not make it transparent. Long-term we should fix the colors to not use any alpha.
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.
Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Rawa)
android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/BaseCell.kt
line 92 at r1 (raw file):
Previously, Rawa (David Göransson) wrote…
I looked through the uses of this modifier, as far as I can tell it is only used to animate rows, thus I repurposed correctly it to the top most element.
I think this was a remnant from when the base cell was more complex, so should fine to move it.
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.
Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
911612a
to
28c2cb7
Compare
28c2cb7
to
1f68473
Compare
This pull requests fixes the animations on the Split tunneling view in 3 ways:
Note: Animations only fully work in release mode and thus might look a bit choppy or incorrect when using emulator and/or debug mode.
This change is