Skip to content

Conversation

@Williamrai
Copy link
Collaborator

What does this do?

  • creates reading list based on year in review with A/B Test

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

@Williamrai Williamrai added the WIP Work in progress label Oct 24, 2025
Williamrai and others added 9 commits October 24, 2025 13:53
… save that list and code to update ui for that list

- ui/code fixes and adds strings resources
- updates YearInReviewSurvey.kt to YearInReviewDialog.kt
- code fixes/ui fixes
…e "new" indicator once the user opens the new list

- code fixes
# Conflicts:
#	app/src/main/java/org/wikipedia/yearinreview/YearInReviewScreenDeck.kt
#	app/src/main/res/values/strings_no_translate.xml
@Williamrai Williamrai added Ready for Review and removed WIP Work in progress labels Oct 29, 2025
Copy link
Collaborator

@cooltey cooltey left a comment

Choose a reason for hiding this comment

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

One issue found:

After the reading list is created, we will still see the "Reading list created" after going back to the main reading lists screen. Not sure if this is something needed to confirm with PM.

Comment on lines 219 to 227
private fun hideNewIndicatorForRecentSavedList() {
if (recentPreviewSavedReadingList != null) {
val pos = displayedLists.indexOfFirst { it is ReadingList && it.id == recentPreviewSavedReadingList?.id }
if (pos != -1) {
adapter.notifyItemChanged(pos)
}
recentPreviewSavedReadingList = null
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure but do we really need this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

From the design

const val MIN_SLIDES_BEFORE_SURVEY = 2
const val MIN_SLIDES_FOR_CREATING_YIR_READING_LIST = 1
const val MIN_ARTICLES_FOR_CREATING_YIR_READING_LIST = 5
const val CUT_OFF_DATE_FOR_SHOWING_YIR_READING_LIST_DIALOG = "2026-03-31T23:59:59Z"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this in RemoteConfig?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you mean not adding these values here in YearInReviewModel?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we are putting all the dates in the feed/configuration endpoint, maybe we can think about putting this date into the remote configuration, too.

But we can do this later if we decide to move this to the remoteConfig.

@Williamrai
Copy link
Collaborator Author

One issue found:

After the reading list is created, we will still see the "Reading list created" after going back to the main reading lists screen. Not sure if this is something needed to confirm with PM.

I am not sure I follow. could you share a quick recording or screenshot so I can see what you mean?

@cooltey
Copy link
Collaborator

cooltey commented Oct 29, 2025

One issue found:
After the reading list is created, we will still see the "Reading list created" after going back to the main reading lists screen. Not sure if this is something needed to confirm with PM.

I am not sure I follow. could you share a quick recording or screenshot so I can see what you mean?

It's the snackbar, and I think this is something redundant because you have already seen it after creating the list. But this probably should be confirmed with the PMs.

@Williamrai
Copy link
Collaborator Author

One issue found:
After the reading list is created, we will still see the "Reading list created" after going back to the main reading lists screen. Not sure if this is something needed to confirm with PM.

I am not sure I follow. could you share a quick recording or screenshot so I can see what you mean?

It's the snackbar, and I think this is something redundant because you have already seen it after creating the list. But this probably should be confirmed with the PMs.

Figma does not have this design so removing it. Added a check for not showing snackbar when its from year in review reading list.

const val MIN_SLIDES_BEFORE_SURVEY = 2
const val MIN_SLIDES_FOR_CREATING_YIR_READING_LIST = 1
const val MIN_ARTICLES_FOR_CREATING_YIR_READING_LIST = 5
const val CUT_OFF_DATE_FOR_SHOWING_YIR_READING_LIST_DIALOG = "2026-03-31T23:59:59Z"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we are putting all the dates in the feed/configuration endpoint, maybe we can think about putting this date into the remote configuration, too.

But we can do this later if we decide to move this to the remoteConfig.

import java.time.ZoneOffset

object YearInReviewDialog {
private val userGroup = if (Prefs.appInstallId.hashCode() % 2 == 0) "A" else "B"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am kind of concerned about this:

Will the same group of users fall into the same user group if we keep using the app install ID as the seed?

Similar to this one

private fun getUserGroup(): String {
return if (Prefs.appInstallId.hashCode() % 2 == 0) "A" else "B"
}

I think there's a proper way of assigning the users to a group by following the logic in ABTest.assignGroup().

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes this logic will always keep the user in the same group because the appInstallId is always same for the app if (Prefs.appInstallId.hashCode() % 2 == 0) "A" else "B". The ABTest.assignGroup() logic has a preference to store the test group, but if we do something similar to assignGroup() then we would have to add another preference to save this user group.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can reuse the ABTest class to create an AB test group, which makes more sense in this case.

@Williamrai Williamrai requested a review from cooltey November 4, 2025 18:54
@cooltey cooltey merged commit c77e2b6 into main Nov 4, 2025
1 check passed
@cooltey cooltey deleted the yir-reading-list branch November 4, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants