Skip to content

RS Post Settings: Add author search to author dialog#22689

Draft
nbradbury wants to merge 4 commits intofeature/rsposts-settings-performancefrom
feature/rsposts-author-search
Draft

RS Post Settings: Add author search to author dialog#22689
nbradbury wants to merge 4 commits intofeature/rsposts-settings-performancefrom
feature/rsposts-author-search

Conversation

@nbradbury
Copy link
Contributor

@nbradbury nbradbury commented Mar 13, 2026

Description

Adds author search functionality to the author selection dialog on the RS Post Settings screen.

  • Author search: Debounced search field in the author dialog with loading indicator and "no results" state. Clears search state on dialog dismiss so reopening shows a fresh list.
  • Code simplification: Removed redundant null checks, deduplicated the AUTHORS_PER_PAGE constant (single source of truth in PostRsRestClient), replaced itemsIndexed with items where the index was unused, and removed redundant state clearing.

Testing instructions

Author search:

  1. Open a post's RS Post Settings screen
  2. Tap the Author field to open the author dialog
  3. Type a search query (3+ characters) in the search field
  • Verify a loading spinner appears while searching
  • Verify matching authors are shown, or "No results found" for no matches
  1. Clear the search field
  • Verify the full author list reloads
  1. Close the dialog and reopen it
  • Verify the search field is empty and the full author list is shown
author.mp4

nbradbury and others added 4 commits March 13, 2026 12:25
Add a debounced search field to the author selection dialog, matching
the existing pattern used for category/tag term search. Also fixes
author selection from index-based to ID-based to prevent incorrect
selection when the list changes during search or load-more.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace itemsIndexed with items in AuthorDialog since the index was
unused, and consolidate AUTHORS_PER_PAGE to a single constant in
PostRsRestClient.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reset the search query, search flag, and cached author list on
dismiss so reopening the dialog shows a fresh state instead of
stale search results.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The authorSearchQuery and isSearchingAuthors fields are already
reset by onDismissDialog(), so clearing them again on open is
unnecessary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@sonarqubecloud
Copy link

@nbradbury nbradbury changed the base branch from trunk to feature/rsposts-settings-performance March 13, 2026 17:16
@wpmobilebot
Copy link
Contributor

App Icon📲 You can test the changes from this Pull Request in WordPress Android by scanning the QR code below to install the corresponding build.

App NameWordPress Android
Build TypeDebug
Versionpr22689-6a94cc0
Build Number1487
Application IDorg.wordpress.android.prealpha
Commit6a94cc0
Installation URL4f7en7h62r0v0
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

App Icon📲 You can test the changes from this Pull Request in Jetpack Android by scanning the QR code below to install the corresponding build.

App NameJetpack Android
Build TypeDebug
Versionpr22689-6a94cc0
Build Number1487
Application IDcom.jetpack.android.prealpha
Commit6a94cc0
Installation URL12aclkgn8jtf0
Note: Google Login is not supported on these builds.

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 6.20155% with 121 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.58%. Comparing base (78ec06d) to head (6a94cc0).

Files with missing lines Patch % Lines
...android/ui/postsrs/screens/PostRsSettingsScreen.kt 0.00% 89 Missing ⚠️
...ress/android/ui/postsrs/PostRsSettingsViewModel.kt 15.78% 31 Missing and 1 partial ⚠️
Additional details and impacted files
@@                           Coverage Diff                            @@
##           feature/rsposts-settings-performance   #22689      +/-   ##
========================================================================
- Coverage                                 37.61%   37.58%   -0.03%     
========================================================================
  Files                                      2272     2272              
  Lines                                    118381   118491     +110     
  Branches                                  16367    16380      +13     
========================================================================
+ Hits                                      44531    44538       +7     
- Misses                                    70200    70302     +102     
- Partials                                   3650     3651       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants