Page MenuHomePhabricator

Offer users an ability to see which geography they read about the most
Closed, ResolvedPublic5 Estimated Story Points

Description

Background

In 2025 we would like to offer logged-in users information about which country had the highest concentration of coordinates based on the articles they read that year.

Requirements

  • User must be logged-in
  • This slide is agnostic of primary language
  • User should see for the articles they read for the year, which country are the coordinates for those articles with coordinates are most concentrated next to a specific country
  • Display name of selected country
  • Display articles used to select the chosen country (at least 2)
References

Engineering Notes

  • Create a new slide data controller for populating and persisting this new slide data. Data will need to be fetched from the MWKDataStore+LegacyPageViews.swift file (see yir-2025-explorations branch). Ensure an array of WMFLegacyPageView with location data is persisted with the slide data.
  • Create a new slide using a new view model and view (WMFYearInReviewSlideV3LocationViewModel + WMFYearInReviewSlideV3LocationView). 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.
    • This new slide will need to contain a UIKit Map View that displays as much of the globe as possible.
    • Display a spinner below the map view, where the content of the slide usually appears.
    • When the map view appears, add all location annotations to the map view from the slide data's WMFLegacyPageViews.
    • When map view clusters annotations, grab the cluster annotation that represents the most articles and zoom in on the map to that area.
    • Get an average single coordinate of this larger cluster, then send it into Apple's reverse geocoding API
    • Grab a country or ocean name from the response, then replace the spinner with content - insert the name into the body text title, and insert random article names from the WMFLegacyPageViews into the body text.
    • Note: the yir-2025-explorations branch already does this work, it's just a matter of copy and pasting this logic on top of our latest in main, and possibly tweaking the annotation view colors.
  • Create new sharing view for exporting as an image to share.

QA Notes

  1. Delete all Wikipedia apps on device. Fresh install the app (White icon, 7.8.5). Ensure device is logged in.
  2. Go to Places tab, visit several articles in one area.
  3. Go to developer settings, turn on YiR V3.
  4. Year in Review should show in Profile. Location slide should show.

Event Timeline

Tsevener updated the task description. (Show Details)
Tsevener updated the task description. (Show Details)
Tsevener set the point value for this task to 5.Aug 26 2025, 2:06 PM
Tsevener triaged this task as Medium priority.Aug 27 2025, 6:58 PM

Ready for Design Review! Test Steps:

  1. Fresh install app on Staging build, 7.8.1 (99). Log in.
  2. Go to Places tab and visit a few articles in a particular area.
  3. Go to Developer settings and enable YiR V3 toggle.
  4. Terminate app and relaunch.
  5. Go to Year in Review, you should see location slide.
  6. Tap share, image generated should look good.

Display articles used to select the chosen country (at least 2)

@JTannerWMF

There is an edge case where there are no articles close to each other, so the map view doesn't detect any obvious cluster of articles. In this case I will have to just focus on a single article. It will hopefully be an edge case, but you can play with the design review build to see how you feel about it. Unfortunately I won't know about this situation until it is already rendered on screen, so it will be too late at that point to hide the slide entirely.

hi @Tsevener, i'm not able to review this on build 99 for some reason — i followed all your steps and unfortunately at #5 the Year in Review toggle is not visible in settings:

Settings 6.jpeg (2×1 px, 285 KB)

is there a different build I can look at?

@SChekfa-WMF Sorry about that, can you try these steps instead?

  1. Fresh install app on Staging build, 7.8.1 (99). Log in.
  2. Go to Places tab and visit a few articles in a particular area.
  3. Go to Developer settings and enable YiR V3 toggle.
  4. Go to app Settings > Year in Review > toggle off and back on to regenerate report.
  5. Go to Profile > Year in Review, you should see location slide.
  6. Tap share, image generated should look good.

@Tsevener I tried the new steps and unfortunately i'm still not seeing the toggle : ( maybe it would help to regenerate the build?

@SChekfa-WMF Darn, yeah I'll try that. I'm kicking off Staging 7.8.2 (102). I'll test and send you a screencast too once it's ready.

Was able to sync on this in a meeting with @SChekfa-WMF and have some design review feedback:

  • Shrink body text and header text size
  • Limit scrollable map region to general cluster area (or slightly larger)
  • Decrease padding above header text

@SChekfa-WMF Can give me new specific font sizes for the header / body text and the top padding amount? Thanks.

@SChekfa-WMF New design review build:

Staging 7.8.2 (105):

  1. Delete all Wikipedia apps. Fresh install this Staging build. Log in on device, EN primary app language, US device region.
  2. Go to Places tab, visit several articles.
  3. Go to developer settings, turn on YiR V3.
  4. In Settings, go to Year in Review, toggle off and back on (don't do this too fast).
  5. Year in Review should show in Profile. Go to location slide. Ensure new font sizes / padding look correct. Ensure you can no longer scroll or zoom on map view.

@Tsevener this looks great, TY!

Just a very tiny note on the wording — can we remove the period at the end of the title, and add in a comma after the second list item in the body, so it reads more clearly:

Settings 8.jpeg (2×1 px, 1 MB)

Also just to confirm, is the max amount of articles that can be listed here 3?

@SChekfa-WMF This can be retested in Staging 7.8.3 (106).

Also just to confirm, is the max amount of articles that can be listed here 3?

Correct!

Tsevener renamed this task from Offer users an ability to see which geography they read about the most to Offer users an ability to see which geography they read about the most.Oct 27 2025, 2:33 PM
Tsevener removed Tsevener as the assignee of this task.
Tsevener updated the task description. (Show Details)
ABorbaWMF subscribed.

Appears to be fixed on 7.8.5 (5867)

Tested on iPhone 16 on iOS 26, iPad 12.9 on iPadOS 26, and iPhone 11 on iOS 18. With location on and off.

HNordeenWMF claimed this task.