Page MenuHomePhabricator

[M] Donate slide - push to Learn More web view
Closed, ResolvedPublic

Description

Background

The Apps team plans to explore if a personalized Wikipedia Year in Review feature that displays insights about a user's reading history, editing history, and donation history is engaging for App users, and inspires them to make a donation to the Wikimedia Foundation.

Requirements

Note: This ticket will be mostly blocked until T378838 is completed.

Create Webview of MediaWiki "Learn more" page

Engineering Notes

  1. In SinglePageWebViewController, add a property needsDonateOverlay boolean property. If this property is true, add donate button overlay upon SinglePageWebViewController appearance. Note, we already have a donationCompleteButtonContainer and donationCompleteButton (this displays "Return" on the thank you page) that we can reference, but I would like to set these up as new computed UI properties. Display this button in SinglePageWebViewController's viewDidAppear if property is true (reference setupDonationCompleteView for how to add the overlay to the hierarchy).
  1. Upon tapping "Learn more about our work" in T378838, present SinglePageWebViewController with https://www.mediawiki.org/wiki/Wikimedia_Apps/About_the_Wikimedia_Foundation url, set needsDonateOverlay property to true.
  1. When Donate button from step 5 is tapped, create a DonateCoordinator instance and call it's start method. You may need to send in a block that sets the donate overlay button to a spinner, as well as send in the button rect target. The rest of the donate flow should work from this point on.

Event Timeline

HNordeenWMF triaged this task as Medium priority.Nov 1 2024, 6:32 PM

@scblr This will be in Experimental build #191 for design review. Note that the personalized donation slide calculation (using the local donation count) is treated similarly as the other slides. Be sure to donate before enabling the year in review feature toggle in donation settings.

I also added a "Bypass donation" developer settings toggle. With this, our code avoids making a real donation. This allows us to test the flow without actually charging our card.

One more thing: I had trouble displaying the heart next to the "Donate now" button. This is how it looks so far:

Screenshot 2024-11-05 at 6.01.41 PM (1×559 px, 255 KB)

Specific test steps:

  1. Fresh install app, ensure you are in the correct device region and primary app language. Ensure you are logged into an account with edits on that primary app language.
  2. Go to developer settings. Enable bypass donation toggle. Go to Donate item in profile, make a fake donation.
  3. Go to developer settings, enable YiR feature toggle. Background and foreground app.
  4. Go through Year in Review. Confirm last slide looks correct (should be personalized slide, "Thank you for your contribution". Button should say "Finish" instead of "Next" and red donate button should be hidden.
  5. Tap "Learn more" link in text. In-app web view should present.
  6. Repeat steps 1-5, but skip step 2.
  7. Now collective donate slide should appear ("0 ads..."). Red donate button should remain. Button should still say "Finish" instead of "Next.
  8. Tap "Learn more" link in text. In-app web view should present, with a "Donate now" button overlay.

It looks good @Tsevener – I guess the heart is a nice to have then!