Skip to content

[Feature branch] Reading lists to collections - #6786

Closed
Williamrai wants to merge 9 commits into
mainfrom
rl-collections-feature-branch
Closed

[Feature branch] Reading lists to collections#6786
Williamrai wants to merge 9 commits into
mainfrom
rl-collections-feature-branch

Conversation

@Williamrai

Copy link
Copy Markdown
Collaborator

What does this do?

  • includes renames reading list to collection

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

@Williamrai Williamrai added the WIP Work in progress label Aug 11, 2026
Williamrai and others added 8 commits August 11, 2026 16:01
* - repurpose activity tab to use reading lists compose version for comparing with old XML version. Will be removed once migration is complete.
- creates ReadingListsComposeFragment, creates a compose screen, wires searchActionMode and overflowMenu, adds TODO's

* - Supports reactive DB flows for Reading Lists
- Add a one-to-many Room relation between ReadingList and ReadingListPage.
- implements DAO functions returning Flow to reactively observe reading list data
- adds ReadingListsUiState an ui state for the screen and ReadingListRow for handling list row and page row UI
- implements in-memory filtering for complex queries that cannot be evaluated directly by ROOM

* - adds ReadingListRow (which is a jetpack version of ReadingListItemView for ReadingListsFragment)

* - adds ReadingListPageRow.kt (which is jetpack version of PageItemView for ReadingListsFragment)

* - adds empty state

* - adds onboarding state for ReadingLists
- update MessageCard compose UI to match XML MessageCard
- updates ReadingListsViewModel.kt to support new onboarding state
- restructure ReadingListsComposeScreen.kt to support onboarding state
- adds searchActive flow to detect search action mode in order to hide onboarding state

* - adds pull to refresh
- adds multi selection mode
- adds overflow menu callback actions
- adds multiSelection callback actions
- updates UI to support multi selection mode and pull to refresh action
- code fixes

* - removes selection state from UiState and make it a standalone state for efficiency

* - adds Dropdown menu for long click on ListRow
- adds Dropdown menu actions
- adds two queries to simplifying and efficiently retrieving reading list with pages
- adds helper function toReadingList to filter pages queued for deletion

* - adds PageRow actions
- improves ReadingListItemActionsDialog newInstance function by passing what it actually uses instead of lists
- creates ContainingList data class to save id and title of the lists that contains the page. This is used for the added PageRow actions
- code fixes and UI updates

* - adds RecommendedReadingListDiscoverCardView
- adds offline toggle action in ReadingListPageRow
- adds logic to show snackbar message when total list reaches max limit
- bug fixes: deleting list from the ReadingList detail screen did not show undo snackbar when coming back to the main list screen

* - adds support for showing snackbar and new badge when shared list is saved. Introduces RecentPreviewSavedState which holds two values one for showing snackbar and the other for badge.
- updates ui and code

* - adds ReadingListsAccountState data class to simplify the login/log out updates
- subscribes LoggedInEvent, LoggedOutEvent and LoggedOutInBackgroundEvent

* - adds page download progress

* - code cleanups

* - rename reading list fragment and compose screen

* - improve search algorithm and adds a debounce

* - migrates the discover card source of truth to DB query flow through getNewRecommendedPagesFlow and
splits its own combine with related preferences
- ui fixes: scroll to first item when discover card appears

* - adds loading state

* - splits the ReadingListsScreen into All articles and Collections tab
- updates the viewModel logic to support this separation

* - adds the REFRESHING flag to manualSyncWithForce() so ReadingListSyncEvent is emitted when sync is completed to dismiss the refresh spinner

* - separates the search mode (searches the active tab)
- code updates to support the new search behavior

* - show recommended onboarding only on collections and other two on all articles

* - separates out the download progress state update from the expensive combine work

* - refine buildArticleRows for search operation: only creates a map of articles containing lists only for articles matching to query

* - don't show refresh and create new list overflow menu for "All articles" tab

* - adds sorting to all articles tab

