Skip to content

Conversation

@dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Oct 20, 2025

What?

Add UI for adding remote editors.

Why?

Simplify testing remote editors. Match Android Demo app functionality added in #155.

How?

Utilize wordpress-rs for discovery and authentication.

Testing Instructions

Important

Due to a recent regression in 3b8a4ba, testing a remote editor requires using the development server and disabling problematic code until it is fixed:

Temporary fix
diff --git a/src/utils/bridge.js b/src/utils/bridge.js
index ce9f36a..f04a6ea 100644
--- a/src/utils/bridge.js
+++ b/src/utils/bridge.js
@@ -5,7 +5,7 @@ import parseException from './exception-parser';
 import { debug } from './logger';
 import { isDevMode } from './dev-mode';
 import { basicFetch } from './fetch';
-import { getBlockTypes } from '@wordpress/blocks';
+// import { getBlockTypes } from '@wordpress/blocks';

 /**
  * Generic function to dispatch messages to both Android and iOS bridges.
@@ -93,16 +93,16 @@ export function onBlocksChanged( isEmpty = false ) {
  * @return {void}
  */
 export function showBlockInserter() {
-	const blocks = getBlockTypes().map( ( blockType ) => {
-		return {
-			name: blockType.name,
-			title: blockType.title,
-			description: blockType.description,
-			category: blockType.category,
-			keywords: blockType.keywords || [],
-		};
-	} );
-	dispatchToBridge( 'showBlockInserter', { blocks } );
+	// const blocks = getBlockTypes().map( ( blockType ) => {
+	// 	return {
+	// 		name: blockType.name,
+	// 		title: blockType.title,
+	// 		description: blockType.description,
+	// 		category: blockType.category,
+	// 		keywords: blockType.keywords || [],
+	// 	};
+	// } );
+	// dispatchToBridge( 'showBlockInserter', { blocks } );
 }

 /**
  1. Set up a site that has the Gutenberg plugin activated.
  2. Tap the plus button in the top-right corner.
  3. Add a site URL.
  4. Authenticate with the site.
  5. Open the site's editor.
  6. Verify assets fetched from the remote site are used.

Accessibility Testing Instructions

N/A, no visual changes.

Screenshots or screencast

Editor Add Editor
gbk-editors gbk-editor-add

Simplify adding remote editors via discovery and authentication with
wordpress-rs.
@dcalhoun dcalhoun added the [Type] Task Issues or PRs that have been broken down into an individual action to take label Oct 20, 2025
@dcalhoun dcalhoun marked this pull request as ready for review October 20, 2025 21:03
@dcalhoun dcalhoun requested a review from kean October 20, 2025 21:12
Copy link
Contributor

@kean kean left a comment

Choose a reason for hiding this comment

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

Nice!

@dcalhoun dcalhoun merged commit 6fa2136 into trunk Oct 21, 2025
11 checks passed
@dcalhoun dcalhoun deleted the task/ios-demo-app-discovers-remote-editors branch October 21, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Task Issues or PRs that have been broken down into an individual action to take

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants