Page MenuHomePhabricator

[M] Present paging components when tapping Profile item
Closed, ResolvedPublic3 Estimated Story Points

Description

Can pick up after T375566: [L] Year in Review - Build initial paging UI component is complete

Background

The Apps team plans to explore if a personalized Wikipedia Year 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.

Requirements

  • Flow should launch from Profile item "Year in Review"
  • Only users who are eligible for more 1 or more personalized slide should see the entry point (Note: this logic will be handled in T376042)
  • Ensure Next goes to the next component.
  • Dismiss flow when Done is tapped
  • Present "Base flow - No reading or Editing History" slides from collective flow in Figma
  • Use variables for source text of translations, so that statistics can be updated shortly before launch

Engineering Notes

  • Present paging components when tapping Profile item using a coordinator class
  • Before presentation, create a paging component view model item for each collective slide that should be displayed, in the proper order.
  • Note for collective slides, there will be no underlying model data to reference here like with personalized slides - we will just create the copy as literal localized strings here. Use plural formatting when numbers are in the copy (see "Plural syntax" in our localization document). Note that copy for collective slides may be in flux until we get final numbers from Comms.
  • Reference Figma (Base flow - No reading or editing history) to know how many slides to create and which copy to use.
  • Do NOT work on the last slide yet (X.X million contribute). That work will be done as a part of T376073.
  • At this point the correct sorting of collective slides will be determined, depending on our ordering of the slide view models.
  • Note in the future, if we need further flexibility on slide presentation (A/B testing against different sets of slides, different collective slide copy for EN Wiki), this logic will live here when we create the final slide view models.
QA Notes
  • Install app
  • Ensure device region in iOS settings is set to Mexico or Italy
  • Ensure primary app language is set to Spanish, Italian or English
  • Tap through rabbit hole to build up 6+ articles in the History tab if needed
  • Enable year in review feature flag in app developer settings menu
  • Background / foreground the app to trigger report creation.
  • Year in Review entry point should appear in Profile menu
  • Confirm base flow text is correct

Related Objects

Event Timeline

HNordeenWMF lowered the priority of this task from Medium to Low.Sep 30 2024, 5:50 PM
HNordeenWMF updated the task description. (Show Details)
Tsevener renamed this task from Present paging components when tapping Profile item to [M] Present paging components when tapping Profile item.Oct 1 2024, 6:39 PM
Tsevener updated the task description. (Show Details)
HNordeenWMF raised the priority of this task from Low to Medium.Oct 4 2024, 7:35 PM
Seddon set the point value for this task to 3.Oct 9 2024, 12:14 PM
Tsevener updated the task description. (Show Details)

Heads up on this @HNordeenWMF. For now the collective slide text that contains numbers are NOT localized, so translators won't see it pop up yet. After thinking about it, we think it's best if translators translate the entire string ("Wikipedia had 63.59 million articles..." once with the final numbers, with the formatting of their choosing. Our other alternatives were:

  1. Inject a spelled out number (because the system can do that part of the translation for us), so that it looks like:

"Wikipedia had six million three hundred thousand five hundred etc. articles...". Then when we get the final number, we only change the number, and the system injects a new spelled-out translation.

  1. We could have them translate the entire preliminary string now, but then they would have to repeat the work once the final numbers are in.

So the plan is to convert these into localized strings only once the final numbers are ready. The lift to manually add the FR and IT translations in T376417 at that point will still be small.

thanks @Tsevener
Could there be a 3rd option where the source text goes into translate wiki with something like % million (knowing that the word million will not change, and can get translated already, and % is a variable that we define somewhere as the correct number), similar to this one.

Screenshot 2024-10-10 at 5.28.16 PM.png (730×1 px, 176 KB)
? Maybe that is still subject to the issues of #1

@HNordeenWMF I'm unsure of how different languages communicate larger short-form numbers like that. For example, google translate suggests "3.6 million" is "360万" in Simplified Chinese. So it may not be wise at this stage to build in that assumption that there is an equivalent standalone "million" for every language, and adjusting the number later on will still make sense. Tagging @cooltey in case he has thoughts here!

Another part of our hesitation was not knowing if references to "million" or "billion" were static, or if even that could change with the final numbers. So if you're sure those will remain unchanged that leaves less up in the air.

@HNordeenWMF I'm unsure of how different languages communicate larger short-form numbers like that. For example, google translate suggests "3.6 million" is "360万" in Simplified Chinese. So it may not be wise at this stage to build in that assumption that there is an equivalent standalone "million" for every language, and adjusting the number later on will still make sense. Tagging @cooltey in case he has thoughts here!

Another part of our hesitation was not knowing if references to "million" or "billion" were static, or if even that could change with the final numbers. So if you're sure those will remain unchanged that leaves less up in the air.

Hi @Tsevener

We have a function from the Android library that handles this case, please see https://github.com/wikimedia/apps-android-wikipedia/blob/55f6631148303250d6d431c38fb8fbdf6e861bf2/app/src/main/java/org/wikipedia/util/StringUtil.kt#L216-L220

It is only available in a newer version of the Android.

and it's based on the device's language, you can see the differences below:

Screenshot_20241015_111842_Wikipedia Dev.jpg (2×1 px, 108 KB)
Screenshot_20241015_111826_Wikipedia Dev.jpg (2×1 px, 107 KB)

315k = 32 萬, which is not a super accurate but acceptable result.

Sounds good, thanks @cooltey!

@HNordeenWMF @scblr
I made an attempt to localize all the base slide text in my PR for T376066: [M] Article total personalized slide: You read 350 articles (which also displays uses collective base numbers). Once that is in that part of this task will be done ("Use variables for source text of translations"). None of it will be user-facing until translations come through, so T376066 shouldn't block design review on this task.

Quick question @HNordeenWMF:

With these requirements:

Present "Base flow - No reading or Editing History" slides from collective flow in Figma
Only users who are eligible for more 1 or more personalized slide should see the entry point

So far in our latest builds, the base flow is available to see intact for design review / QA. But eventually (once we get personalized slides in), for a user with no personalized data, they will never see the base flow because the entry point will be gone. Is that correct / expected?

@Tsevener yes - that sounds correct. We need to see the base flow right now for testing/QA, but for release users should only be able to see the entry point if they are eligible for at least one personalized slide,

Tsevener added a subscriber: GOlson-WMF.

Looks good - some copy has changed since was made (in 2 places, noted in this task: T377899)