Skip to content

feat: GutenbergKit supports mentions and cross-posts #24733

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 16 commits into from
Aug 13, 2025

Conversation

dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Aug 7, 2025

Description

Close CMM-454. 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
@dcalhoun dcalhoun force-pushed the feat/gutenberg-kit-mentions-and-cross-posts branch from 27abe35 to 1b0c3e8 Compare August 7, 2025 13:42
@dcalhoun dcalhoun changed the title feat: GutenbergKit supports mentions and crost-posts feat: GutenbergKit supports mentions and cross-posts Aug 7, 2025
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Aug 7, 2025

App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number28505
VersionPR #24733
Bundle IDorg.wordpress.alpha
Commitf943390
Installation URL13rmb7siop5vg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Aug 7, 2025

App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number28505
VersionPR #24733
Bundle IDcom.jetpack.alpha
Commitf943390
Installation URL3kmt8gbnnlafo
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@dcalhoun dcalhoun force-pushed the feat/gutenberg-kit-mentions-and-cross-posts branch from 51b3508 to 96080f3 Compare August 8, 2025 12:43
@dcalhoun dcalhoun requested review from Copilot and removed request for Copilot August 8, 2025 12:43
Copy link

@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 @mention and +cross-post suggestions in the WordPress editor. The implementation leverages GutenbergKit's new onAutocompleterTriggered event and appendTextAtCursor method to provide a seamless user experience for mentions and cross-posts.

  • Implements autocompleter delegate method to handle mention and cross-post triggers
  • Adds keyboard observation and constraint management for suggestions UI
  • Updates GutenbergKit dependency to support new autocompleter functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
NewGutenbergViewController.swift Main implementation of autocompleter functionality with keyboard handling and suggestions UI
CommentGutenbergEditorViewController.swift Adds empty implementation of autocompleter delegate method
Package.swift Updates GutenbergKit dependency to specific revision with autocompleter support
Package.resolved Updates resolved package state for GutenbergKit
Comments suppressed due to low confidence (1)

WordPress/Classes/ViewRelated/NewGutenberg/NewGutenbergViewController.swift:58

  • Using a specific revision instead of a semantic version makes dependency management difficult and prevents automatic updates. Consider using a tagged version once the GutenbergKit changes are released.
            refreshInterface()

@dcalhoun dcalhoun marked this pull request as ready for review August 8, 2025 12:51
@dcalhoun dcalhoun requested a review from crazytonyli August 8, 2025 12:51
@dcalhoun dcalhoun requested a review from crazytonyli August 12, 2025 15:21
@dcalhoun dcalhoun added this to the 26.2 milestone Aug 12, 2025
@dcalhoun dcalhoun enabled auto-merge August 13, 2025 01:05
Copy link

@dcalhoun dcalhoun added this pull request to the merge queue Aug 13, 2025
Merged via the queue into trunk with commit 720b6f0 Aug 13, 2025
30 of 32 checks passed
@dcalhoun dcalhoun deleted the feat/gutenberg-kit-mentions-and-cross-posts branch August 13, 2025 01:56
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