diff --git a/package-lock.json b/package-lock.json index adc99623078299..206421817b83ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -62956,7 +62956,8 @@ "@wordpress/element": "file:../../packages/element", "@wordpress/i18n": "file:../../packages/i18n", "@wordpress/icons": "file:../../packages/icons", - "@wordpress/ui": "file:../../packages/ui" + "@wordpress/ui": "file:../../packages/ui", + "@wordpress/url": "file:../../packages/url" } }, "routes/content-guidelines": { diff --git a/routes/connectors-home/ai-plugin-callout.tsx b/routes/connectors-home/ai-plugin-callout.tsx index faf5775ece40a0..44390fc3813dff 100644 --- a/routes/connectors-home/ai-plugin-callout.tsx +++ b/routes/connectors-home/ai-plugin-callout.tsx @@ -12,6 +12,7 @@ import { useState, } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; +import { addQueryArgs } from '@wordpress/url'; /** * Internal dependencies @@ -200,16 +201,16 @@ export function AiPluginCallout() { const getMessage = () => { if ( isJustConnected ) { return __( - 'The AI plugin is ready to use. You can use it to generate featured images, alt text, titles, excerpts and more.' + 'The AI plugin is ready to use. You can use it to generate featured images, alt text, titles, excerpts and more. Learn more' ); } if ( isActiveNoProvider ) { return __( - 'The AI plugin is installed. Connect a provider below to generate featured images, alt text, titles, excerpts, and more.' + 'The AI plugin is installed. Connect a provider below to generate featured images, alt text, titles, excerpts, and more. Learn more' ); } return __( - 'The AI plugin can use your connectors to generate featured images, alt text, titles, excerpts and more.' + 'The AI plugin can use your connectors to generate featured images, alt text, titles, excerpts and more. Learn more' ); }; @@ -218,7 +219,7 @@ export function AiPluginCallout() { return { label: isBusy ? __( 'Installing…' ) - : __( 'Install AI Experiments' ), + : __( 'Install the AI plugin' ), disabled: isBusy, onClick: isBusy ? undefined : installPlugin, }; @@ -227,7 +228,7 @@ export function AiPluginCallout() { return { label: isBusy ? __( 'Activating…' ) - : __( 'Activate AI Experiments' ), + : __( 'Activate the AI plugin' ), disabled: isBusy, onClick: isBusy ? undefined : activatePlugin, }; @@ -239,38 +240,33 @@ export function AiPluginCallout() {

{ createInterpolateElement( getMessage(), { strong: , + // @ts-ignore children are injected by createInterpolateElement at runtime. + a: , } ) }

-
- { showInstallActivate ? ( - - ) : ( - justActivated && ( - - ) - ) } - - { __( 'Learn more' ) } - -
+ { showInstallActivate ? ( + + ) : ( + + ) } diff --git a/routes/connectors-home/package.json b/routes/connectors-home/package.json index 16496bff3ba523..3d258a488b7f1f 100644 --- a/routes/connectors-home/package.json +++ b/routes/connectors-home/package.json @@ -19,6 +19,7 @@ "@wordpress/element": "file:../../packages/element", "@wordpress/i18n": "file:../../packages/i18n", "@wordpress/icons": "file:../../packages/icons", - "@wordpress/ui": "file:../../packages/ui" + "@wordpress/ui": "file:../../packages/ui", + "@wordpress/url": "file:../../packages/url" } } diff --git a/routes/connectors-home/style.scss b/routes/connectors-home/style.scss index bf050c105ee13a..a0a6d87533c6ba 100644 --- a/routes/connectors-home/style.scss +++ b/routes/connectors-home/style.scss @@ -60,6 +60,7 @@ $sticky-header-clearance: 120px; flex-direction: column; gap: 12px; padding-top: 2px; + align-items: flex-start; p { margin: 0; @@ -68,12 +69,6 @@ $sticky-header-clearance: 120px; } } - &__actions { - display: flex; - gap: 12px; - align-items: center; - } - &__decoration { position: absolute; inset-inline-end: 8px; diff --git a/test/e2e/specs/admin/connectors.spec.js b/test/e2e/specs/admin/connectors.spec.js index c345046b02367c..11c9829666efa1 100644 --- a/test/e2e/specs/admin/connectors.spec.js +++ b/test/e2e/specs/admin/connectors.spec.js @@ -386,11 +386,13 @@ test.describe( 'Connectors', () => { await expect( banner ).toBeVisible(); // Verify the banner message mentions the AI plugin. - await expect( banner.getByText( 'AI plugin' ) ).toBeVisible(); + await expect( + banner.locator( 'p' ).getByText( 'AI plugin' ) + ).toBeVisible(); // Verify the Install button is present. await expect( - banner.getByRole( 'button', { name: 'Install AI Experiments' } ) + banner.getByRole( 'button', { name: 'Install the AI plugin' } ) ).toBeVisible(); // Verify the Learn more link is present.