* - updates ReadingListPageRow UI for selection support
- updates dialog/overflow action menu to remove moving to another list item
- adds action for add to another list, remove/add offline

* - adds deletion behavior to "All articles" tab
- adds a function to bulk delete selected pages and their associated lists
- adds new strings

* - removes todo

* - code cleanups

* - creates a separate menu for all article selections
- fixes popup menu theme

* - moves Database operation and deletion logic to ReadingListsViewModel.kt

* - filters out "Saved" list from Collections and search in collection
- creates filter overflow menu UI in "All articles" and filter them accordingly to user choice
- adds resources

* - fixes the reading list filters not showing or hiding correctly
- renames file name

* - removes TODO

* - adds missing breadcrumb events for ReadingListRow dropdown menu

* - code fixes (on resume resets the selected tab in ReadingListsFragment.kt) and use manualSyncWithForce(fromRefresh = true) for refreshing

* - connects missing collection badge state

* - adds new reading lists update tooltip

* - code fixes

* - adds new empty state for collections
- string updates

* - adds a mapper to flip the sort mode instead of changing actual order

* - simplifies the new reading lists sort

* - retrieves the existing list from db instead of the list currently displayed on the screen

* - lint fixes

* - handles an empty state for NOT_IN_COLLECTION filter when user has saved articles, and they are all in collections

---------

Co-authored-by: Dmitry Brant <dbrant@wikimedia.org>
* - repurpose activity tab to use reading lists compose version for comparing with old XML version. Will be removed once migration is complete.
- creates ReadingListsComposeFragment, creates a compose screen, wires searchActionMode and overflowMenu, adds TODO's

* - Supports reactive DB flows for Reading Lists
- Add a one-to-many Room relation between ReadingList and ReadingListPage.
- implements DAO functions returning Flow to reactively observe reading list data
- adds ReadingListsUiState an ui state for the screen and ReadingListRow for handling list row and page row UI
- implements in-memory filtering for complex queries that cannot be evaluated directly by ROOM

* - adds ReadingListRow (which is a jetpack version of ReadingListItemView for ReadingListsFragment)

* - adds ReadingListPageRow.kt (which is jetpack version of PageItemView for ReadingListsFragment)

* - adds empty state

* - adds onboarding state for ReadingLists
- update MessageCard compose UI to match XML MessageCard
- updates ReadingListsViewModel.kt to support new onboarding state
- restructure ReadingListsComposeScreen.kt to support onboarding state
- adds searchActive flow to detect search action mode in order to hide onboarding state

* - adds pull to refresh
- adds multi selection mode
- adds overflow menu callback actions
- adds multiSelection callback actions
- updates UI to support multi selection mode and pull to refresh action
- code fixes

* - removes selection state from UiState and make it a standalone state for efficiency

* - adds Dropdown menu for long click on ListRow
- adds Dropdown menu actions
- adds two queries to simplifying and efficiently retrieving reading list with pages
- adds helper function toReadingList to filter pages queued for deletion

* - adds PageRow actions
- improves ReadingListItemActionsDialog newInstance function by passing what it actually uses instead of lists
- creates ContainingList data class to save id and title of the lists that contains the page. This is used for the added PageRow actions
- code fixes and UI updates

* - adds RecommendedReadingListDiscoverCardView
- adds offline toggle action in ReadingListPageRow
- adds logic to show snackbar message when total list reaches max limit
- bug fixes: deleting list from the ReadingList detail screen did not show undo snackbar when coming back to the main list screen

* - adds support for showing snackbar and new badge when shared list is saved. Introduces RecentPreviewSavedState which holds two values one for showing snackbar and the other for badge.
- updates ui and code

* - adds ReadingListsAccountState data class to simplify the login/log out updates
- subscribes LoggedInEvent, LoggedOutEvent and LoggedOutInBackgroundEvent

* - adds page download progress

* - code cleanups

* - rename reading list fragment and compose screen

* - improve search algorithm and adds a debounce

