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-1208] Part 4: Continue CTA Section #1980

Merged
merged 3 commits into from
Mar 18, 2024
Merged

Conversation

scottkicks
Copy link
Contributor

@scottkicks scottkicks commented Mar 18, 2024

πŸ“² What

Adds the CTA section to the bottom of the screen.
Includes a continue button that will navigate to the final checkout screen and displays the current pledge total.

πŸ€” Why

We need a way to confirm pledge details.

πŸ›  How

creates a new ConfirmDetailsContinueCTAView and adds it to ConfirmDetailsViewController following the designs: https://www.figma.com/file/sFfDKxlJ2tiuq1xgIsaoiI/Late-Campaign-Backings?type=design&node-id=73-5025&mode=design&t=4iAXblqSygfASSvB-0

πŸ‘€ See

Simulator Screen Recording - iPhone 15 Pro - 2024-03-18 at 08 29 04

βœ… Acceptance criteria

  • CTA section matches designs
  • Continue button doesn't do anything yet
  • The pledge total is only displayed if the rewards summary table is displayed
  • The pledge total updates appropriately when bonus, pledge, and shipping updates are made

@scottkicks scottkicks self-assigned this Mar 18, 2024
@scottkicks scottkicks requested review from a team and ifosli and removed request for a team March 18, 2024 13:37
@scottkicks scottkicks marked this pull request as ready for review March 18, 2024 13:37
Copy link
Contributor

@amy-at-kickstarter amy-at-kickstarter left a comment

Choose a reason for hiding this comment

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

LGTM with a few non-blocking suggestions.


private enum Layout {
enum Button {
static let minHeight: CGFloat = 48.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this not in our design system somewhere?


_ = self.continueButton
|> greenButtonStyle
|> UIButton.lens.title(for: .normal) %~ { _ in Strings.Continue() }
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit/non-blocking: Mentioned this in an earlier PR but I'd prefer us to move away from Prelude code in bindStyles whenever we can avoid it.

}
}

private func attributedCurrency(with project: Project, total: Double) -> NSAttributedString? {
Copy link
Contributor

Choose a reason for hiding this comment

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

Extremely teeny nit: This method name would be clearer if it was withProject: instead of just with:

private func attributedCurrency(with project: Project, total: Double) -> NSAttributedString? {
let defaultAttributes = checkoutCurrencyDefaultAttributes()
.withAllValuesFrom([.foregroundColor: UIColor.ksr_support_700])
let projectCurrencyCountry = projectCountry(forCurrency: project.stats.currency) ?? project.country
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we expect this fall-through to ever have to happen? I wonder if we should just change the type of project.currency to be a forced non-nil value, since it would be pretty odd if we didn't have that information from the server.

project,
pledgeTotal
)
.map { project, total in (project, total) }
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: this map is a no-op, I think.

@scottkicks scottkicks merged commit 6684fec into main Mar 18, 2024
5 checks passed
@scottkicks scottkicks deleted the scott/pcb/cta-section branch March 18, 2024 16:09
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.

None yet

2 participants