Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Simplify GutenbergKit content change listener #21663

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Feb 4, 2025

Align the content change listener approach with that of Aztec and
Gutenberg Mobile. The previous approach appeared to be unnecessary
divergence.

Related: wordpress-mobile/GutenbergKit#72

To Test:

1: Content changes mark the post as unsaved

  1. Open an existing post in the experimental editor.
  2. Modify title and/or content.
  3. Tap the back button.
  4. Verify the post changes are persisted.

2: Content changes persist via auto-save

  1. Open an existing post.
  2. Modify the title and/or content.
  3. Wait briefly for the auto-save debounce period to pass.
  4. Quit the app completely.
  5. Relaunch the app and verify the post changes were persisted.

Regression Notes

  1. Potential unintended areas of impact
    Regressions in the Aztec and Gutenberg Mobile editors.
  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    Manually tested the editors.
  3. What automated tests I added (or what prevented me from doing so)
    Deemed unnecessary for the experimental editor.

PR Submission Checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

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

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

Align the content change listener approach with that of Aztec and
Gutenberg Mobile. The previous approach appeared to be unnecessary
divergence.
@dangermattic
Copy link
Collaborator

dangermattic commented Feb 4, 2025

1 Error
🚫 This PR is tagged with Do Not Merge label(s).
1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

Copy link

sonarqubecloud bot commented Feb 4, 2025

@wpmobilebot
Copy link
Contributor

Project dependencies changes

The following changes in project dependencies were detected (configuration wordpressVanillaReleaseRuntimeClasspath):

list
Upgraded Dependencies
org.wordpress.gutenbergkit:android:72-7ead6902b79992590645940da583caf0dae65ffc, (changed from v0.0.5)
tree
 +--- project :libs:editor
-|    \--- org.wordpress.gutenbergkit:android:v0.0.5
+|    \--- org.wordpress.gutenbergkit:android:72-7ead6902b79992590645940da583caf0dae65ffc
-\--- org.wordpress.gutenbergkit:android:v0.0.5 (*)
+\--- org.wordpress.gutenbergkit:android:72-7ead6902b79992590645940da583caf0dae65ffc (*)

@wpmobilebot
Copy link
Contributor

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
Versionpr21663-03d19c5
Commit03d19c5
Direct Downloadjetpack-prototype-build-pr21663-03d19c5.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

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
Versionpr21663-03d19c5
Commit03d19c5
Direct Downloadwordpress-prototype-build-pr21663-03d19c5.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.42%. Comparing base (d3adbb6) to head (03d19c5).

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #21663   +/-   ##
=======================================
  Coverage   39.42%   39.42%           
=======================================
  Files        2122     2122           
  Lines       99558    99558           
  Branches    15317    15317           
=======================================
  Hits        39247    39247           
  Misses      56832    56832           
  Partials     3479     3479           

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

@dcalhoun dcalhoun marked this pull request as ready for review February 4, 2025 21:44
@dcalhoun dcalhoun requested a review from nbradbury February 4, 2025 21:45
@dcalhoun dcalhoun added the Do Not Merge In PRs with this label, our automation will fail a require check, preventing accidental merging label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do Not Merge In PRs with this label, our automation will fail a require check, preventing accidental merging Gutenberg Editing and display of Gutenberg blocks. [Type] Task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants