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

feat: GutenbergKit code editor #21582

Merged
merged 6 commits into from
Jan 16, 2025
Merged

feat: GutenbergKit code editor #21582

merged 6 commits into from
Jan 16, 2025

Conversation

dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Jan 14, 2025

Enable toggling the code editor within GutenbergKit.

Related:

To Test:

See wordpress-mobile/GutenbergKit#60.

Regression Notes

  1. Potential unintended areas of impact
    Regressions within Aztec and Gutenberg Mobile.
  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)

@dcalhoun dcalhoun added [Type] Enhancement [Type] Broken Window Gutenberg Editing and display of Gutenberg blocks. Do Not Merge In PRs with this label, our automation will fail a require check, preventing accidental merging labels Jan 14, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Jan 14, 2025

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 14, 2025

Project dependencies changes

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

list
Upgraded Dependencies
org.wordpress.gutenbergkit:android:trunk-cc52214a50893b41898607ac0bff7f2787b085bb, (changed from 55-a490cd3d2d70ad4bba501655f83fdc42b404d502)
tree
 +--- project :libs:editor
-|    \--- org.wordpress.gutenbergkit:android:55-a490cd3d2d70ad4bba501655f83fdc42b404d502
+|    \--- org.wordpress.gutenbergkit:android:trunk-cc52214a50893b41898607ac0bff7f2787b085bb
-\--- org.wordpress.gutenbergkit:android:55-a490cd3d2d70ad4bba501655f83fdc42b404d502 (*)
+\--- org.wordpress.gutenbergkit:android:trunk-cc52214a50893b41898607ac0bff7f2787b085bb (*)

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 14, 2025

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
Versionpr21582-be0696d
Commitbe0696d
Direct Downloadwordpress-prototype-build-pr21582-be0696d.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 14, 2025

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
Versionpr21582-be0696d
Commitbe0696d
Direct Downloadjetpack-prototype-build-pr21582-be0696d.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.48%. Comparing base (e69c9d8) to head (be0696d).
Report is 7 commits behind head on trunk.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #21582   +/-   ##
=======================================
  Coverage   39.48%   39.48%           
=======================================
  Files        2117     2117           
  Lines       99464    99464           
  Branches    15296    15296           
=======================================
  Hits        39269    39269           
  Misses      56714    56714           
  Partials     3481     3481           

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

Comment on lines -1429 to -1433
viewHtmlModeMenuItem.setVisible(
(((editorFragment is AztecEditorFragment)
|| (editorFragment is GutenbergEditorFragment))) && showMenuItems
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There does not appear to be a reason to check the editor fragment type, as this now applies to all editor types—Aztec, Gutenberg Mobile, and GutenbergKit.

@dcalhoun dcalhoun marked this pull request as ready for review January 14, 2025 22:12
@dcalhoun dcalhoun requested a review from nbradbury January 14, 2025 22:13
@nbradbury nbradbury self-assigned this Jan 15, 2025
@dcalhoun dcalhoun force-pushed the feat/gutenberg-kit-code-editor branch from 9c9df05 to a2e82a7 Compare January 16, 2025 19:04
@dcalhoun dcalhoun removed the Do Not Merge In PRs with this label, our automation will fail a require check, preventing accidental merging label Jan 16, 2025
Allow editing post content with the code editor.
The `editorFragment` check includes all possible fragment types, thus it
is unnecessary. Android Studio recommends using the property access
syntax rather than the setter method.
@dcalhoun dcalhoun force-pushed the feat/gutenberg-kit-code-editor branch from a2e82a7 to be0696d Compare January 16, 2025 19:09
Copy link
Contributor

@nbradbury nbradbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dcalhoun This looks great, feel free to merge! :shipit:

@dcalhoun dcalhoun enabled auto-merge January 16, 2025 19:19
@dcalhoun dcalhoun merged commit 21f3d59 into trunk Jan 16, 2025
21 of 22 checks passed
@dcalhoun dcalhoun deleted the feat/gutenberg-kit-code-editor branch January 16, 2025 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Editing and display of Gutenberg blocks. [Type] Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants