Skip to content

Commit

Permalink
add the roving behavior back to the block tools
Browse files Browse the repository at this point in the history
  • Loading branch information
draganescu committed Mar 16, 2023
1 parent 52296c1 commit 3421026
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions packages/edit-post/src/components/header/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { PostSavedState, PostPreviewButton } from '@wordpress/editor';
import { useSelect } from '@wordpress/data';
import { PinnedItems } from '@wordpress/interface';
Expand All @@ -10,6 +11,7 @@ import {
__unstableMotion as motion,
} from '@wordpress/components';
import {
NavigableToolbar,
store as blockEditorStore,
BlockToolbar,
} from '@wordpress/block-editor';
Expand Down Expand Up @@ -81,6 +83,8 @@ function Header( { setEntitiesSavedStatesCallback } ) {
hover: { x: 0, transition: { type: 'tween', delay: 0.2 } },
};

const blockToolbarAriaLabel = __( 'Block tools' );

return (
<div className="edit-post-header">
<MainDashboardButton.Slot>
Expand Down Expand Up @@ -111,9 +115,14 @@ function Header( { setEntitiesSavedStatesCallback } ) {
left: firstParentClientId ? '60px' : '0',
} }
>
<BlockToolbar
hideDragHandle={ hasFixedToolbar }
/>
<NavigableToolbar
className="edit-post-header-toolbar"
aria-label={ blockToolbarAriaLabel }
>
<BlockToolbar
hideDragHandle={ hasFixedToolbar }
/>
</NavigableToolbar>
</div>
</MaybeHide>
</>
Expand Down

0 comments on commit 3421026

Please sign in to comment.