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-1209] Select Your Reward Title #1952

Merged
merged 10 commits into from Feb 22, 2024
Merged

Conversation

scottkicks
Copy link
Contributor

@scottkicks scottkicks commented Feb 21, 2024

πŸ“² What

Adds "Select your reward." to Rewards views if post campaign feature flag is on

  • We decided that this will get rolled out to all projects so I didn't also gate this behind the pcp project properties.

πŸ€” Why

With the new PCP flow having an additional "Confirm details" screen, design has decided that it'd be beneficial to title each page to provide users with more context.

πŸ›  How

Adds a header to the RewardsCollectionView.

Note that there is a touch more space between the rewards options and the title than the designs suggest. This is because each reward moves up slightly when scrolling through their details. Designs didn't catch that edge case and will update the figma soon.

The title string is hardcoded for now and will need to be updated once all copy translations are in. I've added a comment with the ticket to address that.

πŸ‘€ See

Simulator Screen Recording - iPhone 15 Pro - 2024-02-21 at 13 12 58

βœ… Acceptance criteria

  • New title appears when viewing rewards and matches the designs

@scottkicks scottkicks changed the title add title to rewards collection view [MBL-1209] New Rewards View Title Feb 22, 2024
@scottkicks scottkicks changed the title [MBL-1209] New Rewards View Title [MBL-1209] Select Your Reward Title Feb 22, 2024
@kickstarter kickstarter deleted a comment from nativeksr Feb 22, 2024
@scottkicks scottkicks marked this pull request as ready for review February 22, 2024 16:29
@scottkicks scottkicks requested review from a team and ifosli and removed request for a team February 22, 2024 16:29
Copy link
Contributor

@ifosli ifosli left a comment

Choose a reason for hiding this comment

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

A few things, none of which need to block this pr, but which I think we need to iron out before the feature is rolled out. I'm particularly concerned that adding a title will make landscape mode unusable for this screen, especially for accessible font sizes.


if featurePostCampaignPledgeEnabled() {
let topSafeAreaInset = self.view.safeAreaInsets.top
let topInset = self.headerView.frame.height - topSafeAreaInset + Styles.grid(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a little confused - what's the point of manually calculating the top inset here instead of using auto layout to set the top of the collection view to below the header? I think constraints are generally cleaner, though we'd have to do some truncate to bounds stuff that might complicate it. I'm also a little concerned that manual calculation would do weird things if the user changes the font size (but our app in general does weird things here, so I don't think that needs to be a blocker)

self.headerView.leftAnchor.constraint(equalTo: self.view.leftAnchor).isActive = true
self.headerView.rightAnchor.constraint(equalTo: self.view.rightAnchor).isActive = true
self.headerView.topAnchor.constraint(equalTo: self.view.topAnchor).isActive = true
self.headerView.widthAnchor.constraint(equalTo: self.view.widthAnchor).isActive = true
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Does the width anchor do anything when we already have left and right? Also, the height is underconstrained - does it give a build warning? If it does, can you add a height constraint and just set it to the intrinsic content size?

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 was seeing issues originally, but it looks like now that I'm setting the collectionView's topAnchor directly, that issue has been fixed 🀷 .

private let labelStyle: LabelStyle = { label in
label
|> \.numberOfLines .~ 1
|> \.lineBreakMode .~ .byTruncatingTail
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure we should be truncating this? My general ux experience says that strings we provide should never be truncated. Happy to follow what UX recommends, but please double check to make sure. I really think we shouldn't truncate it at all. (Though it might be worth asking Alison what she thinks the UX should look like in ex german with the largest font size - does adding a title make the screen unusable, especially in landscape mode?)

@scottkicks
Copy link
Contributor Author

@ifosli I tested landscape mode in a few device sizes but didn't consider testing different languages or larger accessibility fonts. Thanks for calling that out! I think I addressed all of your concerns. Next time, I'll try to remember to add a screen recording of landscape so that it's clear.

@scottkicks scottkicks merged commit 8b0ec10 into main Feb 22, 2024
5 checks passed
@scottkicks scottkicks deleted the mbl-120/rewards-screen-title branch February 22, 2024 21:51
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