Add Site Editor homepage row to the new pages list#23027
Open
nbradbury wants to merge 5 commits into
Open
Conversation
The legacy pages list shows a block-theme homepage row that opens the Site Editor web view, gated by SiteEditorMVP + isBlockBasedTheme. The new RS pages list lacked it. This adds a third Virtual.Kind (SITE_EDITOR) behind the same gate, opening the Site Editor on tap. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Generated by 🚫 Danger |
The block-theme state is only used to show the SITE_EDITOR row, so there's no reason to dispatch a FetchEditorTheme request on every pages-list visit for users who don't have the flag enabled. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Detect the row by its sentinel id instead of a tab-state lookup, so the tap works regardless of list state and is unit-testable. - Guard against a rapid double-tap launching two web views. - Track PAGES_EDIT_HOMEPAGE_ITEM_PRESSED on open, matching the legacy list. - Add ViewModel tests for the emitted event and analytics. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Collapse onEditorThemeChanged guards to stay within the return-count limit. - Compute empty actions for the SITE_EDITOR row instead of an early return. - Extract the row's text resolution into a helper to keep PageContentItem under the cyclomatic-complexity threshold. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
|
Contributor
|
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #23027 +/- ##
=======================================
Coverage 37.44% 37.45%
=======================================
Files 2325 2325
Lines 125520 125586 +66
Branches 17227 17244 +17
=======================================
+ Hits 47007 47034 +27
- Misses 74693 74729 +36
- Partials 3820 3823 +3 ☔ 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
The legacy pages list shows a special "Homepage" row for block-based themes that opens the Site Editor web view instead of the block editor, gated by
siteEditorMVPFeatureConfig.isEnabled() && isBlockBasedTheme. The new (RS) pages list (org.wordpress.android.ui.pagesrs) only rendered virtualHOMEPAGE/POSTS_PAGErows for assigned static pages and had no equivalent.Testing instructions
Edit homepage opens the Site Editor:
site_editor_mvpflag.site-editor.php?canvas=edit); WP.com sites use global WPCOM credentials.