wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.99k stars 1.32k forks source link

feat: Toggle editor theme styles via feature flag #21324

Closed dcalhoun closed 1 month ago

dcalhoun commented 1 month ago

Provide experimental support for the editor WYSIWYG feature.

Fixes https://github.com/Automattic/dotcom-forge/issues/9450.

Testing Instructions

  1. Create a WordPress site that uses block theme, select a style with easily recognizable foreground and background colors (i.e., not black and white).
  2. Add the site to the WordPress/Jetpack app.
  3. Navigate to MeDebug settings and enable the following feature flags:
    • experimental_block_editor
    • experimental_block_editor_theme_styles
  4. Open the editor for the site.
  5. Verify the selected theme styles display.
  6. Close the editor.
  7. Disable the experimental_block_editor_theme_styles flag.
  8. Open the editor for the site.
  9. Verify the default styles display.

Regression Notes

  1. Potential unintended areas of impact The existing editor fails.
  2. What I did to test those areas of impact (or what existing automated tests I relied on) Briefly tested the existing editor.
  3. What automated tests I added (or what prevented me from doing so) N/A for this experimental feature.

PR Submission Checklist:

Testing Checklist (strike-out the not-applying and unnecessary ones):

dangermattic commented 1 month ago
1 Message
:book: This PR is still a Draft: some checks will be skipped.

Generated by :no_entry_sign: Danger

wpmobilebot commented 1 month ago
WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr21324-826ea23
Commit826ea2300a6dc63ba3e26265c70e1a5553513597
Direct Downloadwordpress-prototype-build-pr21324-826ea23.apk
Note: Google Login is not supported on these builds.
wpmobilebot commented 1 month ago
Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr21324-826ea23
Commit826ea2300a6dc63ba3e26265c70e1a5553513597
Direct Downloadjetpack-prototype-build-pr21324-826ea23.apk
Note: Google Login is not supported on these builds.
sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 40.23%. Comparing base (5d09cff) to head (826ea23). Report is 10265 commits behind head on trunk.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## trunk #21324 +/- ## ======================================= Coverage 40.23% 40.23% ======================================= Files 1536 1537 +1 Lines 70252 70256 +4 Branches 11543 11543 ======================================= + Hits 28263 28267 +4 Misses 39542 39542 Partials 2447 2447 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

nbradbury commented 1 month ago

@dcalhoun Do you have a site I can use to test this? Also, I'm not sure from the description what I should expect to see. Perhaps a video would help?

dcalhoun commented 1 month ago

@dcalhoun Do you have a site I can use to test this? Also, I'm not sure from the description what I should expect to see. Perhaps a video would help?

WordPress.com's Choose a Theme’s Style should provide additional context. The block editor should render content using a theme's styles—i.e., what-you-see-is-what-you-get. You can observe this same feature in the web editor, where the block editor's background color will match your theme's background color, the block editor's text color will match your theme's text color, etc.

An Atomic or jurassic.ninja site should allow for selecting a theme style. Happy to invite you to one of my testing sites, if that is preferred. Just let me know.

nbradbury commented 1 month ago

The block editor should render content using a theme's styles—i.e., what-you-see-is-what-you-get. You can observe this same feature in the web editor, where the block editor's background color will match your theme's background color, the block editor's text color will match your theme's text color, etc.

Thanks for the context. I thought I needed to use a specific block-related theme for this, but I see otherwise. I'll get back to reviewing this.