Skip to content

Commit

Permalink
doh! Add back in initial trigger of nux guides!
Browse files Browse the repository at this point in the history
  • Loading branch information
nerrad committed Jun 12, 2019
1 parent fd66ee7 commit 6c4872b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion packages/edit-post/src/components/editor-initialization/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ import {
useUpdatePostLinkListener,
} from './listener-hooks';

/**
* WordPress dependencies
*/
import { useEffect } from '@wordpress/element';
import { useDispatch } from '@wordpress/data';

/**
* Data component used for initializing the editor and re-initializes
* when postId changes or unmount.
* when postId changes or on unmount.
*
* @param {number} postId The id of the post.
* @return {null} This is a data component so does not render any ui.
Expand All @@ -18,5 +24,14 @@ export default function( { postId } ) {
useAdjustSidebarListener( postId );
useBlockSelectionListener( postId );
useUpdatePostLinkListener( postId );
const { triggerGuide } = useDispatch( 'core/nux' );
useEffect( () => {
triggerGuide( [
'core/editor.inserter',
'core/editor.settings',
'core/editor.preview',
'core/editor.publish',
] );
}, [ triggerGuide ] );
return null;
}

0 comments on commit 6c4872b

Please sign in to comment.