+ { __( 'Use Parse.ly AI to generate a concise, engaging excerpt for your post.', 'wp-parsely' ) }
+
+
{ isLoading && (
@@ -194,7 +260,7 @@ const PostExcerptGenerator = () => {
) }
{
if ( ! excerptData.isUnderReview ) {
@@ -218,29 +284,26 @@ const PostExcerptGenerator = () => {
help={ wordCountString ? wordCountString : null }
/>
-
-
-
-
-
- { __( 'Generate With Parse.ly', 'wp-parsely' ) }
- { __( 'Beta', 'wp-parsely' ) }
-
-
+
+ { isDocumentSettingPanel && (
+
+ ) }
+
+
{ error && (
{
{ error.Message() }
) }
-
- { excerptData.isUnderReview ? (
- <>
+ { excerptData.isUnderReview ? (
+ <>
+ { isDocumentSettingPanel && generateWithParselyHeader }
+
- >
- ) : (
-
- ) }
-
-
+
+ >
+ ) : (
+ <>
+
{
+ onSettingChange( 'Persona', selectedPersona );
+ setPersona( selectedPersona );
+ } }
+ onSettingChange={ onSettingChange }
+ onToneChange={ ( selectedTone ) => {
+ onSettingChange( 'Tone', selectedTone );
+ setTone( selectedTone );
+ } }
+ persona={ settings.ExcerptSuggestions.Persona }
+ tone={ settings.ExcerptSuggestions.Tone }
+ />
+ { isDocumentSettingPanel && generateWithParselyHeader }
+
+
+
+ >
+ ) }
+
+ { isDocumentSettingPanel && (
+
+ ) }
);
@@ -320,21 +407,3 @@ const LoadingAnimation = (): React.JSX.Element => {
);
};
-/**
- * The ExcerptPanel component verifies that the current post type supports excerpts,
- * and then renders the PostExcerptGenerator component.
- *
- * @since 3.13.0
- */
-export const ExcerptPanel = () => {
- return (
-
-
-
-
-
- );
-};
diff --git a/src/content-helper/editor-sidebar/excerpt-suggestions/excerpt-suggestions.scss b/src/content-helper/editor-sidebar/excerpt-suggestions/excerpt-suggestions.scss
new file mode 100644
index 000000000..ba12ee00a
--- /dev/null
+++ b/src/content-helper/editor-sidebar/excerpt-suggestions/excerpt-suggestions.scss
@@ -0,0 +1,117 @@
+@import "../../common/css/variables";
+@import "../../common/css/functions";
+
+.editor-post-excerpt__loading_animation {
+ position: absolute;
+ top: to_rem(29px);
+ left: to_rem(9px);
+}
+
+.editor-post-excerpt__textarea {
+ margin-bottom: var(--grid-unit-10);
+}
+
+.editor-post-excerpt .excerpt-suggestions-text {
+ display: flex;
+ padding: to_rem(6px) 0 var(--grid-unit-20) 0;
+ flex-direction: column;
+ align-items: flex-start;
+ gap: to_rem(10px);
+ align-self: stretch;
+}
+
+.wp-parsely-excerpt-generator {
+ &.is-doc-set-panel {
+ margin-top: to_rem(20px);
+ }
+
+ // Suggestion settings.
+ .excerpt-suggestions-settings {
+ display: flex;
+ padding: to_rem(6px) 0 var(--grid-unit-20) 0;
+ flex-direction: column;
+ align-items: flex-start;
+ gap: var(--grid-unit-20);
+ align-self: stretch;
+
+ > div {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+ gap: var(--grid-unit-10);
+ align-self: stretch;
+ }
+ }
+
+ // "Generate with Parse.ly" header.
+ .wp-parsely-excerpt-generator-header {
+ align-items: center;
+ display: flex;
+ justify-content: flex-start;
+
+ .wp-parsely-excerpt-generator-header-label {
+ font-size: to_rem(11px);
+ font-weight: 600;
+ line-height: 1.4;
+ text-transform: uppercase;
+ display: inline-block;
+ padding: 0;
+ margin-left: to_rem(5px);
+
+ span.beta-label {
+ padding-left: to_rem(6px);
+ color: var(--Gutenberg-Gray-700, #757575);
+ }
+ }
+ }
+
+ // "Generate Excerpt" button.
+ .excerpt-suggestions-generate {
+ display: flex;
+ margin: var(--grid-unit-10) 0;
+ flex-direction: column;
+ align-items: flex-start;
+ align-self: stretch;
+
+ .components-button {
+ height: to_rem(40px);
+ display: flex;
+ padding: var(--grid-unit-10) var(--grid-unit-15);
+ justify-content: center;
+ align-items: center;
+ align-self: stretch;
+ border-radius: 2px;
+ }
+ }
+
+ // Suggestion review controls.
+ .wp-parsely-excerpt-suggestions-review-controls {
+ display: flex;
+ gap: var(--grid-unit-10);
+
+ button {
+ flex-grow: 1;
+ height: to_rem(40px);
+ justify-content: center;
+ margin-bottom: var(--grid-unit-10);
+ margin-top: var(--grid-unit-10);
+ padding: var(--grid-unit-10) var(--grid-unit-15);
+ }
+ }
+
+ .components-notice {
+ margin: var(--grid-unit-20) 0 var(--grid-unit-15) 0;
+
+ .components-notice__content {
+ margin: 0;
+
+ .content-helper-error-message {
+ margin-top: 0 !important;
+
+ p:last-child {
+ margin-bottom: 0 !important;
+ }
+ }
+ }
+ }
+}
diff --git a/src/content-helper/editor-sidebar/excerpt-suggestions/excerpt-suggestions.tsx b/src/content-helper/editor-sidebar/excerpt-suggestions/excerpt-suggestions.tsx
new file mode 100644
index 000000000..d94443f02
--- /dev/null
+++ b/src/content-helper/editor-sidebar/excerpt-suggestions/excerpt-suggestions.tsx
@@ -0,0 +1,103 @@
+/**
+ * WordPress dependencies
+ */
+import { dispatch } from '@wordpress/data';
+import { PostTypeSupportCheck } from '@wordpress/editor';
+import { addFilter, removeFilter } from '@wordpress/hooks';
+import { __ } from '@wordpress/i18n';
+import { registerPlugin } from '@wordpress/plugins';
+
+/**
+ * Internal dependencies
+ */
+import { dispatchCoreEditPost } from '../../../@types/gutenberg/types';
+import { PluginDocumentSettingPanel } from '../../../@types/gutenberg/wrapper';
+import { SettingsProvider } from '../../common/settings';
+import { getContentHelperPermissions } from '../../common/utils/permissions';
+import { getSettingsFromJson, PARSELY_SIDEBAR_PLUGIN_ID } from '../editor-sidebar';
+import './excerpt-suggestions.scss';
+import { PostExcerptSuggestions } from './component-panel';
+
+/**
+ * The ExcerptDocumentSettingPanel component verifies that the current post type supports excerpts,
+ * and then renders the PostExcerptSuggestions component.
+ *
+ * @since 3.17.0
+ */
+export const ExcerptDocumentSettingPanel = () => {
+ return (
+
+
+
+
+
+
+
+ );
+};
+
+/**
+ * The ExcerptSuggestions function registers the custom excerpt panel and removes
+ * the default excerpt panel.
+ *
+ * @since 3.13.0
+ *
+ * @param {never} settings Settings from the plugins.registerPlugin filter. Not used.
+ * @param {string} name The plugin name.
+ */
+const ExcerptSuggestions = ( settings: never, name: string ) => {
+ if ( name !== PARSELY_SIDEBAR_PLUGIN_ID ) {
+ return settings;
+ }
+
+ // Check if the user has the necessary permissions to use the ExcerptSuggestions feature.
+ const permissions = getContentHelperPermissions();
+ if ( ! permissions.ExcerptSuggestions ) {
+ return settings;
+ }
+
+ const isJetpackAiEnabled =
+ window?.Jetpack_Editor_Initial_State?.available_blocks[ 'ai-content-lens' ];
+
+ if ( isJetpackAiEnabled ) {
+ // eslint-disable-next-line no-console
+ console.log( 'Parse.ly: Jetpack AI is enabled and will be disabled.' );
+
+ // Remove Jetpack AI excerpt block.
+ // https://github.com/Automattic/jetpack/blob/trunk/projects/plugins/jetpack/extensions/plugins/ai-content-lens/editor.js#L52-L56
+ removeFilter( 'blocks.registerBlockType', 'jetpack/ai-content-lens-features' );
+ }
+
+ // Register the custom excerpt panel.
+ registerPlugin( 'wp-parsely-excerpt-suggestions', {
+ render: () => (
+
+ ),
+ } );
+
+ /* Remove the excerpt panel by dispatching an action. */ // @ts-ignore
+ if ( dispatch( 'core/editor' )?.removeEditorPanel ) { // @ts-ignore
+ dispatch( 'core/editor' )?.removeEditorPanel( 'post-excerpt' );
+ } else {
+ // Deprecated in WordPress 6.5.
+ dispatchCoreEditPost?.removeEditorPanel( 'post-excerpt' );
+ }
+
+ return settings;
+};
+
+export function initExcerptSuggestions() {
+ // Add the ExcerptSuggestions function to the plugins.registerPlugin filter.
+ // Priority is set to 1000 to ensure that the function runs as late as possible.
+ addFilter( 'plugins.registerPlugin', 'wp-parsely-excerpt-suggestions', ExcerptSuggestions, 1000 );
+}
diff --git a/src/content-helper/editor-sidebar/excerpt-suggestions/provider.ts b/src/content-helper/editor-sidebar/excerpt-suggestions/provider.ts
new file mode 100644
index 000000000..29b50d808
--- /dev/null
+++ b/src/content-helper/editor-sidebar/excerpt-suggestions/provider.ts
@@ -0,0 +1,68 @@
+/**
+ * WordPress dependencies
+ */
+import { addQueryArgs } from '@wordpress/url';
+
+/**
+ * Internal dependencies
+ */
+import { BaseProvider } from '../../common/base-provider';
+
+/**
+ * Provides the generate excerpt functionality to be used in other components.
+ *
+ * @since 3.13.0
+ */
+export class ExcerptSuggestionsProvider extends BaseProvider {
+ /**
+ * The singleton instance of the ExcerptSuggestionsProvider.
+ *
+ * @since 3.16.0
+ */
+ private static instance: ExcerptSuggestionsProvider;
+
+ /**
+ * Returns the singleton instance of the TitleSuggestionsProvider.
+ *
+ * @since 3.16.0
+ *
+ * @return {ExcerptSuggestionsProvider} The singleton instance.
+ */
+ public static getInstance(): ExcerptSuggestionsProvider {
+ if ( ! this.instance ) {
+ this.instance = new ExcerptSuggestionsProvider();
+ }
+
+ return this.instance;
+ }
+
+ /**
+ * Generates an excerpt for a given post.
+ *
+ * @param {string} title The title of the post.
+ * @param {string} content The content of the post.
+ * @param {string} persona The persona to use for the suggestion.
+ * @param {string} tone The tone to use for the suggestion.
+ *
+ * @return {Promise
} The generated excerpt.
+ */
+ public async generateExcerpt(
+ title: string, content: string, persona: string, tone: string
+ ): Promise {
+ if ( '' === title ) {
+ title = 'Untitled';
+ }
+
+ return await this.fetch( {
+ method: 'POST',
+ path: addQueryArgs( '/wp-parsely/v2/content-helper/excerpt-generator/generate', {
+ title,
+ persona,
+ style: tone,
+ } ),
+ data: {
+ text: content,
+ },
+ } );
+ }
+}
diff --git a/src/content-helper/editor-sidebar/performance-stats/component-panel-categories.tsx b/src/content-helper/editor-sidebar/performance-stats/component-panel-categories.tsx
index cc59a42d7..33a237a62 100644
--- a/src/content-helper/editor-sidebar/performance-stats/component-panel-categories.tsx
+++ b/src/content-helper/editor-sidebar/performance-stats/component-panel-categories.tsx
@@ -73,7 +73,7 @@ export const PerformanceCategoriesPanel = ( {
{
if ( isInEnum( selection, Metric ) ) {
setMetric( selection as Metric );
@@ -83,7 +83,7 @@ export const PerformanceCategoriesPanel = ( {
{ Object.values( Metric ).map( ( value ) => (
) ) }
diff --git a/src/content-helper/editor-sidebar/performance-stats/component-panel-referrers.tsx b/src/content-helper/editor-sidebar/performance-stats/component-panel-referrers.tsx
index 9d96eef76..9c502707c 100644
--- a/src/content-helper/editor-sidebar/performance-stats/component-panel-referrers.tsx
+++ b/src/content-helper/editor-sidebar/performance-stats/component-panel-referrers.tsx
@@ -52,7 +52,7 @@ export const PerformanceReferrersPanel = ( {
{
if ( isInEnum( selection, Metric ) ) {
setMetric( selection as Metric );
@@ -62,7 +62,7 @@ export const PerformanceReferrersPanel = ( {
{ Object.values( Metric ).map( ( value ) => (
) ) }
diff --git a/src/content-helper/editor-sidebar/performance-stats/component.tsx b/src/content-helper/editor-sidebar/performance-stats/component.tsx
index c899af5a1..52afd9cba 100644
--- a/src/content-helper/editor-sidebar/performance-stats/component.tsx
+++ b/src/content-helper/editor-sidebar/performance-stats/component.tsx
@@ -251,7 +251,7 @@ export const PerformanceStats = (
value={ settings.PerformanceStats.Period }
prefix={
- { __( 'Period: ', 'wp-parsely' ) }
+ { __( 'Period:', 'wp-parsely' ) }
}
onChange={ ( selection ) => {
diff --git a/src/content-helper/editor-sidebar/performance-stats/performance-stats.scss b/src/content-helper/editor-sidebar/performance-stats/performance-stats.scss
index 38947302b..5d48d96aa 100644
--- a/src/content-helper/editor-sidebar/performance-stats/performance-stats.scss
+++ b/src/content-helper/editor-sidebar/performance-stats/performance-stats.scss
@@ -49,7 +49,6 @@
/** Level 3 heading */
&.level-3 {
-
h3 {
margin-bottom: 0;
line-height: to_rem(16px);
diff --git a/src/content-helper/editor-sidebar/performance-stats/provider.ts b/src/content-helper/editor-sidebar/performance-stats/provider.ts
index 5bc524cd6..7219385e6 100644
--- a/src/content-helper/editor-sidebar/performance-stats/provider.ts
+++ b/src/content-helper/editor-sidebar/performance-stats/provider.ts
@@ -58,8 +58,12 @@ export class PerformanceStatsProvider extends BaseProvider {
public async getPerformanceStats( period: Period ): Promise
{
const editor = select( 'core/editor' );
- // We cannot show data for non-published posts.
- if ( false === editor.isCurrentPostPublished() ) {
+ // Get the current post's status.
+ const currentPostStatus = editor.getEditedPostAttribute( 'status' ) ?? 'draft';
+ const trackableStatuses = window.wpParselyTrackableStatuses ?? [ 'publish' ];
+
+ // We cannot show data for non-published posts that are not in the trackable statuses.
+ if ( ! editor.isCurrentPostPublished() && ! trackableStatuses.includes( currentPostStatus ) ) {
return Promise.reject(
new ContentHelperError( __(
'This post is not published, so its details are unavailable.',
@@ -68,13 +72,13 @@ export class PerformanceStatsProvider extends BaseProvider {
);
}
- // Get post URL.
- const postUrl = editor.getPermalink();
+ // Get post ID.
+ const postID = editor.getCurrentPostId();
- if ( null === postUrl ) {
+ if ( null === postID ) {
return Promise.reject(
new ContentHelperError( __(
- "The post's URL returned null.",
+ "The post's ID returned null.",
'wp-parsely' ), ContentHelperErrorCode.PostIsNotPublished
)
);
@@ -84,10 +88,10 @@ export class PerformanceStatsProvider extends BaseProvider {
let performanceData, referrerData;
try {
performanceData = await this.fetchPerformanceDataFromWpEndpoint(
- period, postUrl
+ period, postID
);
referrerData = await this.fetchReferrerDataFromWpEndpoint(
- period, postUrl, performanceData.views
+ period, postID, performanceData.views
);
} catch ( contentHelperError ) {
return Promise.reject( contentHelperError );
@@ -100,30 +104,30 @@ export class PerformanceStatsProvider extends BaseProvider {
* Fetches the performance data for the current post from the WordPress REST
* API.
*
- * @param {Period} period The period for which to fetch data.
- * @param {string} postUrl
+ * @param {Period} period The period for which to fetch data.
+ * @param {number} postId The post's ID.
*
* @return {Promise } The current post's details.
*/
private async fetchPerformanceDataFromWpEndpoint(
- period: Period, postUrl: string
+ period: Period, postId: number
): Promise {
const response = await this.fetch( {
path: addQueryArgs(
- '/wp-parsely/v1/stats/post/detail', {
+ `/wp-parsely/v2/stats/post/${ postId }/details`, {
...getApiPeriodParams( period ),
itm_source: this.itmSource,
- url: postUrl,
} ),
} );
// No data was returned.
if ( response.length === 0 ) {
+ const postTitle = select( 'core/editor' ).getEditedPostAttribute( 'title' ) ?? '';
return Promise.reject( new ContentHelperError(
sprintf(
- /* translators: URL of the published post */
- __( 'The post %s has 0 views, or the Parse.ly API returned no data.',
- 'wp-parsely' ), postUrl
+ /* translators: Title of the published post */
+ __( '%s has 0 views, or the Parse.ly API returned no data.',
+ 'wp-parsely' ), postTitle
), ContentHelperErrorCode.ParselyApiReturnedNoData, ''
) );
}
@@ -133,8 +137,8 @@ export class PerformanceStatsProvider extends BaseProvider {
return Promise.reject( new ContentHelperError(
sprintf(
/* translators: URL of the published post */
- __( 'Multiple results were returned for the post %s by the Parse.ly API.',
- 'wp-parsely' ), postUrl
+ __( 'Multiple results were returned for the post %d by the Parse.ly API.',
+ 'wp-parsely' ), postId
), ContentHelperErrorCode.ParselyApiReturnedTooManyResults
) );
}
@@ -145,22 +149,21 @@ export class PerformanceStatsProvider extends BaseProvider {
/**
* Fetches referrer data for the current post from the WordPress REST API.
*
- * @param {Period} period The period for which to fetch data.
- * @param {string} postUrl The post's URL.
- * @param {string} totalViews Total post views (including direct views).
+ * @param {Period} period The period for which to fetch data.
+ * @param {string|number} postId The post's ID.
+ * @param {string} totalViews Total post views (including direct views).
*
* @return {Promise} The post's referrer data.
*/
private async fetchReferrerDataFromWpEndpoint(
- period: Period, postUrl: string, totalViews: string
+ period: Period, postId: string|number, totalViews: string
): Promise {
const response = await this.fetch( {
path: addQueryArgs(
- '/wp-parsely/v1/referrers/post/detail', {
+ `/wp-parsely/v2/stats/post/${ postId }/referrers`, {
...getApiPeriodParams( period ),
itm_source: this.itmSource,
total_views: totalViews, // Needed to calculate direct views.
- url: postUrl,
} ),
} );
diff --git a/src/content-helper/editor-sidebar/related-posts/component.tsx b/src/content-helper/editor-sidebar/related-posts/component.tsx
index 3358ccac0..8eb215846 100644
--- a/src/content-helper/editor-sidebar/related-posts/component.tsx
+++ b/src/content-helper/editor-sidebar/related-posts/component.tsx
@@ -410,7 +410,7 @@ export const RelatedPostsPanel = (): React.JSX.Element => {
size="__unstable-large"
onChange={ ( value ) => onMetricChange( value ) }
prefix={
- { __( 'Metric: ', 'wp-parsely' ) }
+ { __( 'Metric:', 'wp-parsely' ) }
}
value={ metric }
>
@@ -424,7 +424,7 @@ export const RelatedPostsPanel = (): React.JSX.Element => {
size="__unstable-large"
value={ period }
prefix={
- { __( 'Period: ', 'wp-parsely' ) }
+ { __( 'Period:', 'wp-parsely' ) }
}
onChange={ ( selection ) => onPeriodChange( selection ) }
>
diff --git a/src/content-helper/editor-sidebar/related-posts/provider.ts b/src/content-helper/editor-sidebar/related-posts/provider.ts
index 6345f4f19..6051c4ca8 100644
--- a/src/content-helper/editor-sidebar/related-posts/provider.ts
+++ b/src/content-helper/editor-sidebar/related-posts/provider.ts
@@ -146,7 +146,7 @@ export class RelatedPostsProvider extends BaseProvider {
*/
private async fetchRelatedPostsFromWpEndpoint( query: RelatedPostsApiQuery ): Promise {
const response = this.fetch( {
- path: addQueryArgs( '/wp-parsely/v1/stats/posts', {
+ path: addQueryArgs( '/wp-parsely/v2/stats/posts', {
...query.query,
itm_source: 'wp-parsely-content-helper',
} ),
diff --git a/src/content-helper/editor-sidebar/related-posts/related-posts.scss b/src/content-helper/editor-sidebar/related-posts/related-posts.scss
index 8b83c7b2c..b49d45604 100644
--- a/src/content-helper/editor-sidebar/related-posts/related-posts.scss
+++ b/src/content-helper/editor-sidebar/related-posts/related-posts.scss
@@ -106,7 +106,6 @@
}
.related-posts-wrapper {
-
.related-posts-descr {
font-size: to_rem(13px);
font-style: normal;
@@ -203,13 +202,11 @@
}
.wp-parsely-icon {
-
path {
fill: #1e1e1e;
}
&:hover {
-
path {
fill: #0073aa;
}
diff --git a/src/content-helper/editor-sidebar/smart-linking/class-smart-linking.php b/src/content-helper/editor-sidebar/smart-linking/class-smart-linking.php
index 75148140f..56546772a 100644
--- a/src/content-helper/editor-sidebar/smart-linking/class-smart-linking.php
+++ b/src/content-helper/editor-sidebar/smart-linking/class-smart-linking.php
@@ -20,7 +20,17 @@
*
* @since 3.16.0
*/
-class Smart_Linking extends Content_Helper_Feature {
+class Smart_Linking extends Editor_Sidebar_Feature {
+ /**
+ * Returns the feature's name.
+ *
+ * @since 3.17.0
+ *
+ * @return string
+ */
+ public static function get_feature_name(): string {
+ return 'smart_linking';
+ }
/**
* Allowed blocks for the Smart Linking feature.
@@ -34,53 +44,19 @@ class Smart_Linking extends Content_Helper_Feature {
);
/**
- * Instance of Editor_Sidebar class.
+ * Constructor.
*
* @since 3.16.0
*
* @param Editor_Sidebar $editor_sidebar Instance of Editor_Sidebar class.
*/
public function __construct( Editor_Sidebar $editor_sidebar ) {
- $this->parsely = $editor_sidebar->parsely;
+ parent::__construct( $editor_sidebar );
add_action( 'delete_post', array( $this, 'purge_smart_links' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'add_inline_script' ) );
}
- /**
- * Returns the feature's filter name. The feature filter controls the
- * enabled/disabled state of a particular Content Helper feature.
- *
- * @since 3.16.0
- *
- * @return string The filter name.
- */
- public static function get_feature_filter_name(): string {
- return ''; // Not in use for this feature.
- }
-
- /**
- * Returns the feature's script ID.
- *
- * @since 3.16.0
- *
- * @return string The script ID.
- */
- public static function get_script_id(): string {
- return ''; // Not in use for this feature.
- }
-
- /**
- * Returns the feature's style ID.
- *
- * @since 3.16.0
- *
- * @return string The style ID.
- */
- public static function get_style_id(): string {
- return ''; // Not in use for this feature.
- }
-
/**
* Runs the feature's initialization process.
*
@@ -101,27 +77,6 @@ public function run(): void {
$this->register_taxonomy( 'smart_link_destination', __( 'Smart Link Destination', 'wp-parsely' ) );
}
- /**
- * Returns whether the feature can be enabled for the current user.
- *
- * @since 3.16.0
- *
- * @param bool ...$conditions Conditions that need to be met besides filters
- * for the function to return true.
- * @return bool Whether the feature can be enabled.
- */
- protected function can_enable_feature( bool ...$conditions ): bool {
- if ( ! parent::can_enable_feature( ...$conditions ) ) {
- return false;
- }
-
- return Permissions::current_user_can_use_pch_feature(
- 'smart_linking',
- $this->parsely->get_options()['content_helper'],
- get_the_ID()
- );
- }
-
/**
* Registers the custom post type for the Smart Links.
*
diff --git a/src/content-helper/editor-sidebar/smart-linking/component-block-overlay.tsx b/src/content-helper/editor-sidebar/smart-linking/component-block-overlay.tsx
index c73923e4a..89d60cafe 100644
--- a/src/content-helper/editor-sidebar/smart-linking/component-block-overlay.tsx
+++ b/src/content-helper/editor-sidebar/smart-linking/component-block-overlay.tsx
@@ -161,7 +161,7 @@ export const BlockOverlay = ( {
*
* @return {import('react').JSX.Element} The JSX Element.
*/
-const BlockOverlayFullContent = ( ): React.JSX.Element => {
+const BlockOverlayFullContent = (): React.JSX.Element => {
const { overlayBlocks } = useSelect( ( select ) => {
const { getOverlayBlocks } = select( SmartLinkingStore );
diff --git a/src/content-helper/editor-sidebar/smart-linking/component.tsx b/src/content-helper/editor-sidebar/smart-linking/component.tsx
index 2cd17ea4f..9165d4dd9 100644
--- a/src/content-helper/editor-sidebar/smart-linking/component.tsx
+++ b/src/content-helper/editor-sidebar/smart-linking/component.tsx
@@ -662,7 +662,7 @@ export const SmartLinkingPanel = ( {
'wp-parsely',
) }