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.
Subtasks
T378838: [M] Donate Slide - Display personalized or collective slide
T378839: [M] Donate slide - push to Learn More web view
{T378842}
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
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. Nice-to-have: remove donation button from this version
Create Webview of MediaWiki "Learn more" page
- "Learn more about our work" on both slides launches an in-app webview of the MediaWiki page: https://www.mediawiki.org/wiki/Wikimedia_Apps/About_the_Wikimedia_Foundation
- In-app webview should contain link at bottom "Donate now", if they are coming from the collective version, that launches in-app donation flow
- The MediaWiki page should be displayed in the user's language (if they are viewing Year in Review in Italian, the mediawiki page should automatically show them the italian version: https://www.mediawiki.org/wiki/Wikimedia_Apps/About_the_Wikimedia_Foundation/it. If that page does not exist, it should fall back to English.
- Navigating "Back" from Webview should land the user back on the Collective/Personalized donation slide
Add donate slides to Config
- Allow us to toggle the donation slides (one setting for both collective and personalized) on and off if needed. We want to be able to support a situation where we want to hide the donation slides from a list of countries
Designs (Figma)
Collective Flow (Non-donor)
Personalized Flow (donor)
Engineering Notes
Note: Crossed out sections represent remote config adjustments that do not need to be made until after V1.
- 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).
2. Update remote feature config to allow for both personalized slides and collective slides. Each slide will have an isEnabled switch and an "excludeCountries" array. Update existing slide code to check for these things.
- Upon app resume method, create persisted slide object for
both the personalized slide and collective slidepersonalized donate slide. Set slide data, and evaluated/display flags if there is local donation history.Reference exclude countries array when setting display as well. - Ensure that when we create the view models before presenting slides (see T376044), fetch the persisted model from previous bullet point. Insert the personalized or collective slide view models depending on their persisted slide display values.
- Upon tapping "Finish", dismiss year in review. Ensure survey is still presented properly if we have completed T376319 already.
- 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).
- Upon tapping "Learn more about our work", present SinglePageWebViewController with https://www.mediawiki.org/wiki/Wikimedia_Apps/About_the_Wikimedia_Foundation url, set needsDonateOverlay property to true.
- 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.





