Limit Classic editor access on Simple WP.com sites to existing Classic posts#14381
Conversation
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
|
You can test the changes on this Pull Request by downloading the APK here. |
d27a7a2 to
02e06f2
Compare
guarani
left a comment
There was a problem hiding this comment.
Tested on Simple sites using the test steps above and this looks good!
The code looks good from my point of view, but I'm not an Android dev 😄
nit pick: there's a mention of App Store above that probably refers to the Play Store
|
@mchowning An additional review on this would be welcome since after Paul approved, I added the plan we discussed for disabling classic tests until they are migrated to executing on an existing classic post. 🙏 |
| return true; | ||
| } else { | ||
| return site.getMobileEditor().equals(SiteUtils.GB_EDITOR_NAME); | ||
| boolean isSimpleWPCom = site.isWPCom() && !site.isWPComAtomic(); |
There was a problem hiding this comment.
Not a blocking issue, but what would you think about instead extracting out something along these lines:
public static boolean alwaysDefaultToGutenberg(SiteModel site) {
return site.isWPCom() && !site.isWPComAtomic();
}
and then using that method both here and at SiteSettingsFragment::1005?
My thinking is that we always want those two checks to be the same (anytime the editor toggle is unavailable we want to also want to force the default editor to be Gutenberg), and having the logic in a shared method makes it more likely they'll stay in sync.
|
This all looks good to me. 👍 I had one comment, but it's not a blocker. |
The next step after notifying users that the classic editor is going away is to actually remove it, starting with Simple sites.
I think this change doesn't warrant inclusion in RELEASE-NOTES.txt since we already notified users about this change in 16.9, but if anyone thinks differently I'd love to hear. Perhaps we could include it in release notes but exclude it from the Play Store version notes.
Addresses wordpress-mobile/gutenberg-mobile#3092 (for WPAndroid)
To test
Note: The toggle switch referred to below is the "Use block editor" toggle switch found in My Site → Settings. This is only available to site admins.
Regression Notes
This PR removes the classic editor on Simple sites. However, we're leaving it in place for scenarios where the block editor cannot be used instead. These scenarios include editing a classic post (i.e. a post that contains only classic content). We have to check to make sure these scenarios still work on Simple sites. We should also check to make sure all other site types (Atomic/Jetpack/self-hosted) are unaffected by this change.
We are disabling the Classic Editor tests until they can be migrated to executing on existing classic posts, instead of creating new ones. That work is tracked with this ticket here: #14389
PR submission checklist:
RELEASE-NOTES.txtif necessary.