8000 MBL-2075: Add Backings dashboard as its own tab by amy-at-kickstarter · Pull Request #2306 · kickstarter/ios-oss · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

amy-at-kickstarter
Copy link
Contributor
@amy-at-kickstarter amy-at-kickstarter commented Feb 26, 2025

📲 What

Add Backings Dashboard as its own tab in the root tab bar controller.

Logged Out Logged In
Screenshot 2025-02-27 at 4 06 05 PM Screenshot 2025-02-27 at 4 06 51 PM

🤔 Why< 8000 /h1>

This is part of the UI updates for PPO V2!

🛠 How

  1. Add new RootViewControllerData type, .backings, and delete old type, .pledgedProjectsAndActivities
  2. Refacto ActivitiesViewController to place an EmptyStatesViewController directly in the tab bar when the user is logged out. Then do the same thing for PPOContainerViewController 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.
  3. Update PPOContainerViewController to remove the top paged controller
  4. Temporarily disable badging on the PPO tab. Badging will be addressed in a follow-up ticket (MBL-2151), to keep this manageable.

@amy-at-kickstarter amy-at-kickstarter force-pushed the feat/adyer/mbl-2075/add-tab branch 3 times, most recently from f11a6b7 to 4e1694d Compare February 27, 2025 20:42
@amy-at-kickstarter amy-at-kickstarter changed the title Feat/adyer/mbl 2075/add tab MBL-2075: Add Backings dashboard as its own tab Feb 27, 2025
@amy-at-kickstarter amy-at-kickstarter force-pushed the feat/adyer/mbl-2075/add-tab branch from 4e1694d to a40a305 Compare February 27, 2025 21:26
@@ -5,14 +5,13 @@ import Library
import Stripe
import SwiftUI

public class PPOContainerViewController: PagedContainerViewController<PPOContainerViewController.Page>,
Copy link
Contributor Author

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.

Copy link
Contributor

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!

Copy link
Contributor

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):
Copy link
Contributor Author

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.

@amy-at-kickstarter amy-at-kickstarter marked this pull request as ready for review March 3, 2025 16:03
Copy link
Contributor
@scottkicks scottkicks left a 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>,
Copy link
Contributor

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
Copy link
Contributor

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>,
Copy link
Contributor

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

Comment on lines +288 to +291
case .backings(isLoggedIn: false):
// Backings and Activity use the same empty state
fallthrough
case .activities(isLoggedIn: false):
Copy link
Contributor

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."
Copy link
Contributor

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])
}
}
/*
Copy link
Contributor

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.

@amy-at-kickstarter amy-at-kickstarter marked this pull request as draft March 6, 2025 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0