[Reading Lists] New bottom sheet dialog to save unsave - #6771
Merged
dbrant merged 78 commits intoAug 13, 2026
Conversation
…paring with old XML version. Will be removed once migration is complete. - creates ReadingListsComposeFragment, creates a compose screen, wires searchActionMode and overflowMenu, adds TODO's
- 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
…iew for ReadingListsFragment)
…w for ReadingListsFragment)
- 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
…e' into reading-list-migration-to-compose
- 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
- 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
…e' into reading-list-migration-to-compose
- 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 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
… saved. Introduces RecentPreviewSavedState which holds two values one for showing snackbar and the other for badge. - updates ui and code
…out updates - subscribes LoggedInEvent, LoggedOutEvent and LoggedOutInBackgroundEvent
… getNewRecommendedPagesFlow and splits its own combine with related preferences - ui fixes: scroll to first item when discover card appears
…e' into reading-list-migration-to-compose
- updates the viewModel logic to support this separation
…cEvent is emitted when sync is completed to dismiss the refresh spinner
- code updates to support the new search behavior
…perience # Conflicts: # app/src/main/res/values-qq/strings.xml # app/src/main/res/values/strings.xml
… 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
…oved and displays a snackbar message, except when the article is removed from its only saved list (the default list)
…r "Saved" for overflow menu callbacks and long press menu callbak and replace it with a single request
…perience # Conflicts: # app/src/main/res/values-qq/strings.xml
- removes move and add from ReadingListItemActionsDialog - adds string resources - code fixes
- thumb height is now proportional to fraction of the lazy column content and uses the native scrollIndicatorState
…experience # Conflicts: # app/src/main/res/values-qq/strings.xml # app/src/main/res/values/strings.xml
There was a problem hiding this comment.
Pull request overview
Introduces a unified bottom sheet for saving articles and managing collection membership across the app.
Changes:
- Adds the Compose save/unsave sheet and supporting ViewModel.
- Replaces legacy save, move, and remove flows across article surfaces.
- Updates reading-list actions, resources, and scrollbar behavior.
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
app/src/main/res/values/strings.xml |
Adds sheet text and collection counts. |
app/src/main/res/values/dimens.xml |
Adds sheet peek height. |
app/src/main/res/values-qq/strings.xml |
Adds localization descriptions. |
app/src/main/res/menu/menu_reading_list_page_toggle.xml |
Removes obsolete menu. |
app/src/main/res/menu/menu_places_long_press.xml |
Removes legacy collection actions. |
app/src/main/res/menu/menu_long_press.xml |
Removes legacy collection actions. |
app/src/main/res/layout/view_reading_list_page_actions.xml |
Consolidates collection management action. |
app/src/main/res/drawable/ic_add_circle_24dp.xml |
Adds collection-add icon. |
app/src/main/java/org/wikipedia/search/SearchResultLongPressHandler.kt |
Routes search saves to the sheet. |
app/src/main/java/org/wikipedia/search/SearchResultCallback.kt |
Simplifies the save callback. |
app/src/main/java/org/wikipedia/search/SearchFragment.kt |
Opens the sheet from search. |
app/src/main/java/org/wikipedia/readinglist/SaveArticleSheetViewModel.kt |
Implements save and collection operations. |
app/src/main/java/org/wikipedia/readinglist/SaveArticleSheetDialog.kt |
Hosts the new bottom sheet. |
app/src/main/java/org/wikipedia/readinglist/ReadingListsViewModel.kt |
Tracks default-list membership. |
app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.kt |
Opens collection management. |
app/src/main/java/org/wikipedia/readinglist/ReadingListItemActionsView.kt |
Consolidates item actions. |
app/src/main/java/org/wikipedia/readinglist/ReadingListItemActionsDialog.kt |
Displays collection membership action. |
app/src/main/java/org/wikipedia/readinglist/ReadingListFragment.kt |
Integrates the new sheet. |
app/src/main/java/org/wikipedia/readinglist/LongPressMenu.kt |
Unifies long-press save behavior. |
app/src/main/java/org/wikipedia/readinglist/compose/SaveArticleSheetContent.kt |
Defines the Compose sheet UI. |
app/src/main/java/org/wikipedia/random/RandomActivity.kt |
Uses the sheet for random articles. |
app/src/main/java/org/wikipedia/places/PlacesFragment.kt |
Uses the sheet from Places. |
app/src/main/java/org/wikipedia/page/PageFragment.kt |
Uses the sheet from article actions. |
app/src/main/java/org/wikipedia/page/PageContainerLongPressHandler.kt |
Uses the sheet for links. |
app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.kt |
Uses the sheet from previews. |
app/src/main/java/org/wikipedia/main/MainFragment.kt |
Routes feed save requests. |
app/src/main/java/org/wikipedia/games/onthisday/OnThisDayGameViewModel.kt |
Removes duplicated saved-page state. |
app/src/main/java/org/wikipedia/games/onthisday/OnThisDayGameResultFragment.kt |
Uses the sheet in game results. |
app/src/main/java/org/wikipedia/games/onthisday/OnThisDayGameArticleBottomSheet.kt |
Uses database-backed save state. |
app/src/main/java/org/wikipedia/feed/view/ListItemView.kt |
Simplifies feed save callbacks. |
app/src/main/java/org/wikipedia/feed/topread/TopReadFragment.kt |
Opens the sheet from top reads. |
app/src/main/java/org/wikipedia/feed/onthisday/OnThisDayPagesViewHolder.kt |
Opens the sheet from events. |
app/src/main/java/org/wikipedia/feed/news/NewsFragment.kt |
Opens the sheet from news. |
app/src/main/java/org/wikipedia/feed/HomeFragment.kt |
Replaces direct feed save handling. |
app/src/main/java/org/wikipedia/feed/ForYouCard.kt |
Updates saved menu labeling. |
app/src/main/java/org/wikipedia/feed/didyouknow/DidYouKnowActivity.kt |
Opens the sheet from Did You Know. |
app/src/main/java/org/wikipedia/compose/extensions/Modifier.kt |
Adds an auto-hiding scrollbar. |
app/src/main/java/org/wikipedia/compose/components/menu/PageOverflowMenuViewModel.kt |
Unifies overflow save actions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+113
to
+118
| } catch (exception: IOException) { | ||
| // A network error (or being offline) during the redirect resolution is not a big deal, | ||
| // and we can just proceed with the original title. | ||
| L.e(exception) | ||
| null | ||
| } |
- code/ui fixes - add code-review skill for testing (experiment)
| ) | ||
|
|
||
| private fun saveArticle() { | ||
| viewModelScope.launch(exceptionHandler) { |
Collaborator
Author
There was a problem hiding this comment.
based on product leaving this as is, and see if we get user reports.
|
|
||
| val pageTitle = savedStateHandle.get<PageTitle>(Constants.ARG_TITLE)!! | ||
|
|
||
| private val savedPageTitle = MutableStateFlow(pageTitle) |
Collaborator
Author
There was a problem hiding this comment.
based on product leaving this as is, and see if we get user reports.
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.
What does this do?
Phabricator:
https://phabricator.wikimedia.org/T430375