Skip to content

Commit

Permalink
Revert: Make sticky block action on template part block (#49219)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed Mar 21, 2023
1 parent 22ca90c commit 7f1810d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 116 deletions.
8 changes: 0 additions & 8 deletions packages/block-editor/src/private-apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ import { lock } from './lock-unlock';
import OffCanvasEditor from './components/off-canvas-editor';
import LeafMoreMenu from './components/off-canvas-editor/leaf-more-menu';
import { ComposedPrivateInserter as PrivateInserter } from './components/inserter';
import { default as useConvertToGroupButtonProps } from './components/convert-to-group-buttons/use-convert-to-group-button-props';
import {
hasStickyPositionSupport,
useIsPositionDisabled,
} from './hooks/position';

/**
* Private @wordpress/block-editor APIs.
Expand All @@ -23,7 +18,4 @@ lock( privateApis, {
LeafMoreMenu,
OffCanvasEditor,
PrivateInserter,
useConvertToGroupButtonProps,
hasStickyPositionSupport,
useIsPositionDisabled,
} );

This file was deleted.

15 changes: 4 additions & 11 deletions packages/edit-site/src/components/template-part-converter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
*/
import ConvertToRegularBlocks from './convert-to-regular';
import ConvertToTemplatePart from './convert-to-template-part';
import { default as ConvertToStickyGroup } from './convert-to-sticky-group';

export default function TemplatePartConverter() {
return (
Expand All @@ -37,16 +36,10 @@ function TemplatePartConverterMenuItem( { clientIds, onClose } ) {
// Allow converting a single template part to standard blocks.
if ( blocks.length === 1 && blocks[ 0 ]?.name === 'core/template-part' ) {
return (
<>
<ConvertToRegularBlocks
clientId={ clientIds[ 0 ] }
onClose={ onClose }
/>
<ConvertToStickyGroup
selectedClientIds={ clientIds }
onClose={ onClose }
/>
</>
<ConvertToRegularBlocks
clientId={ clientIds[ 0 ] }
onClose={ onClose }
/>
);
}
return <ConvertToTemplatePart clientIds={ clientIds } blocks={ blocks } />;
Expand Down

1 comment on commit 7f1810d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 7f1810d.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4483753506
📝 Reported issues:

Please sign in to comment.