Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 70 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Components: Use Link from `@wordpress/ui` instead of ExternalLink.
1 change: 1 addition & 0 deletions projects/js-packages/ai-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"@wordpress/i18n": "6.17.0",
"@wordpress/icons": "12.2.0",
"@wordpress/primitives": "4.44.0",
"@wordpress/ui": "0.11.0",
"@wordpress/url": "4.44.0",
"clsx": "2.1.1",
"debug": "4.4.3",
Expand Down
10 changes: 6 additions & 4 deletions projects/js-packages/ai-client/src/components/message/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/**
* External dependencies
*/
import { ExternalLink, Button } from '@wordpress/components';
import { Button } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
import { Icon, check } from '@wordpress/icons';
import { Link } from '@wordpress/ui';
import clsx from 'clsx';
/**
* Internal dependencies
Expand Down Expand Up @@ -126,9 +127,9 @@ export default function Message( {
*/
function LearnMoreLink(): ReactElement {
return (
<ExternalLink href="https://jetpack.com/redirect/?source=ai-guidelines">
<Link openInNewTab href="https://jetpack.com/redirect/?source=ai-guidelines">
{ __( 'Learn more', 'jetpack-ai-client' ) }
</ExternalLink>
</Link>
);
}

Expand Down Expand Up @@ -169,7 +170,8 @@ export function FairUsageLimitMessage(): ReactElement {
);
const element = createInterpolateElement( message, {
link: (
<ExternalLink
<Link
openInNewTab
href="https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy"
children={ null }
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Components: Use Link from `@wordpress/ui` instead of ExternalLink.
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ const JetpackFooter: FC< JetpackFooterProps > = ( { className, menu, ...otherPro
return (
<li key={ item.label }>
<Text
variant="body-sm"
variant="body-md"
className="jetpack-footer__menu-item"
render={
isButton ? (
<Link
render={ <Text variant="body-md" render={ <span /> } /> }
render={ <span /> }
tone="neutral"
variant="default"
role={ item.role }
Expand All @@ -84,7 +84,6 @@ const JetpackFooter: FC< JetpackFooterProps > = ( { className, menu, ...otherPro
/>
) : (
<Link
render={ <Text variant="body-md" render={ <a /> } /> }
tone="neutral"
variant="default"
href={ item.href || '' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exports[`JetpackFooter Render the component should match the snapshot: all props
>
<li>
<a
class="_83ed8a8da5dd50ea__text _43cec3e1eec1066d__p _131101940be12424__body-md _2c0831b0499dbd6e__a _336cd3e4e743482f__box-sizing _08e8a2e44959f892__outset-ring--focus d4250949359b05ce__link _92e0dfcaeee15b88__is-neutral _83ed8a8da5dd50ea__text _43cec3e1eec1066d__p _0e8d87a42c1f75fa__body-sm jetpack-footer__menu-item"
class="_2c0831b0499dbd6e__a _336cd3e4e743482f__box-sizing _08e8a2e44959f892__outset-ring--focus d4250949359b05ce__link _92e0dfcaeee15b88__is-neutral _83ed8a8da5dd50ea__text _43cec3e1eec1066d__p _131101940be12424__body-md jetpack-footer__menu-item"
href="undefinedadmin.php?page=my-jetpack#/products"
title=""
>
Expand All @@ -54,7 +54,7 @@ exports[`JetpackFooter Render the component should match the snapshot: all props
</li>
<li>
<a
class="_83ed8a8da5dd50ea__text _43cec3e1eec1066d__p _131101940be12424__body-md _2c0831b0499dbd6e__a _336cd3e4e743482f__box-sizing _08e8a2e44959f892__outset-ring--focus d4250949359b05ce__link _92e0dfcaeee15b88__is-neutral _83ed8a8da5dd50ea__text _43cec3e1eec1066d__p _0e8d87a42c1f75fa__body-sm jetpack-footer__menu-item"
class="_2c0831b0499dbd6e__a _336cd3e4e743482f__box-sizing _08e8a2e44959f892__outset-ring--focus d4250949359b05ce__link _92e0dfcaeee15b88__is-neutral _83ed8a8da5dd50ea__text _43cec3e1eec1066d__p _131101940be12424__body-md jetpack-footer__menu-item"
href="undefinedadmin.php?page=my-jetpack#/help"
title=""
>
Expand All @@ -63,7 +63,7 @@ exports[`JetpackFooter Render the component should match the snapshot: all props
</li>
<li>
<a
class="_83ed8a8da5dd50ea__text _43cec3e1eec1066d__p _131101940be12424__body-md _2c0831b0499dbd6e__a _336cd3e4e743482f__box-sizing _08e8a2e44959f892__outset-ring--focus d4250949359b05ce__link _92e0dfcaeee15b88__is-neutral _83ed8a8da5dd50ea__text _43cec3e1eec1066d__p _0e8d87a42c1f75fa__body-sm jetpack-footer__menu-item"
class="_2c0831b0499dbd6e__a _336cd3e4e743482f__box-sizing _08e8a2e44959f892__outset-ring--focus d4250949359b05ce__link _92e0dfcaeee15b88__is-neutral _83ed8a8da5dd50ea__text _43cec3e1eec1066d__p _131101940be12424__body-md jetpack-footer__menu-item"
href="/"
title=""
>
Expand All @@ -72,7 +72,7 @@ exports[`JetpackFooter Render the component should match the snapshot: all props
</li>
<li>
<span
class="_83ed8a8da5dd50ea__text _43cec3e1eec1066d__p _131101940be12424__body-md _2c0831b0499dbd6e__a _336cd3e4e743482f__box-sizing _08e8a2e44959f892__outset-ring--focus d4250949359b05ce__link _92e0dfcaeee15b88__is-neutral _83ed8a8da5dd50ea__text _43cec3e1eec1066d__p _0e8d87a42c1f75fa__body-sm jetpack-footer__menu-item"
class="_2c0831b0499dbd6e__a _336cd3e4e743482f__box-sizing _08e8a2e44959f892__outset-ring--focus d4250949359b05ce__link _92e0dfcaeee15b88__is-neutral _83ed8a8da5dd50ea__text _43cec3e1eec1066d__p _131101940be12424__body-md jetpack-footer__menu-item"
role="button"
tabindex="0"
>
Expand Down
Loading
Loading