####Background
The Apps team plans to explore if a personalized Wikipedia 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
- Total edits made on Wikipedia globally (since registration date)
- Show registration date
- Only display if user has more than 1 or more edits
- Only show to logged-in users
- If user has no edits, or is not logged in, show collective slide
Nice to have
- Show primary language code in dynamic illustration
####Designs
| {F57583385} | {F57584075}
| Personalized | Collective |
####Engineering Notes
- (data prework) The next bullet point assumes we will fetch and persist user's edits for the year via [[ https://www.mediawiki.org/wiki/API:Usercontribs | the user contributions paged [[ https://www.mediawiki.org/wiki/API:Usercontribs | API ]] ]]. Before we do this, we should first pick up the XTools spike (T373569) and see if there's a cleaner endpoint (without paging) that gives us an edit count for the year.
- (data half) Note: here we are assuming we are only pulling a count for the primary app language using the user contributions API. Upon app resume, pull persisted slide item object for this slide identifier. If evaluated = no, they are logged in, AND remote config does not have a personalized slide kill switch, proceed with fetching and persisting their edit data using (user contributions [[ https://www.mediawiki.org/wiki/API:Usercontribs | API ]]) in Core Data (use WMFData Core Data stack from T370216). Note we may need to page multiple times of 500 edits, so we should reference remote config max pages (T376040). Keep track of number of pages as we fetch. If next page exceeds remote config max page, persist continue ID from last page. Continue to keep evaluated = no, display = no for slide model. The next time app resumes, be sure we send in the continue ID so we fetch the next round of pages. When we have reached the last page for the year, save edit page, then count up all persisted edits from the year and save as slide model metadata. Then set evaluated = yes. If edit count > 0, set display = yes.
- (UI half) Ensure that when we create the view models before presenting slides (see T376044), fetch the persisted model from previous bullet point. If display = yes, build a slide view model for this data (using the report model's metadata). Ensure slide view model is inserted into the correct order, and that associated collective "fallback" slide is NOT inserted.