Pages list: search and author filter (phase 2) and FAB#22950
Open
nbradbury wants to merge 17 commits into
Open
Pages list: search and author filter (phase 2) and FAB#22950nbradbury wants to merge 17 commits into
nbradbury wants to merge 17 commits into
Conversation
Adds debounced search and a per-author filter to the wordpress-rs pages list, mirroring the post-list playbook from PostRsListViewModel. Search: typing past 3 characters (200 ms debounce) tears down all tab collections and rebuilds the active tab against PostListFilter with status = ALL_STATUSES and a non-null search term. Results render a status label per row so users can tell which bucket each hit came from. Closing search clears the query and immediately re-initializes the active tab without waiting for the debounce. Author filter: gated on isUsingWpComRestApi + hasCapabilityEditOthersPages + isSingleUserSite == false (consistent with the legacy PagesViewModel and PostRsListViewModel). Selection persists via the shared appPrefsWrapper.postListAuthorSelection pref. Display names are resolved through the existing entity-agnostic PostRsRestClient.fetchUserDisplayNames and skipped when filtering by Me. Analytics: tracks PAGES_LIST_SEARCH_ACCESSED, PAGES_LIST_ITEM_SELECTED, and the pre-existing PAGES_LIST_AUTHOR_FILTER_CHANGED. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
Generated by 🚫 Danger |
Contributor
|
|
Fold the _site null guard into the combined early-return so the function stays under detekt's two-return limit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
|
Bump SEARCH_DEBOUNCE_MS from 200 to 250 to match PostRsListViewModel, so users who use both lists see the same input latency. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop unused PageRsUiModel.status field, replace buildString header with listOfNotNull/joinToString, and inline single-use findPage helper. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a FloatingActionButton to the wordpress-rs pages list that opens the editor for a new page via ActivityLauncher.addNewPageForResult, matching the legacy PagesFragment behavior. The FAB is hidden during search but visible on all four tabs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wire the wordpress-rs pages list FAB through ModalLayoutPickerViewModel when the block editor is the default for new posts and the Jetpack feature-removal phase allows template selection, matching the legacy PagesFragment flow. Falls back to launching a blank page directly when the picker can't be shown. Also tracks PAGES_ADD_PAGE on FAB tap for analytics parity. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The activity already reads viewModel.site directly when handling the MLP result; making the event itself a data object unifies that access path and removes the redundant parameter-threading. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previously tapping a page on the TRASHED tab was a silent no-op, and during search a trashed result surfaced on a non-trashed tab would fall through and try to open the editor. Track an isTrashed flag on the UI model and emit a toast in both cases; the real move-to-draft flow is deferred to phase 3. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #22950 +/- ##
==========================================
- Coverage 37.22% 37.19% -0.04%
==========================================
Files 2329 2329
Lines 125323 125584 +261
Branches 17044 17090 +46
==========================================
+ Hits 46657 46716 +59
- Misses 74893 75084 +191
- Partials 3773 3784 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
12 tasks
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.


Description
This PR implements Phase 2 of the wordpress-rs pages list (phases 0–1 landed in #22936) by adding a debounced search and per-author filter, mirroring the behavior of the wordpress-rs post list.
A FAB to create a new page was also added to this PR. This feature was notably absent from Claude's initial plan.
Testing instructions
Prereqs: enable the wordpress-rs pages list experimental feature in Settings → Experimental Features (debug build only), then open My Site → Pages.
Search:
Author filter (WP.com multi-author sites):
FAB