Add mutations & menu actions to the new wp-rs pages list (Phase 4)#22978
Open
nbradbury wants to merge 5 commits into
Open
Add mutations & menu actions to the new wp-rs pages list (Phase 4)#22978nbradbury wants to merge 5 commits into
nbradbury wants to merge 5 commits into
Conversation
Adds the per-page overflow menu to the wordpress-rs pages list with the full legacy action set: View, Set Parent, Set as Homepage / Posts Page, Publish Now, Move to Draft, Duplicate, Share, Copy URL, Promote with Blaze, Move to Trash, and Delete Permanently. Destructive actions are gated behind a PageRsListConfirmation dialog, Set Parent uses a new bottom-sheet picker, and tapping a trashed page now offers to move it back to drafts. Action visibility follows the page's own status and the legacy eligibility rules (homepage protection, Blaze and static-homepage gating). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collaborator
Generated by 🚫 Danger |
Contributor
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
Set as Homepage / Set as Posts Page now go through the wordpress-rs /wp/v2/settings endpoint via a new PageRsHomepageSettings bridge, removing the FluxC SiteOptionsStore dependency and making the actions work on self-hosted application-password sites (so the menu gating is widened beyond WP.com). The bridge keeps SiteOptionsStore's semantics: it reads the live settings to reject sites without a static homepage and to clear the counterpart slot when reassigning the same page, then syncs the shared SiteModel and dispatches an update so the rest of the app stays consistent. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Hide Set as Homepage / Posts Page on WP.com sites without a static page on front, matching the legacy list (self-hosted sites still defer to the server since those fields aren't synced) - Collect parent-picker descendants across pages of every status so a published descendant reached through a draft intermediate can't be chosen as a parent (which would create a cycle) - Track move-to-draft on confirm rather than dialog-open, and set-parent only after the mutation succeeds - Drop the requireNotNull(site) lazy page service; executePageMutation now guards the site itself and hands the service to the operation - Document the parent picker's loaded-pages-only limitation Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Publishing a duplicated page (or saving editor changes) uploads through FluxC's UploadService in the background after the editor closes, which the wordpress-rs collections never see — the new page didn't appear until a manual refresh. Subscribe to OnPostUploaded and refresh the tabs when a page of the selected site uploads successfully, matching the legacy list's PostListEventListener. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
|
Contributor
|
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #22978 +/- ##
==========================================
- Coverage 37.22% 37.18% -0.04%
==========================================
Files 2330 2333 +3
Lines 125667 126173 +506
Branches 17115 17194 +79
==========================================
+ Hits 46777 46922 +145
- Misses 75104 75452 +348
- Partials 3786 3799 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Adds the per-page overflow menu to the experimental wordpress-rs pages list:
Action visibility follows the page's own status plus the legacy eligibility rules (the homepage can't be trashed or drafted, homepage settings require a static homepage and admin rights, Blaze requires an eligible site and no password).
Testing instructions
Enable the "New Pages List" experimental feature, then open Site → Pages.
Menu actions: