####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 "Finish" 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 ([[ https://www.figma.com/design/JRTyGA3rZ0qlQ9eqh0FMhE/iOS---Wikipedia-YiR?node-id=1399-6683&node-type=frame&t=NaVYcfINZYDH6iKh-0 | Figma ]])
| Collective | Personalized | Webview | Donating from Webview
| {F57656863} | {F57656867} | {F57643039} | {F57643042}
####Engineering Notes
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.
2. Upon app resume method, pull persisted slide item object for this slide identifier. If evaluated = no AND remote config does not have a personalized slide kill switch, grab the number of persisted donations that were saved that year. //Also// grab the number of edits that were made that year via an API call (we should do this part after T376320, which adds in all the difficult work of fetching their year's worth of edits and persisting). Then set “evaluated = yes”. Set display = yes if user has donated at all that year, OR they have edits.
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. Otherwise, add the "0 ads served on Wikipedia" slide variant at the end.
4. Upon tapping "Finish", dismiss year in review. Present survey if we have completed T376319 already.
5. Create a new SinglePageWebViewController subclass (reference HelpViewController) with a bottom toolbar that has a "Donate" button. Upon tap of Donate button, perform donate configuration fetch (change button to spinner during this) and kick off navigation to the donate flow using the DonateCoordinator.
6. Upon tapping "Learn more about our work", dismiss Year in Review and push on web view created in previous item. Set some flag (maybe in YearInReviewCoordinator) that year in review needs to skip to the last slide when it's next presented.
7. Upon tapping "Back" in new web view in #5, ask Year in Review coordinator to present again if it needs to. Ensure the last slide is displayed upon presentation. Reset flag from previous item after presentation.
//TS Sidenote: If we are able to skip immediately to the last slide here, I think we should put in similar logic in whenever a user taps "Donate" on any slide, so that they are linked straight to the slide they left off on when they finish the donate flow. That work should be done in a separate task.//