Connectors: Support non-AI provider types and add JS extensibility e2e test#76722
Connectors: Support non-AI provider types and add JS extensibility e2e test#76722
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: 0 B Total Size: 7.66 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 6d48b73. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23432404661
|
jorgefilipecosta
left a comment
There was a problem hiding this comment.
Left two minor comments but things seem good 👍
…e test Extends registerDefaultConnectors to handle connector types beyond ai_provider, adds an e2e test plugin demonstrating client-side connector registration via the merging strategy, and verifies the full flow in a new test case. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Registers a second connector (test_server_only_service) in the test plugin that has no client-side registerConnector call with a render function, and asserts that no card is displayed for it in the Connectors UI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Allow hyphens in connector IDs (aligning with wordpress-develop@b8e0c3df), widen ConnectorData.type from literal 'ai_provider' to string, and filter connectors by render function before checking empty state in stage.tsx. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7900750 to
5156dd8
Compare
Update the e2e test plugin to use the renamed ConnectorRenderProps (name instead of label, logo instead of icon) from PR #76737. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e test (#76722) * Connectors: Support non-AI provider types and add JS extensibility e2e test Extends registerDefaultConnectors to handle connector types beyond ai_provider, adds an e2e test plugin demonstrating client-side connector registration via the merging strategy, and verifies the full flow in a new test case. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Tests: Add e2e coverage for server-only connector without JS render Registers a second connector (test_server_only_service) in the test plugin that has no client-side registerConnector call with a render function, and asserts that no card is displayed for it in the Connectors UI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update plugin header to document both test connectors Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix comments to accurately describe server+client merging behavior Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Disable import/no-extraneous-dependencies for test plugin module Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address PR feedback: hyphen support, type widening, and empty state fix Allow hyphens in connector IDs (aligning with wordpress-develop@b8e0c3df), widen ConnectorData.type from literal 'ai_provider' to string, and filter connectors by render function before checking empty state in stage.tsx. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix test plugin to use renamed connector props (name/logo) Update the e2e test plugin to use the renamed ConnectorRenderProps (name instead of label, logo instead of icon) from PR #76737. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>
|
I just cherry-picked this PR to the wp/7.0 branch to get it included in the next release: c27ff43 |
This updates the pinned hash from the `gutenberg` from `2ee7ede6be6d4e55d5c7047394c5c4e0ea8d521d` to `3edafcc90fc4520939d69279e26ace69390582be`. The following changes are included: - RTC: Use activation hook to enable RTC by default (WordPress/gutenberg#76736) - Connectors: Align client-side registration API with server-side (WordPress/gutenberg#76737) - Connectors: Support non-AI provider types and add JS extensibility e2e test (WordPress/gutenberg#76722) - RTC: Add E2E "stress test" with complex interactions (WordPress/gutenberg#76055) - Button: restore specificity of high-contrast mode focus ring (WordPress/gutenberg#76719) (WordPress/gutenberg#76770) - Connectors: Improve AI plugin button (WordPress/gutenberg#76759) - RTC: Use prepared queries instead of `*_post_meta` functions (WordPress/gutenberg#76779) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/2ee7ede6be6d4e55d5c7047394c5c4e0ea8d521d…3edafcc90fc4520939d69279e26ace69390582be. Log created with: git log --reverse --format="- %s" 2ee7ede6be6d4e55d5c7047394c5c4e0ea8d521d..3edafcc90fc4520939d69279e26ace69390582be | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. git-svn-id: https://develop.svn.wordpress.org/trunk@62102 602fd350-edb4-49c9-b593-d223f7449a82
This updates the pinned hash from the `gutenberg` from `2ee7ede6be6d4e55d5c7047394c5c4e0ea8d521d` to `3edafcc90fc4520939d69279e26ace69390582be`. The following changes are included: - RTC: Use activation hook to enable RTC by default (WordPress/gutenberg#76736) - Connectors: Align client-side registration API with server-side (WordPress/gutenberg#76737) - Connectors: Support non-AI provider types and add JS extensibility e2e test (WordPress/gutenberg#76722) - RTC: Add E2E "stress test" with complex interactions (WordPress/gutenberg#76055) - Button: restore specificity of high-contrast mode focus ring (WordPress/gutenberg#76719) (WordPress/gutenberg#76770) - Connectors: Improve AI plugin button (WordPress/gutenberg#76759) - RTC: Use prepared queries instead of `*_post_meta` functions (WordPress/gutenberg#76779) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/2ee7ede6be6d4e55d5c7047394c5c4e0ea8d521d…3edafcc90fc4520939d69279e26ace69390582be. Log created with: git log --reverse --format="- %s" 2ee7ede6be6d4e55d5c7047394c5c4e0ea8d521d..3edafcc90fc4520939d69279e26ace69390582be | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. Built from https://develop.svn.wordpress.org/trunk@62102 git-svn-id: http://core.svn.wordpress.org/trunk@61384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Summary
registerDefaultConnectorsto handle connector types beyondai_provider(previously non-AI connectors were skipped).sanitizefunction indefault-connectors.tsxneeded updating to reflect wordpress-develop@b8e0c3df, which now allows hyphens in connector IDs. The connector ID validation regex changed from/^[a-z0-9_]+$/to/^[a-z0-9_-]+$/, so the client-side sanitize should pass through valid IDs unchanged rather than replacing characters.connectors-js-extensibility) that registers two custom-type connectors on the server:test_custom_service— also registered client-side via a script module. The store merges both registrations so the final connector combines the render function from JS with the metadata from PHP.test_server_only_service— server-only, with no client-side render function..mjsfile into a subdirectory to follow existing e2e test plugin conventions.Test plan
🤖 Generated with Claude Code