* - migrates the discover card source of truth to DB query flow through getNewRecommendedPagesFlow and
splits its own combine with related preferences
- ui fixes: scroll to first item when discover card appears

* - adds loading state

* - splits the ReadingListsScreen into All articles and Collections tab
- updates the viewModel logic to support this separation

* - adds the REFRESHING flag to manualSyncWithForce() so ReadingListSyncEvent is emitted when sync is completed to dismiss the refresh spinner

* - separates the search mode (searches the active tab)
- code updates to support the new search behavior

* - show recommended onboarding only on collections and other two on all articles

* - separates out the download progress state update from the expensive combine work

* - refine buildArticleRows for search operation: only creates a map of articles containing lists only for articles matching to query

* - don't show refresh and create new list overflow menu for "All articles" tab

* - adds sorting to all articles tab

* - updates ReadingListPageRow UI for selection support
- updates dialog/overflow action menu to remove moving to another list item
- adds action for add to another list, remove/add offline

* - adds deletion behavior to "All articles" tab
- adds a function to bulk delete selected pages and their associated lists
- adds new strings

* - removes todo

* - code cleanups

* - creates a separate menu for all article selections
- fixes popup menu theme

* - moves Database operation and deletion logic to ReadingListsViewModel.kt

* - removes TODO

* - adds missing breadcrumb events for ReadingListRow dropdown menu

* - code fixes (on resume resets the selected tab in ReadingListsFragment.kt) and use manualSyncWithForce(fromRefresh = true) for refreshing

* - connects missing collection badge state

* - adds a mapper to flip the sort mode instead of changing actual order

* - simplifies the new reading lists sort

* - adds new UI for saving/unsaving articles when user taps the bookmark icon
- creates a bottom sheet dialog using the SaveArticleSheet.kt
- adds icon and string resources

* - adds MutableSharedFlow for temporary events [SaveArticleSheetEvent] for SaveArticleSheetDialog
- wires create collection logic which also adds the article to the created list

* - observes the database changes using readingListDao().getListsWithPagesFlow() inside combine
- adds default logic to save article to default list (includes resolve redirect title)
- adds building ui state and other helper functions

* - adds peek height for the bottom sheet dialog
- adds toggle article in collection logic
- adds toggle article saved logic (which is triggered when user taps the top article header or the top bookmark icon)
- adds side effect events confirmation dialog while unsaving all articles in the bottom sheet and CollectionArticleLimitReached

* - replaces AddToReadingListDialog with SaveArticleSheetDialog

* - adjusts code to fit new changes in OnThisDayGameArticleBottomSheet. adds lifecycle aware flow collection of ArticleSavedOrDeletedEvent to update save button whenever user adds or removes the article
- adds codes to derive decision to save only when it's not saved

* - save Article bottom sheet now auto-dismisses when an article is removed and displays a snackbar message, except when the article is removed from its only saved list (the default list)

* - removes add to another list, remove and move and only keep "Save" or "Saved" for overflow menu callbacks and long press menu callbak and replace it with a single request

* - adds a Modifier autoHidingLazyColumnScrollbar
- removes move and add from ReadingListItemActionsDialog
- adds string resources
- code fixes

* - fixes scrollbar visibility
- thumb height is now proportional to fraction of the lazy column content and uses the native scrollIndicatorState

* - adds accessibility
- code/ui fixes
- add code-review skill for testing (experiment)

* - removes the code-review skill

---------

Co-authored-by: Dmitry Brant <dbrant@wikimedia.org>
…e-branch

# Conflicts:
#	app/src/main/java/org/wikipedia/readinglist/compose/ReadingListPageRow.kt
#	app/src/main/java/org/wikipedia/readinglist/compose/ReadingListsScreen.kt
#	app/src/main/res/values-qq/strings.xml
#	app/src/main/res/values/strings.xml
@Williamrai Williamrai closed this Aug 13, 2026
@Williamrai
Williamrai deleted the rl-collections-feature-branch branch August 13, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP Work in progress

Development

Successfully merging this pull request may close these issues.

1 participant