-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[NT-513] Project page creators header navigation #933
Conversation
…project-page-creators-header-navigation
@@ -186,7 +186,8 @@ public final class RootTabBarViewController: UITabBarController { | |||
private func viewControllerAndParam<T, P>(with index: RootViewControllerIndex, param: P) -> (T, P)? { | |||
guard | |||
let vcs = self.viewControllers, | |||
let vc = vcs[clamp(0, vcs.count - 1)(index)] as? T | |||
let nav = vcs[clamp(0, vcs.count - 1)(index)] as? UINavigationController, |
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.
The self.viewControllers
is actually an array of UINavigationController
. Now we first try to cast to UINavigationController and then cast the viewController to whichever type it is.
This was breaking the navigation to the dashboard when trying to navigate to it through deeplink.
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.
Lgtm! Just that one suggestion about naming.
@@ -11,9 +11,9 @@ private enum Layout { | |||
} | |||
|
|||
protocol ProjectPamphletCreatorHeaderCellDelegate: class { | |||
func projectPamphletCreatorHeaderCellDidTapButton( | |||
func projectPamphletCreatorHeaderCell( |
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.
I would rename this to something like projectPamphletCreatorHeaderCellDidTapViewProgress(_ cell: ProjectPamphletCreatorHeaderCell, with project: Project)
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.
Good suggestion! I will change that.
…project-page-creators-header-navigation
SwiftFormat found issues:
Generated by 🚫 Danger |
📲 What
View progress
button on theProjectPamphletContentViewController
to the dashboard.🤔 Why
JIRA ticket
🛠 How
ProjectPamphletContentViewController
when the creator taps theView progress
button.RootTabBarViewController
that was trying to cast UINavigationController to a generic typeT
. This was causing the guard statement to fail making the Dashboard present showing the wrong project.👀 See
✅ Acceptance criteria
Help me transform this pile of wood
)View dashboard
. The ProjectPage should dismiss and the Dashboard should be presented with the selected project.