-
Notifications
You must be signed in to change notification settings - Fork 169
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
Magic Links: Fix window resizing animation + some clean up #1204
Magic Links: Fix window resizing animation + some clean up #1204
Conversation
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.
Works great!! sending you a few notes, TY!!
override func loadView() { | ||
guard let initialViewController = topViewController else { | ||
fatalError() | ||
} | ||
|
||
view = NSView() | ||
heightConstraint = view.heightAnchor.constraint(equalToConstant: .zero) | ||
heightConstraint?.isActive = true |
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.
Since we're now doing this, the minimumHeightConstraint
workaround isn't required anymore. We can:
- Maybe convert this constraint into an IUO? or not?
- Move the
.activate
to L57 instead (wheremiminumHeightConstraint
lives now)
Also I'm ... slightly worried about setting it to .zero
by default. It is possible, at some point in time, the Window will actually be .zero
height.
Co-authored-by: Jorge Leandro Perez <[email protected]>
Co-authored-by: Jorge Leandro Perez <[email protected]>
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.
Looks amazing, thank you Charlie!!
Fix
We had noticed some wonky animations when pushing and popping from one view to another during the auth login/signup flow. This was causing the size of the window to jump to meet the new view size. Didn't look great. In this PR we have updated the animations so that it will animate smoothly to the new size of the view loaded into the navigation controller. Huge T/Y to @jleandroperez for the assist on this one.
Also while I was in there I fixed an issue where if you don't animate the navigation controller push/pop the views didn't size and the back button didn't hide correctly (we don't really need this, but if we are gonna build the component might as well make it work correctly)
and I did a bit of cleanup to make the methods simpler.
relies on #1202
Test
(Required) List the steps to test the behavior. For example:
Review
(Required) Add instructions for reviewers. For example:
Release
(Required) Add a concise statement to
RELEASE-NOTES.txt
if the changes should be included in release notes. Include details about updating the notes in this section. For example: