Skip to content
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

Several improvements #209

Merged
merged 6 commits into from May 15, 2024
Merged

Several improvements #209

merged 6 commits into from May 15, 2024

Conversation

olivaresf
Copy link
Member

This PR contains three changes for my convenience, but I'm happy to break them up into 3 separate PRs if needed:

  • TurboNavigator.rootViewcontroller allowed us to access the main nav controller. I've added modalRootViewController so we can access that too.
  • I've added an "animated" key to VisitProposal. This is a first step towards allowing native clients to use custom animations while TurboNavigator handles hierarchy.
  • Finally, when routing, I've added an options parameter. This is useful when you want to override the options given from the path config dynamically.

Happy to hear any feedback.

Copy link
Member

@joemasilotti joemasilotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I made one code style suggestion and one API suggestion. Let me know what you think. Otherwise, this LGTM.

Comment on lines +64 to +70
var animated: Bool {
if let animated = parameters?["animated"] as? Bool {
return animated
}

return true
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var animated: Bool {
if let animated = parameters?["animated"] as? Bool {
return animated
}
return true
}
var animated: Bool { parameters?["animated"] as? Bool ?? true }

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to keep it as-is since it's consistent across all other functions in the file.

Source/Turbo Navigator/TurboNavigator.swift Outdated Show resolved Hide resolved
@joemasilotti joemasilotti merged commit 93af6fd into turbo-navigator May 15, 2024
1 check passed
@joemasilotti joemasilotti deleted the options-when-routing branch May 15, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants