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-1207] Pledge Button on Project Page #1951
Conversation
dec8fbe
to
60ebf16
Compare
60ebf16
to
8147602
Compare
8147602
to
7cd834a
Compare
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 like where this is headed, but I have some concerns. I've left comments. Also, I'm confused about this line: "If the user has already backed it, they'll see the normal "View Rewards" CTA" - if a user has backed a thing, they shouldn't see a "view rewards" CTA - they should see a "view your pledge" button. Can you make sure you test this scenario, if you haven't already?
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.
Just one question but otherwise it looks good!
case (.successful, .errored): | ||
case (.successful, _, true): | ||
return .viewBacking | ||
case (.successful, .errored, _): |
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 could be wrong here, but I think a user could have an errored backing even if the project is in a post campaign state. If that's the case, we'd want to check the errored case first, in which case I don't think we actually need any custom post campaign logic at all?
this applies to PCP campaigns that backers have already pledged to
📲 What
Updates the pledge button on project pages to say "Back this project" when a campaign has Post-Campaign Pledging (PCP) enabled and is actively accepting late pledges.
In addition, I also made sure that the correct pledge button shows on rewards when in a PCP state. Right now, if a project isn't live or has already been backed, we don't show anything. Now, the pledge button will show when in an active PCP state if the user hasn't already backed.
If the user has already backed it, they'll see the normal "view your pledge" CTA that presents users with their pledge info.
🤔 Why
If PCP is disabled and a user has backed the campaign, we show a “View Rewards” button. For this feature, we want backers to be able to pledge post a successful campaign. It's important to note that backers should never be able to pledge more than once to any campaign
🛠 How
Let’s use the feature flag and the new PCP properties on the project fragment to gate this new behavior.
👀 See
Designs
✅ Acceptance criteria