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. In this slide, we'll show users how many total articles they have saved to reading lists within the App, based on information stored locally on their device, visible on the "Saved" tab.
Requirements
- Total the number of articles a user has saved to their device on reading lists during the period January 1, 2024 - November 1, 2024
- It does not need to include articles that have been un-saved
- Only display the personalized version of this slide if a user has saved more than 3 articles
Nice-to-have
- List out a few of the saved articles (randomly select 3, or choose first 3 alphabetically)
- You have 25 articles saved, including Polar bear, Matterhorn, and Arosa. Each saved article reflects your interests and helps build a personalized knowledge base on Wikipedia.
- Add collective slide for those who aren't eligible for personalized, with content:
- We had over 31.6 Million reading lists. Active iOS App users had over 31.6 Million Reading lists this year. Adding articles to Reading lists allows you to access articles even while offline. You can also log in to sync reading lists across devices.
Designs
Engineering Notes
- (data half) Ask Toni to add savedCount slide to remote config. Update remote config model to deserialize the object with the new key.
- (data half) In the data controller's populateYearInReviewReportData method, follow a similar pattern as the other slides to return a flag if the slide needs population (checking the slide's evaluated and remote config slide's isEnabled flags). If it needs population, call a new method that pulls a count of the user's saved articles from the year. Be sure to filter this count by the remote config's start and end dates, similar to the other slides. Save this count as metadata for that slide item. Then set “evaluated = yes”. Set display = yes if user has saved any articles that year.
- (UI half) In the getPersonalizedSlides method of YearInReviewCoordinator, fetch the persisted model from previous bullet point. If display = yes, build and return a YearInReviewSlideContent model for this data (using the report model's metadata to get the count). Ensure slide content model is inserted into the correct order when building up WMFYearInReviewViewModel in the coordinator's start() method.
Note: The thing that is different about this slide versus other slides (like for example, the reading count slide), is that the saved article data lives in the app-side Core Data stack instead of WMFData's Core Data stack. This means, in step 2 above, the data controller may need to ask a delegate (or call a closure) that returns the saved articles count. From the WMFAppViewController, the total saved articles count (without filtering for start date / end date) can be obtained by calling dataStore.savedPageList.numberOfItems. We will need to create a new method in MWKSavedPageList that allows filtering by start date / end date.
