From 5815d832f4f1b33514b18ecb3206aacf92f7d70a Mon Sep 17 00:00:00 2001 From: Douglas Date: Wed, 24 Jul 2024 20:21:37 -0300 Subject: [PATCH 1/2] add feedback button to sidebar --- .../ai-assistant-plugin-sidebar/index.tsx | 17 ++++++++++++++--- .../ai-assistant-plugin-sidebar/style.scss | 13 ++++++++++++- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/index.tsx b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/index.tsx index a4411cf876edf..22d2eabff13d2 100644 --- a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/index.tsx +++ b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/index.tsx @@ -3,12 +3,13 @@ */ import { JetpackEditorPanelLogo } from '@automattic/jetpack-shared-extension-utils'; import { useAnalytics } from '@automattic/jetpack-shared-extension-utils'; -import { PanelBody, PanelRow, BaseControl } from '@wordpress/components'; +import { PanelBody, PanelRow, BaseControl, Button } from '@wordpress/components'; import { store as coreStore } from '@wordpress/core-data'; import { useSelect } from '@wordpress/data'; import { PluginPrePublishPanel, PluginDocumentSettingPanel } from '@wordpress/edit-post'; import { store as editorStore } from '@wordpress/editor'; import { __ } from '@wordpress/i18n'; +import { Icon, external } from '@wordpress/icons'; import debugFactory from 'debug'; import React from 'react'; /** @@ -88,15 +89,25 @@ const JetpackAndSettingsContent = ( { ) } { requireUpgrade && ! isUsagePanelAvailable && ( - + ) } { isUsagePanelAvailable && ( - + ) } + + ); }; diff --git a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/style.scss b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/style.scss index 0ae7fcaa795bb..5b3b297216757 100644 --- a/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/style.scss +++ b/projects/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/ai-assistant-plugin-sidebar/style.scss @@ -1,7 +1,9 @@ .jetpack-ai-logo-generator-control__header, .jetpack-ai-feedback__header, .jetpack-ai-featured-image-control__header, -.jetpack-ai-title-optimization__header { +.jetpack-ai-title-optimization__header, +.jetpack-ai-upgrade-control__header, +.jetpack-ai-usage-control__header { margin-bottom: 2em; } @@ -12,3 +14,12 @@ margin-bottom: 8px; } } + +.jetpack-ai__feedback-button { + .icon { + width: 20px; + height: 20px; + color: var( --studio-gray-20 ); + margin-left: 4px; + } +} From 3158e24e889a90862839c7858174a66ddeaa4dd2 Mon Sep 17 00:00:00 2001 From: Douglas Date: Wed, 24 Jul 2024 20:22:13 -0300 Subject: [PATCH 2/2] changelog --- .../jetpack/changelog/update-jetpack-ai-sidebar-feedback | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 projects/plugins/jetpack/changelog/update-jetpack-ai-sidebar-feedback diff --git a/projects/plugins/jetpack/changelog/update-jetpack-ai-sidebar-feedback b/projects/plugins/jetpack/changelog/update-jetpack-ai-sidebar-feedback new file mode 100644 index 0000000000000..e4effa33ca4d5 --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-jetpack-ai-sidebar-feedback @@ -0,0 +1,4 @@ +Significance: patch +Type: enhancement + +AI Assistant: Add feedback link to the sidebar