-
Notifications
You must be signed in to change notification settings - Fork 1.2k
MBL-2075: Add Backings dashboard as its own tab #2306
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
base: main
Are you sure you want to change the base?
Conversation
f11a6b7
to
4e1694d
Compare
- Disable badges temporarily - Fix failing tests - Delete unused tab bar item type
4e1694d
to
a40a305
Compare
@@ -5,14 +5,13 @@ import Library | |||
import Stripe | |||
import SwiftUI | |||
|
|||
public class PPOContainerViewController: PagedContainerViewController<PPOContainerViewController.Page>, |
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 didn't delete PagedContainerViewController
- I suspect it will come back into use soon enough. I set myself a calendar reminder for +3 months to delete it if nobody has needed it by then.
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.
For PLOT we started a plot-tech-debt epic early on to help track stuff like this. Totally up to you though!
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.
Ticket would be ideal yeah
return BackerDashboardViewController.instantiate() | ||
case .profile(isLoggedIn: false): | ||
return LoginToutViewController.configuredWith(loginIntent: .loginTab) | ||
case .backings(isLoggedIn: false): |
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.
This is the main change here - logged out users will see the EmptyStatesViewController
, installed directly in the tab.
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.
Nice one! LGTM 👍
Just a couple of minor non-blocking comments
@@ -5,14 +5,13 @@ import Library | |||
import Stripe | |||
import SwiftUI | |||
|
|||
public class PPOContainerViewController: PagedContainerViewController<PPOContainerViewController.Page>, |
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.
For PLOT we started a plot-tech-debt epic early on to help track stuff like this. Totally up to you though!
@@ -205,6 +205,8 @@ public final class RootTabBarViewController: UITabBarController, MessageBannerVi | |||
switch item { | |||
case let .home(index): | |||
_ = self.tabBarItem(atIndex: index) ?|> homeTabBarItemStyle | |||
case let .backings(index): | |||
_ = self.tabBarItem(atIndex: index) ?|> backingsTabBarItemStyle |
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.
Is it worth moving away from prelude operators like this as we come across them?
@@ -5,14 +5,13 @@ import Library | |||
import Stripe | |||
import SwiftUI | |||
|
|||
public class PPOContainerViewController: PagedContainerViewController<PPOContainerViewController.Page>, |
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.
Ticket would be ideal yeah
case .backings(isLoggedIn: false): | ||
// Backings and Activity use the same empty state | ||
fallthrough | ||
case .activities(isLoggedIn: false): |
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.
Can this be replaced with case .backings(isLoggedIn: false), .activities(isLoggedIn: false):
? Makes it a little clearer that both of these cases go to the same place.
self.setBadgeValueAtIndexValue.assertLastValue("", "Turning on PPO should show empty badge icon") | ||
self.setBadgeValueAtIndexValue.assertLastValue( | ||
nil, | ||
"Turning on PPO should show a badge, eventually, but that is coming in a follow-up PR." |
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.
Add a FIXME that links to the ticket that will fix this so it can be searched for more easily
self.setBadgeValueAtIndexIndex.assertValues([1, 1]) | ||
} | ||
} | ||
/* |
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.
Instead of commenting this out, can you change the function signature to func disabled_ testPPOTabBarBadging_FeatureFlagEnabledWithoutPersistence() { … }
or something like that? It'll leave the code present (so the compiler can check it and any refactors will be able to pick it up) but the unit tests wont run.
📲 What
Add Backings Dashboard as its own tab in the root tab bar controller.
🤔 Why< 8000 /h1>
This is part of the UI updates for PPO V2!
🛠 How
RootViewControllerData
type,.backings
, and delete old type,.pledgedProjectsAndActivities
ActivitiesViewController
to place anEmptyStatesViewController
directly in the tab bar when the user is logged out. Then do the same thing forPPOContainerViewController
in its new tab. Adding the empty state controller directly to the tab bar ensures the layout is identical between the Backings and Activity tabs.PPOContainerViewController
to remove the top paged controller