-
Notifications
You must be signed in to change notification settings - Fork 5
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 navigation bar to the avatar picker #358
Conversation
📲 You can test the changes from this Pull Request in Gravatar UIKit Prototype Build by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Gravatar SwiftUI Prototype Build by scanning the QR code below to install the corresponding build.
|
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 good to me!
There's one detail which troubles me a bit, but I don't think there's much we can do without making things overly complicated:
SFSafariViewController has a custom modal presentation animation which emulates a navigation push. It's the standard animation in which the in-app browser is presented.
CleanShot.2024-08-22.at.16.43.06.mp4
SwiftUI doesn't seem to be compatible with these custom presentation animations, and we lose the standard SFSafariViewController presentation.
I saw that most resources online mentions using .sheet
presentation, which is the easiest. I tested using NavigationLink but it won't work either.
The closest is to use .fullScreenCover()
instead of .sheet()
, so it presents full screen.
The complex option I saw is to present SFSafariView in UIKit side from UIApplicationDelegate or UIWindow, and call it from SwiftUI using a global reference. But we also don't have the UIKit context in a pure swiftUI app. ¯_(ツ)_/¯
Either way, lets go along with this one. Hopefully Apple will do something about this at some point.
Either way, I'm fine how it is now
I liked "fullScreenCover" better. 👍 For now it seems like the best we can get out of SwiftUI about this. |
Closes #343
Description
Adds navigation bar. I used
NavigationView
for now since it is supported in iOS 15.NavigationStack
is supported only for iOS 16+.Updates the "Discover Your Gravatar Card" to "View profile" based on designs. Ties the action to open the profile in Safari.
Refactors some of the paddings based on the designs.
Testing Steps