Skip to content

Commit

Permalink
add copy back, remove pattern related group of options
Browse files Browse the repository at this point in the history
  • Loading branch information
draganescu committed Oct 25, 2024
1 parent d321d31 commit 44fa058
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ export function BlockSettingsDropdown( {
const currentClientId = block?.clientId;
const count = clientIds.length;
const firstBlockClientId = clientIds[ 0 ];

const isZoomOut = useSelect( ( select ) => {
const { __unstableGetEditorMode } = unlock(
select( blockEditorStore )
);

return __unstableGetEditorMode() === 'zoom-out';
} );

const {
firstParentClientId,
onlyBlock,
Expand Down Expand Up @@ -235,7 +244,7 @@ export function BlockSettingsDropdown( {
clientId={ firstBlockClientId }
/>
) }
{ ! isContentOnly && (
{ ( ! isContentOnly || isZoomOut ) && (
<CopyMenuItem
clientIds={ clientIds }
onCopy={ onCopy }
Expand Down
8 changes: 5 additions & 3 deletions packages/editor/src/components/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,12 @@ export const ExperimentalEditorProvider = withRegistryProvider(
{ children }
{ ! settings.__unstableIsPreviewMode && (
<>
<PatternsMenuItems />
<TemplatePartMenuItems />
{ ! isZoomOut && (
<ContentOnlySettingsMenu />
<>
<PatternsMenuItems />
<TemplatePartMenuItems />
<ContentOnlySettingsMenu />
</>
) }
{ mode === 'template-locked' && (
<DisableNonPageContentBlocks />
Expand Down

0 comments on commit 44fa058

Please sign in to comment.