Show feedback bar after product editor tour/guide (#38669)

This commit is contained in:
Matt Sherman 2023-06-12 12:43:19 -04:00 committed by GitHub
parent 18f2de2bc4
commit 2039d8915e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import { Pill, TourKit } from '@woocommerce/components';
import { __ } from '@wordpress/i18n';
import { recordEvent } from '@woocommerce/tracks';
import { useEffect, useState } from '@wordpress/element';
import { __experimentalUseFeedbackBar as useFeedbackBar } from '@woocommerce/product-editor';
/**
* Internal dependencies
@ -27,6 +28,8 @@ const BlockEditorTour = ( { shouldTourBeShown, dismissModal }: Props ) => {
const [ isGuideOpen, setIsGuideOpen ] = useState( false );
const { maybeShowFeedbackBar } = useFeedbackBar();
const openGuide = () => {
setIsGuideOpen( true );
};
@ -34,6 +37,7 @@ const BlockEditorTour = ( { shouldTourBeShown, dismissModal }: Props ) => {
const closeGuide = () => {
recordEvent( 'block_product_editor_spotlight_completed' );
setIsGuideOpen( false );
maybeShowFeedbackBar();
};
if ( isGuideOpen ) {
@ -88,6 +92,7 @@ const BlockEditorTour = ( { shouldTourBeShown, dismissModal }: Props ) => {
recordEvent(
'block_product_editor_spotlight_dismissed'
);
maybeShowFeedbackBar();
}
},
options: {

View File

@ -0,0 +1,4 @@
Significance: minor
Type: add
Show feedback bar after product block editor tour/guide