Page MenuHomePhabricator

[L] Update history tab so that it can contain the same article multiple times
Closed, ResolvedPublic

Description

Background
Our first version of year in review showed how many articles you had read in each category by looping through your history tab. Each time a user views an article, we record it with the date last accessed, overriding the previous date if the person has viewed it before. We aren't currently able to surface to users how many times they viewed different articles, or their most viewed articles overall. This functionality would be useful for the upcoming version of Apps Year-in-Review, if it is implemented ahead of time.

User story
As a frequent app user, I want to see know what my personal Top-read articles were from the past year in Year-in-Review, so I can share with friends and gain insights about my own Wikipedia usage.

Requirements

  • The history tab should be able to record multiple visits to the same article
  • This information should be query-able for future use in the Year-in-Review feature

Engineering Notes
Considering this and the related source data to add (T372801), I think it would be good to store these viewed records in a separate database table rather than messing with the high-risk WMFArticle entity.

This will involve creating a new Core Data stack (a WMFCoreDataStore class) in WMFData. The large estimate is mainly based on unfamiliarity with Core Data in that context.

QA Notes

This can't be tested yet via UI in the app. Regression test of launch times (especially upgrading from 7.6.0 on an app that has a large history).

Event Timeline

HNordeenWMF moved this task from Needs Triage to Up next on the Wikipedia-iOS-App-Backlog board.
HNordeenWMF renamed this task from Update history tab so that it can contain the same article multiple times to Update history tab so that it can contain the same article multiple times & a source .Aug 13 2024, 9:16 PM
HNordeenWMF renamed this task from Update history tab so that it can contain the same article multiple times & a source to Update history tab so that it can contain the same article multiple times.Aug 19 2024, 4:38 PM
Tsevener renamed this task from Update history tab so that it can contain the same article multiple times to [L] Update history tab so that it can contain the same article multiple times.Aug 28 2024, 7:57 PM

@HNordeenWMF We were wondering when estimating this - is it important that the user sees multiple rows of the same article in the History tab, or can we leave the History tab as-is but collect the viewed data for Wikiwrapped separately (which will consider article revisits)? @GOlson-WMF pointed out that it may appear buggy and annoying if a user checks out the same article multiple times in one day.

HNordeenWMF raised the priority of this task from Low to Medium.Aug 29 2024, 5:59 PM

@Tsevener apologies that I missed this question: it does not need to update to show multiple rows for the user as long as it's happening on the backend.

This is very nearly done (progress in viewed-articles-coredata branch), just need to write some more unit tests. Pausing to switch to other priorities.

Tsevener updated the task description. (Show Details)
Tsevener updated the task description. (Show Details)