Background
In V2 of Year in review, there was a slide that shared what day of the week users open the app the most. We want to expand this slide to include time of day and month insights.
Task
- Create a slide for Logged-in users agnostic of Wiki that shows the following insight:
- The time of day the user likes to read (time of day is not dependent on day of the week)
- The day of week the user likes to read
- Month user read the most
- Time buckets should be as follows
- Morning (5:00AM-11:59PM)
- Midday (12:00PM-12:59PM)
- Afternoon (1:00PM-4:59PM)
- Evening (5:00PM-8:59 PM)
- Night (9:00PM-11:59PM)
- Late night (12:00AM-4:59AM)
- Include time buckets in translation instructions for this copy
Engineering Notes
- Update YearInReviewMostReadDaySlideDataController's populateSlideData method:
- Modify "most read day" calculation:
- Do not fetch from legacy page views anymore. Instead get data from WMFPageViewsDataController's fetchPageViewDates method.
- Add "Time of day" calculation:
- Fetch all page views from the year from WMFPageViewsDataController. Sort each CDPageView's timestamp into time buckets according to task description, calculate which time bucket had the most page views. Ensure data point gets persisted in slide data.
- Add most-read month calculation:
- Fetch all page views from the year from WMFPageViewsDataController. Sort each CDPageView's timestamp into a particular month, calculate which month had the most page views. Ensure data point gets persisted in slide data.
- Modify "most read day" calculation:
- Create new V3 slide
- We may be able to lean on WMFYearInReviewSlideStandardViewModel + WMFYearInReviewSlideStandardView for this, but if the design proves too tricky (due to font) to fit in the old standard view, we can make a custom WMFYearInReviewSlideV3MostReadDayViewModel + WMFYearInReviewSlideV3MostReadDayView. Ensure new slide is only inserted when V3 developer setting is enabled, otherwise use old slide design and copy for V2. Slides are inserted in the WMFYearInReviewViewModel.
- Ensure sharing individual slide works well
QA Notes
- Delete all Wikipedia apps on device. Fresh install the app (White icon, 7.8.5). Ensure device is logged in.
- Navigate to a bunch of different articles.
- Enable YIR v3 in dev settings
- Navigate to profile
- Year in review
- Scroll through the slides until you see this slide.