Skip to content

T418952: Daily Reading#5732

Open
l-olson1214 wants to merge 9 commits intoreading-challengefrom
T418952_daily-reading
Open

T418952: Daily Reading#5732
l-olson1214 wants to merge 9 commits intoreading-challengefrom
T418952_daily-reading

Conversation

@l-olson1214
Copy link
Collaborator

Phabricator:
https://phabricator.wikimedia.org/T418952

Notes

  • x

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

  1. Set device date to be in time range, start a streak
  2. Change to next day
  3. Check to see if warning is showing, make sure the number is right
  4. Make sure you can tap the buttons in medium size widget, background
  5. Test variations of days/streaks/streak almost losses

Screenshots/Videos

Simulator.Screen.Recording.-.iPhone.17.Pro.Max.liquid.glass.-.2026-03-18.at.10.23.13.mov

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ReadingChallengeStateConfig and updated the schedule start date.
  • Added a WMFTheme.ReadingChallengeColorSet for widget color reuse and introduced an SF Symbol mapping for dice.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
}
Comment on lines +130 to +131
button1Icon: nil,
button2Icon: nil
l-olson1214 and others added 2 commits March 18, 2026 14:24
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>
@l-olson1214 l-olson1214 requested a review from mazevedofs March 18, 2026 18:25
@mazevedofs mazevedofs added the reading-challenge Reading challenge widget label Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reading-challenge Reading challenge widget

Development

Successfully merging this pull request may close these issues.

3 participants