Page MenuHomePhabricator

[M] Donate Slide - Display personalized or collective slide
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

Create collective slide

  • Display if we do not have a donation stored for the user
  • "Donate" in top left corner launches donation flow similar to other slides
  • "Done" and "Finish" should dismiss and show the survey (survey will be done as a part of T376319)
  • Link in text "Learn more about what we do" launches in-app webview with donation button (will be done in a different subtask)

Create personalized slide

  • Display if we do have a locally stored donation for the user
  • "Finish" and "Done" should lead to the survey (survey will be done as a part of T376319)
  • Link in text "Learn more about what we do" launches in-app webview. (will be done in a different subtask)
  • Nice-to-have: remove donation button from this version
Engineering Notes
  1. Allow the slide UI component to display links in the body text. It may just be a matter of passing in markup (see Apple pay form fine print code). Ensure link uses correct link blue color for theming.
  2. Upon app resume method, create persisted slide object for personalized donate slide. Set slide data count value of local donation history count. Set evaluated = true, set display = true if count > 0.
  3. When we create the view models before presenting slides (see T376044), fetch the persisted model from previous bullet point. Insert the personalized slide if display = true, otherwise insert the collective slide.
  4. Upon tapping "Finish", ensure year in review is dismissed. Ensure survey is still presented properly.

Event Timeline

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

@scblr This will be in Experimental build #191 for design review. Note that personalized donation slide determination (i.e. local donation count) is treated similarly as the other slides. That is, 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.

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.

Thanks @Tsevener

  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.

✅ ✅ ✅

  1. 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.
  • ❌ After the fake donation, I still see the global slide: (0 ads served on Wikipedia)
  • ✅ Button should say "Finish" instead of "Next
  • ❌ red donate button should be hidden → the donate button should be consistently displayed (even if you donated, I checked with @HNordeenWMF)
  1. Tap "Learn more" link in text. In-app web view should present.

❌ It looks good, but the blue donate button at the bottom shouldn’t appear (because I’m only seeing unpersonalized slide).

  1. Repeat steps 1-5, but skip step 2.

✅ ✅ ✅

Now collective donate slide should appear ("0 ads..."). Red donate button should remain. Button should still say "Finish" instead of "Next.

❌ I couldn’t trigger the personalized donate slide, even with multiple fake donations.

Tap "Learn more" link in text. In-app web view should present, with a "Donate now" button overlay.

✅ Works!

@scblr @Tsevener if it's already built this way to hide the Red donate for the "Thank you for your contribution" personalized slide, it's fine to keep it that way.

@HNordeenWMF sorry for the confusion, I probably mis-interpreted this requirement:

Nice-to-have: remove donation button from this version

For the personalized slide, I removed both the red donate button and the 'learn more' web view donate button.

@scblr Sent you a video of what I'm seeing with the personalized slide. Let's hash this out tomorrow!

I managed to get it to work @Tsevener — I bypassed donations with Apple Pay before (it didn’t work).

The slide looks good to me, except for the gradient it uses. Likely, @GOlson-WMF is already working on it, as we discussed on Slack yesterday. For the sake of completion, this would be the new gradient for both donation slides:

7-Thank you for your contribution.jpg (524×786 px, 285 KB)