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

[MBL-1896] Update status label copy for PLOT-enabled pledges #2222

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

jovaniks
Copy link
Contributor

@jovaniks jovaniks commented Dec 16, 2024

📲 What

This PR updates the status label copy for PLOT-enabled pledges to display the correct payment information, such as the first charge amount and collection date, in the "Manage Pledge" screen.

🤔 Why

For backers using the Pledge Over Time (PLOT) payment plan, it is important to display clear and accurate details about the next payment. Updating the status label copy ensures backers know when the first charge will occur and the corresponding amount, aligning with the PLOT functionality.

🛠 How

  • Since the backing.PaymentIncrements API is not yet available (MBL-1851), a temporary validation has been added for development and testing purposes.
  • The featurePledgeOverTimeEnabled() flag is used to simulate that a pledge is PLOT-enabled.
  • Mock data (mockPledgePaymentIncrement) is used to represent the paymentIncrements list.
    • The first record from paymentIncrements provides the amount and scheduled payment date for the status label.
  • Updated the statusLabelText logic to display the dynamic copy:

    -"You selected Pledge Over Time. If the project reaches its funding goal, the first charge of $20 will be collected on March 15, 2024."

👀 See

Jira

No PLOT After 🦋
Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-16 at 09 52 36 Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-16 at 09 53 48

✅ Acceptance criteria

  • The status label displays the correct copy when featurePledgeOverTimeEnabled() is true.
  • Mock data (mockPledgePaymentIncrement) is used for amount and date for testing purposes.
  • The updated copy dynamically shows the first scheduled payment's amount and date.
  • The copy is not shown for non-PLOT pledges (featurePledgeOverTimeEnabled = false).

⏰ TODO

  • Replace mock data (mockPledgePaymentIncrement) with real backing.PaymentIncrements once the API is available (MBL-1851).
  • Replace the text with translations

@jovaniks jovaniks self-assigned this Dec 16, 2024
Base automatically changed from jluna/MBL-1815/plot-plan-selector-selected-state to main December 17, 2024 20:08
…atus-label

# Conflicts:
#	Kickstarter-iOS/Features/PledgeOverTime/Controller/PledgePaymentPlansViewController.swift
#	Kickstarter-iOS/Features/PledgeOverTime/Controller/PledgePaymentPlansViewControllerTest.swift
#	Kickstarter-iOS/Features/PledgeOverTime/Views/PledgePaymentPlanOptionView.swift
#	Library/ViewModels/NoShippingPledgeViewModel.swift
#	Library/ViewModels/PledgePaymentPlansOptionViewModel.swift
#	Library/ViewModels/PledgePaymentPlansOptionViewModelTest.swift
#	Library/ViewModels/PledgePaymentPlansViewModel.swift
#	Library/ViewModels/PledgePaymentPlansViewModelTest.swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants