Skip to content

feat: GutenbergKit supports mentions and cross-posts #22109

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

Merged
merged 8 commits into from
Aug 12, 2025

Conversation

dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Aug 7, 2025

Description

Close CMM-455. Dependent upon wordpress-mobile/GutenbergKit#165.

Leverage GutenbergKit's onAutocompleterTriggered event and
appendTextAtCursor method for displaying and inserting @mention and
+cross-post suggestions.

Testing instructions

Explore @mention and +cross-post autocompletion. Try inserting triggers at various locations to verify expected behavior:

  • <line-start>@<cursor>
  • @text<cursor>
  • text@<cursor>
  • text @<cursor>more
  • text more@<cursor>

@dcalhoun dcalhoun added [Type] Enhancement Gutenberg Editing and display of Gutenberg blocks. labels Aug 7, 2025
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Aug 7, 2025

Project dependencies changes

list
! Upgraded Dependencies
org.wordpress.gutenbergkit:android:v0.8.0-alpha.0, (changed from v0.7.0)
tree
 +--- project :libs:editor
-|    \--- org.wordpress.gutenbergkit:android:v0.7.0
+|    \--- org.wordpress.gutenbergkit:android:v0.8.0-alpha.0
-\--- org.wordpress.gutenbergkit:android:v0.7.0 (*)
+\--- org.wordpress.gutenbergkit:android:v0.8.0-alpha.0 (*)

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Aug 7, 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
Versionpr22109-61b7b58
Commit61b7b58
Direct Downloadwordpress-prototype-build-pr22109-61b7b58.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Aug 7, 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
Versionpr22109-61b7b58
Commit61b7b58
Direct Downloadjetpack-prototype-build-pr22109-61b7b58.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented Aug 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 39.43%. Comparing base (d613d55) to head (61b7b58).
⚠️ Report is 6 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff             @@
##           trunk   #22109       +/-   ##
==========================================
+ Coverage   5.37%   39.43%   +34.06%     
==========================================
  Files         10     2149     +2139     
  Lines        335   101872   +101537     
  Branches      45    15604    +15559     
==========================================
+ Hits          18    40177    +40159     
- Misses       317    58126    +57809     
- Partials       0     3569     +3569     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR integrates GutenbergKit's autocompleter functionality to support @mentions and cross-post suggestions in the WordPress Android app. The implementation leverages GutenbergKit's onAutocompleterTriggered event and appendTextAtCursor method to provide a consistent autocomplete experience.

Key changes:

  • Updated GutenbergKit dependency to a development branch version that includes the autocompleter features
  • Implemented autocompleter listener in GutenbergKitEditorFragment to handle @mention and +cross-post triggers
  • Added XPosts capability configuration that respects site permissions and user capabilities

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
gradle/libs.versions.toml Updates GutenbergKit dependency to development branch version with autocompleter support
GutenbergKitEditorFragment.kt Implements autocompleter functionality with listeners for mentions and cross-posts
EditPostActivity.kt Configures XPosts capability based on site and user permissions

@dcalhoun dcalhoun force-pushed the feat/gutenberg-kit-mentions-and-cross-posts branch from 025812c to 06c7f02 Compare August 8, 2025 12:47
@dcalhoun dcalhoun marked this pull request as ready for review August 8, 2025 12:51
@dcalhoun dcalhoun requested a review from a team as a code owner August 8, 2025 12:51
@dcalhoun dcalhoun requested review from nbradbury and removed request for a team August 8, 2025 12:51
@nbradbury nbradbury self-assigned this Aug 8, 2025
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.

Works great! :shipit:

@dcalhoun dcalhoun added this to the 26.2 milestone Aug 12, 2025
Copy link

@dcalhoun dcalhoun merged commit 23322e4 into trunk Aug 12, 2025
26 checks passed
@dcalhoun dcalhoun deleted the feat/gutenberg-kit-mentions-and-cross-posts branch August 12, 2025 18:27
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.

3 participants