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 when they most frequently read articles
Requirements
- Surface day of the week that contained the most articles in their in-app history
- Only display the personalized version of this slide if a user has more than 5 articles in their history, and has a day of the week where they have read more than 1 article. If they do not meet these requirements, show the collective slide
Designs
| Personalized | Collective |
Engineering Notes
- (data half) Ask Toni to add mostReadDay slide to remote config. Update remote config model to deserialize the object with the new key.
- (data half) Add a new method in WMFPageViewsDataController that returns an array of page view dates, filtered by a start and end date passed via a parameter.
- (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). Pull a list of page view dates by calling the new WMFPageViewsDataController method created in step 2. Pass in the start and end date from the remote config data population dates.
- From this list of dates, determine which day of the week is most common. You may be able to use the weekday format style to turn a Date type into a weekday number for counting. Save final weekday determination as metadata for that slide item. Then set “evaluated = yes” for that slide object. Pull the total number of articles read that year by calling WMFPageViewsDataController's fetchPageViewCounts method (pass in remote config start date and end date). Set slide's "display = yes" for that slide object if total number of articles read that year > 5, and if weekday determination had more than one article read that weekday.
- (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 weekday). Ensure slide content model is inserted into the correct order when building up WMFYearInReviewViewModel in the coordinator's start() method.

