Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YiR] Display profile button badge and notification badge #5056

Merged
merged 5 commits into from
Nov 7, 2024

Conversation

mazevedofs
Copy link
Collaborator

@mazevedofs mazevedofs commented Nov 6, 2024

Phabricator: https://phabricator.wikimedia.org/T376313 and https://phabricator.wikimedia.org/T376312

Notes

  • Updates the badge state based on the user having an YiR report available and has not seen its first slide

Test Steps

  1. Fresh install the app
  2. Set region to Italy or Mexico on the Device
  3. Go through 7+ articles
  4. Turn on dev settings toggle
  5. Background the app
  6. When foregrounding, you should see the badge on the explore feed and article profile buttons
  7. You should see the badge on the YiR item
  8. Click on it, view the first slide
  9. Go back to the profile view. The badge should be gone
  10. Test with notifications badge on - if you have unread notifications, you should still see the profile button badge

@mazevedofs mazevedofs requested review from a team and l-olson1214 and removed request for a team November 6, 2024 19:27
@@ -110,6 +113,13 @@ public class WMFYearInReviewViewModel: ObservableObject {
var slideLoggingID: String {
return isFirstSlide ? "start" : slides[currentSlide].loggingID
}

func markFirstSlideAsSeen() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nothing wrong with this PR but just out of curiosity, are there any potential times where we would want to undo this and reset the year in review? On log out or something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It depends on whether logging out generates a new report that should notify the user. I'm not sure we built that. We can check it with Haley and set this flag to false upon logout. We might need to do that when doing housekeeping and deleting old reports before getting next year's in, but that work is yet to be done.

@l-olson1214 l-olson1214 merged commit a5d59c4 into main Nov 7, 2024
4 checks passed
@l-olson1214 l-olson1214 deleted the yir-badge branch November 7, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants