Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert: Make sticky block action on template part block #49219

Merged
merged 1 commit into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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