-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[NT-730] Pledge screen header #1033
Conversation
func snapshotData(withContainerView view: UIView) -> RewardPledgeTransitionSnapshotData? { | ||
return self.descriptionViewController.snapshotData(withContainerView: view) | ||
} | ||
func beginTransition(_: UINavigationController.Operation) {} |
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 deleting all of this code, I decided to keep this structure here since we discussed in standup that we may revisit the custom animation in an Investment Day.
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.
On second thought I think we should remove the animation, I think it's unlikely we'll make it work with this new layout.
Generated by 🚫 Danger |
…starter/ios-oss into NT-730_pledge-screen-header
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.
Looks good! Had one or two questions.
|
||
return .init(width: newWidth, height: newHeight) | ||
} | ||
guard let attributedString = checkoutAttributedLink(with: fullString) else { return nil } |
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 don't think we still want to call checkoutAttributedLink
here because that function is expecting an HTML string.
Where do we set the attributes for the link text, colour etc?
func snapshotData(withContainerView view: UIView) -> RewardPledgeTransitionSnapshotData? { | ||
return self.descriptionViewController.snapshotData(withContainerView: view) | ||
} | ||
func beginTransition(_: UINavigationController.Operation) {} |
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.
On second thought I think we should remove the animation, I think it's unlikely we'll make it work with this new layout.
.skipNil() | ||
.map { project, reward in (project, .init(left: reward)) } | ||
.map { _, reward in reward.title ?? Strings.Back_it_because_you_believe_in_it() } |
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.
Does it make sense to check if title is nil
and also whether its noReward
? Just to be sure 🤔
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.
The NoReward
only contains some of the properties of the Reward
object, and it doesn't have the title
. So the title, in this case, will always be nil
.
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.
Cool cool, removing the use of checkoutAttributedLink
seems to have changed the font style, is this the correct style now? Perhaps we should confirm with @colleenmacd.
There is another file that is no longer need now since we removed the animation called UISpringTimingParameters+Convenience.swift
.
…starter/ios-oss into NT-730_pledge-screen-header
Thanks, @justinswart ! I made a small change on the NSAttributedString and now the style seems correct again. |
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.
Looks good! In the reward container, is the padding between the edge of container and the text 18 dp? Looks a little large but might be my eyes @Scollaco
It is... I double checked it, just in case. |
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.
Good job!
📲 What
🤔 Why
🛠 How
NSAttributedString
extension to make it easier the process to add links (not HTML) to strings👀 See
♿️ Accessibility
🏎 Performance
✅ Acceptance criteria
Go to a live project and choose:
NoReward
reward. The header title should say "Back it because you believe in it, delivery info is
hidden`.hidden
.