Page MenuHomePhabricator

Add custom contributor app icon section to Settings
Closed, ResolvedPublic3 Estimated Story Points

Description

(Broken off from T402696)

Task

  • Update app theme section of settings to allow editors and app donors to switch between the standard icon or the custom icon.
  • Custom icon feature should last for 1 year from full production release
  • When icon is no longer available fall back to standard icon
  • Editors and donors should have donated within the last calendar year
  • Modify title of view on Settings root view and view navigation bar title from "Reading preferences" to "App theme"

Engineering Notes

  • If the user qualified, add an area in the Settings > Reading Preferences view that lets the user switch app icon choices. Selected app icon must reflect what the user has currently selected and what the app icon shows on the home screen.
  • After 1 year has passed from full production release, we should switch the user back to the standard icon and hide the app icon choice section in Settings > Reading Preferences.

Designs

Note: designs have been modified to a scope-cut that @JTannerWMF ok'ed:

Settings (1).jpeg (2×1 px, 283 KB)

Source: https://wikimedia.slack.com/archives/CEKKLRDT2/p1757514938625719?thread_ts=1757512810.702749&cid=CEKKLRDT2

Note: "Reading preferences" screen in Settings is renamed to "App theme." This reflects Android naming and better suits the properties one can change on the screen, given the inclusion of the app icon here.

    1. Notes
  • Known issue: some devices resize the text in an odd way, including iPhone 16 Plus (this was the only one I could get to do it)
  • Not iPads
  • Not iPhone SE

Test Steps

  1. Fresh install Wikipedia 7.8.5 (latest build)
  2. In an account with no contributions (donations or edits):
  3. Go to Profile -> Settings -> About -> Tap about 7 times to enter Developer Settings
  4. Toggle ON YIR V3
  5. Go back to home screen
  6. Open profile, open year in review
  7. Navigate to the last slide
  8. Ensure that you see the noncontributor slide and are unable to toggle icon.
  9. Navigate away from YIR, go to settings, go to what is now named APP THEME and not READING PREFERENCES
  10. Ensure that you are unable to see anything regarding toggling an icon.
  11. Repeat steps 1-8, log into an account that has donations or edits. Note: to fake a local donation count, you can toggle on "bypass donation" in developer settings, then go through the native apple pay donation flow. It should not charge your card, but will appear to succeed.
  12. Toggle ON YIR V3 in developer settings
  13. Go back to home screen
  14. Open profile, open year in review
  15. Ensure you see the contributor slide and are able to toggle icon, remember what toggle you left it at
  16. Navigate away from YIR, go to settings, go to app theme
  17. Ensure that you now see the toggle and have the ability

Screenshots/Videos

https://drive.google.com/file/d/1D5dj55kgsBrqJxU1zr0iwqmhLyW4I_hw/view?usp=drive_link
^ Try this for the video - (can also upload on Slack, just ping for preference)

Event Timeline

Tsevener triaged this task as Medium priority.

@SChekfa-WMF @JTannerWMF

We were discussing this in Eng Sync and were wondering if we could re-use our list item component instead for this. It would save time in development and also might provide for a smoother selection for users (the i icon looks tiny, and it's on top of an already-tappable button).

This screen is a legacy UIKit view which takes longer for us to build new pieces into, plus new components here would be adding to our tech debt since we'd have to add it to an old framework.

Here's a quick mock-up, I think we could probably get more of a background rounded rectangle for the icons as well, I just didn't want to spend time on that at this stage:

Settings.jpeg (2×1 px, 283 KB)

Estimates:
List version - small 3
Current design - big 5

@Tsevener this is fine with me, thanks for explaining — would it be possible to make the icon tappable to enter a lightbox so that they can see it at a larger size before committing? @JTannerWMF how do you feel about this?

@SChekfa-WMF

would it be possible to make the icon tappable to enter a lightbox so that they can see it at a larger size before committing?

Well, that would probably undo the gains we made by scope cutting. So if the lightbox is a requirement I suggest we stick with the original design.

Hi @Tsevener ! Could you confirm how this slide works? My understanding: showing this slide depends on if the user has a locally stored donation history. That donation history could be from an ApplePay donation OR a WebPay donation (in the way that we track WebPay https://phabricator.wikimedia.org/T376219).

Hi @HNordeenWMF! Just confirming - this task involves changing in Settings, which I am less familiar with. Will let @GOlson-WMF chime in if this question is about Settings.

But for the contributor slide, we show the contributor version if:

  1. The user has donated in the app within the target data collection start/end dates. These are local donation events we keep track of, and we add to them when they donate either via the native apple pay form the in-app web view for other payment methods.
  1. We also fetch their edit counts via the user contributions API for their primary app language. We pass in the appropriate target start/end dates as parameters, as well as a namespace of 0.

If their edit count or donate count from the previous steps is > 0, they see the contributor version of the slide (i.e. with the app icon toggle), otherwise they see the non-contributor version (i.e. without the app icon toggle).

Thanks @Tsevener ! It's about both I guess (I am assuming that if we recognize someone as a Donor/Editor, they get the Settings AND the slide), and if someone is not a donor/editor, the settings item is hidden).

That's what I was looking for - if someone makes a WebPay donation after seeing YiR, our system is equipped to recognize that and offer them the icon in Settings & Year in Review.

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. Tested on all themes

@Tsevener is this item tied to the Config? (Does it disappear for folks when we turn off the config?) I'm hoping not, since we promised it will be there until next year's year in Review.

Going to tag @GOlson-WMF on this one since I think there's some bandwidth to investigate there. @GOlson-WMF Can you answer these questions?

Our YiR feature will disappear when the config goes out of date. Can you confirm that once the activeEndDate has passed, the custom app icon (if the user chose it) will still remain active, and confirm that the Settings view will still have the icon picker?

Also, this may be trickier to confirm but we want the custom app icon to automatically switch back to the standard icon in 1 year, correct @HNordeenWMF? Is that happening?

Absolutely! What I found:

We set it in AppearanceSettingsViewController which is not impacted at all by YIR. Then, we use qualifiesForIcon2025 as our defaults flag, which is only updated in the year in review data controller (below)

public func updateContributorStatus(isContributor: Bool) {
    try? userDefaultsStore?.save(
        key: WMFUserDefaultsKey.qualifiesForIcon2025.rawValue,
        value: isContributor
    )
}

If you want, we can add something in that will check a date and set it to false after x date? That may work, but we'd need an official date.

So @HNordeenWMF (TLDR)

  1. This item is NOT tied to the config, but it will only show up if the user starts YIR enough that we get that data to determine if they're a contributor or not. So once YIR closes, if a user hasn't opened it, even if they were a contributor, they will not see it. But for those who do see it, they'll keep it.
  2. I don't have a specific end date for the automatic switch back but I believe it could be done relatively easily, and I can do some investigating and testing to see.

thanks @GOlson-WMF ! That's great it's not tied to the Config, because we will likely turn off the Config before 1 year but we want the icon to remain until next year's Year in Review.

The requirement has:

[] Custom icon feature should last for 1 year from full production release

Let's add an end date of November 30, 2026 please!

Moving instead to Did not pass QA so it doesn't mess with our sprint calculations.