####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
- "I already contribute" and "Done" should dismiss and show the survey (survey will be done as a part of T376319)
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
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" that launches in-app donation flow (in similar placement to "Report a bug" on the Help and Feedback webview of the FAQ page)
- 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
####Designs
Language may be updated once reviewed by Fundraising
| Collective | Personalized | Webview (more specific mockup coming)
| {F57634832} | {F57634829} | {F57634860}
####Engineering Notes
Both:1. Create two new slide variants. One with the donate button hidden and a "Finish" button instead of "Next'. Another variant with the Share and Next buttons hidden, and large "Learn more about our work" and "I already contribute" buttons above the paging indicators. These buttons should be pinned with the content scrolling underneath.
- Modify existing slide UI component (created in T375566) to allow configuration options to show this slightly different design (top left donate button hidden,2. large "donate now" and "not now" buttons at bottom for personalizedUpon app resume method, top left donate button hidden,pull persisted slide item object for this slide identifier. "Finish" text for collective).
Collective:
- Attach donate logic to closing screenIf evaluated = no AND remote config does not have a personalized slide kill switch, grab the number of persisted donations that were saved that year. If they tap Donate//Also// grab the number of edits that were made that year via an API call (we should do this part after T376320, ask donate coordinator to start,which adds in all the difficult work of fetching their year's worth of edits and persisting). ensure button target rect is passed along. TurnThen set “evaluated = yes”. Set display = yes if user has donate button into spinner while it fetches configs.
Personalized:d at all that year, OR they have edits.
- (data half) Upon app resume method,3. Ensure that when we create the view models before presenting slides (see T376044), fetch the persisted model from previous bullet point. If display = yes, add a "Thank you for your contribution" slide variant at the end. pull persisted slide item object for this slide identifier.Otherwise, If evaluated = no AND remote config does not have a personalized slide kill switch,add the "0 ads served on Wikipedia" slide variant at the end.
4. grab the number of persisted donations that were saved that year.Upon tapping "Finish", //Also// grab the number of edits that were made thatdismiss year via an API call (we should do this part after T376320,in review. which adds in all the difficult work of fetching their year's worth of edits and persisting)Present survey if we have completed T376319 already.
5. Then set “evaluated = yes”Create a new SinglePageWebViewController subclass (reference HelpViewController) with a bottom toolbar that has a "Donate" button. Set display = yes if user has dUpon tap of Donated at all that year button, OR they have editsperform donate configuration fetch (change button to spinner during this) and kick off navigation to the donate flow using the DonateCoordinator.
- (UI half) Ensure that when we create the 6. Upon tapping "Learn more about our work", dismiss Year in Review models before presenting slides (see T376044),and push on web view created in previous item. fetch the persisted model from previous bullet pointSet some flag (maybe in YearInReviewCoordinator) that year in review needs to deep link to the last slide when it's next presented.
7. If display = yesUpon tapping "Back" in new web view in #5, build a slide ask Year in Review model fcoordinator this data (using the report model's metadata)o present again if it needs to. Ensure slide view modelthe last slide is inserted into the correct order,displayed upon presentation. and that associated collective "fallback" slide is NOT inserted.Reset flag from previous item after presentation.