Open
Conversation
added 7 commits
March 17, 2026 13:00
There was a problem hiding this comment.
Pull request overview
This PR updates the Reading Challenge widget implementation by centralizing widget display colors, localizing widget strings, and moving the Reading Challenge schedule config out of the ReadingChallengeState enum to a standalone config type in WMFData.
Changes:
- Extracted Reading Challenge dates/goal into
ReadingChallengeStateConfigand updated the schedule start date. - Added a
WMFTheme.ReadingChallengeColorSetfor widget color reuse and introduced an SF Symbol mapping fordice.fill. - Localized Reading Challenge widget display text (buttons, titles, widget metadata) and updated widget display-set creation accordingly.
Reviewed changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| WMFData/Sources/WMFData/Models/Widget/ReadingChallengeState.swift | Moves challenge schedule config to a dedicated type and updates challenge dates. |
| WMFComponents/Sources/WMFComponents/Style/WMFTheme.swift | Adds a color-set abstraction intended for Reading Challenge widget styling. |
| WMFComponents/Sources/WMFComponents/Style/WMFIcon.swift | Adds dice.fill SF Symbol support via WMFSFSymbolIcon. |
| Wikipedia/Localizations/qqq.lproj/Localizable.strings | Adds translator comments for new Reading Challenge widget localization keys. |
| Wikipedia/Localizations/en.lproj/Localizable.strings | Adds English strings for new Reading Challenge widget localization keys. |
| Widgets/Widgets/ReadingChallengeWidget.swift | Switches widget UI strings to localized keys, refactors display sets to use the new color set, and updates button icon handling. |
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+16
to
27
| public static var startDate: Date { | ||
| DateComponents(calendar: .current, year: 2026, month: 5, day: 1).date | ||
| ?? Date(timeIntervalSince1970: 1746057600) // 2026-05-01 UTC fallback | ||
| } | ||
| public static var endDate: Date { | ||
| DateComponents(calendar: .current, year: 2026, month: 5, day: 31).date | ||
| ?? Date(timeIntervalSince1970: 1748649600) // 2026-05-31 UTC fallback | ||
| } | ||
| public static var removeDate: Date { | ||
| DateComponents(calendar: .current, year: 2026, month: 7, day: 10).date | ||
| ?? Date(timeIntervalSince1970: 1752105600) // 2026-07-10 UTC fallback | ||
| } |
WMFData/Sources/WMFData/Models/Widget/ReadingChallengeState.swift
Outdated
Show resolved
Hide resolved
Comment on lines
+130
to
+131
| button1Icon: nil, | ||
| button2Icon: nil |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phabricator:
https://phabricator.wikimedia.org/T418952
Notes
AC
Adding to streak
-[x] The streak counter increments by 1 each calendar day that a read is logged
-[x] Any article open by an enrolled user is automatically counted as their daily read: there is no minimum time-on-page requirement
-[x] Only the first article open per calendar day triggers the state transition: subsequent opens on the same day have no effect
-[x]Calendar days are determined by the user's local timezone (examples in ticket)
-[x] Article opens while logged out may count toward the streak, if the user’s device is enrolled
-[x] The Widget should transition as soon as possible once the daily read is logged
-[] For users who joined while logged-in, and then logged-out, progress tracking for their streak and on the Widget can continue, but they must log back in to view Activity/Claim prizes (authentication isn't handled in this ticket)
Tracking Progress
-[x] Widget displays the user's current streak count at all times in State: Streak ongoing: not yet read today and State: Streak ongoing: read today
-[x] In State: Streak ongoing: not yet read today, display an active CTA prompting the user to read an article
Widget: Search and Random CTAs in larger widget
-[x] Tapping anywhere else on the widget leads to Explore (Or Search if Explore is disabled)
-[x] In State: Streak ongoing: read today, display a confirmation that today's read is complete: the CTA is removed and the streak number is featured
-[x] Widget should most current state without requiring a manual refresh
-[] Subtitle text below heading with encouragement https://docs.google.com/document/d/1GDtGFcIC_wUg_YVBwoN0WvN5_m7zVKNOOHkM7qdXR6g/edit?tab=t.0#bookmark=id.6rfzgbv25dgy (not have, did nice to have instead)
-[x] [Nice to have] Progress bar from 1-25, automatically updates when the user moves from States not read today, to read today). Note: If we are able to add the progress bar, we should remove the subtitle text
Test Steps
Screenshots/Videos
Simulator.Screen.Recording.-.iPhone.17.Pro.Max.liquid.glass.-.2026-03-18.at.10.23.13.mov