-
Notifications
You must be signed in to change notification settings - Fork 384
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
Animate expansion of connection details view #7548
Animate expansion of connection details view #7548
Conversation
bb3c5ae
to
96ea06d
Compare
2bc4ae5
to
f113e11
Compare
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.
There is a black backround behind the buttons that should not be there:
Reviewable status: 0 of 10 files reviewed, 1 unresolved discussion (waiting on @SteffenErn)
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionView.swift
line 18 at r3 (raw file):
@State private(set) var showConnectionDetailsAnimated = false @State private(set) var isExpandedAnimatied = false
Nit: Spelling: "Animatied"
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 10 files reviewed, 1 unresolved discussion (waiting on @SteffenErn)
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionView.swift
line 17 at r3 (raw file):
@State private(set) var isExpanded = false @State private(set) var showConnectionDetailsAnimated = false
I think we always want to do these things animated, so we don't need to specify that in the variable names.
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 3 of 10 files at r1, 6 of 7 files at r2, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @SteffenErn)
ios/MullvadVPN/Extensions/View+Modifier.swift
line 12 at r4 (raw file):
extension View { func apply<V: View>(@ViewBuilder _ block: (Self) -> V) -> V { block(self) }
We should add documentation here to clarify what the function is used for.
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 3 of 10 files at r1, 6 of 7 files at r2, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @SteffenErn)
c5e7f08
to
c404b1b
Compare
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.
New and improved version of animations are ready to be tested and reviewed. (No more black bar between buttons included)
Reviewable status: 3 of 15 files reviewed, 3 unresolved discussions (waiting on @buggmagnet, @mojganii, and @rablador)
ios/MullvadVPN/Extensions/View+Modifier.swift
line 12 at r4 (raw file):
Previously, rablador (Jon Petersson) wrote…
We should add documentation here to clarify what the function is used for.
Done.
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionView.swift
line 17 at r3 (raw file):
Previously, rablador (Jon Petersson) wrote…
I think we always want to do these things animated, so we don't need to specify that in the variable names.
managed to remove those variables entirely 🥳
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionView.swift
line 40 at r4 (raw file):
Previously, mojganii wrote…
why did you remove constants?
16 is the default padding, but I added it back now to be more explicit.
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 12 of 12 files at r5, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @mojganii and @SteffenErn)
ios/MullvadVPN/Extensions/View+Modifier.swift
line 12 at r4 (raw file):
Previously, SteffenErn (Steffen Ernst) wrote…
Done.
Change to documentation comments (///
) instead and move it to the apply
function so that it's visible in Xcode at a glance.
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionView.swift
line 17 at r3 (raw file):
Previously, SteffenErn (Steffen Ernst) wrote…
managed to remove those variables entirely 🥳
🙌
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionView.swift
line 79 at r5 (raw file):
.cornerRadius(12) .padding(16) .onChange(of: connectionViewModel.showsConnectionDetails) { newValue in
Nit: newValue
should be renamed to something immediately identifiable.
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 1 of 1 files at r6, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @mojganii and @SteffenErn)
47d4d19
to
4cf7408
Compare
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 1 of 12 files at r5.
Reviewable status: 13 of 15 files reviewed, 2 unresolved discussions (waiting on @mojganii and @rablador)
ios/MullvadVPN/Extensions/View+Modifier.swift
line 12 at r4 (raw file):
Previously, rablador (Jon Petersson) wrote…
Change to documentation comments (
///
) instead and move it to theapply
function so that it's visible in Xcode at a glance.
Done.
4cf7408
to
bb982f2
Compare
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 1 of 2 files at r7, 1 of 1 files at r8, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mojganii)
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: 14 of 15 files reviewed, 1 unresolved discussion (waiting on @mojganii and @rablador)
ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionView.swift
line 40 at r4 (raw file):
Previously, SteffenErn (Steffen Ernst) wrote…
16 is the default padding, but I added it back now to be more explicit.
Sorry you are right, I missed that one value was 24.
Done
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 1 of 1 files at r9, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mojganii)
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 9 of 12 files at r5, 1 of 1 files at r6, 1 of 2 files at r7, 1 of 1 files at r9, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mojganii)
38a8757
to
fde953e
Compare
🚨 End to end tests failed. Please check the failed workflow run. |
It is finally time for some fancy animations of the connection view. A few changes to the structure, lots of pain and finally the salvation through
.transformEffect(.identity)
was required.Some of the newly introduced
State
variables seem unnecessary, but it doesn't work properly without them.Enjoy!
This change is