-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Description
UserProfileView unconditionally wraps its content in a NavigationStack (line 141 of UserProfileView.swift). This means it cannot be pushed onto an existing NavigationStack via NavigationLink without creating nested NavigationStacks, which causes broken/missing transition animations for internal navigation (e.g., tapping Profile or Security).
Current behavior
When UserProfileView is pushed via NavigationLink from a parent NavigationStack, sub-page navigation (Profile, Security) has no transition animation — the destination view appears instantly without sliding in.
Expected behavior
UserProfileView should work correctly when pushed onto an existing navigation stack, with proper transition animations for internal navigation.
Suggested solution
Add an option to opt out of the internal NavigationStack, for example:
public init(isDismissable: Bool = true, wrapsInNavigationStack: Bool = true)When wrapsInNavigationStack is false, the view would use the parent's NavigationStack and register its destinations via .navigationDestination(for:) instead of creating its own.
Workaround
Present UserProfileView in a .sheet instead of pushing via NavigationLink, so the internal NavigationStack is the only one.
Environment
- clerk-ios (Swift SDK)
- iOS 17+/SwiftUI