Skip to content

Commit b3f387f

Browse files
priethorockham
authored andcommitted
Revert "Post editor: Require confirmation before removing Footnotes (#52277)" (#52486)
This reverts commit e6426ea.
1 parent f940212 commit b3f387f

File tree

3 files changed

+1
-20
lines changed
  • packages
    • block-editor/src/components/block-removal-warning-modal
    • edit-post/src/components/layout
    • edit-site/src/components/editor

3 files changed

+1
-20
lines changed

packages/block-editor/src/components/block-removal-warning-modal/index.js

-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ export function BlockRemovalWarningModal( { rules } ) {
5050
<Modal
5151
title={ __( 'Are you sure?' ) }
5252
onRequestClose={ clearBlockRemovalPrompt }
53-
style={ {
54-
maxWidth: '40rem',
55-
} }
5653
>
5754
{ blockNamesForPrompt.length === 1 ? (
5855
<p>{ rules[ blockNamesForPrompt[ 0 ] ] }</p>

packages/edit-post/src/components/layout/index.js

+1-14
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ import {
1616
store as editorStore,
1717
} from '@wordpress/editor';
1818
import { useSelect, useDispatch } from '@wordpress/data';
19-
import {
20-
BlockBreadcrumb,
21-
privateApis as blockEditorPrivateApis,
22-
} from '@wordpress/block-editor';
19+
import { BlockBreadcrumb } from '@wordpress/block-editor';
2320
import { Button, ScrollLock, Popover } from '@wordpress/components';
2421
import { useViewportMatch } from '@wordpress/compose';
2522
import { PluginArea } from '@wordpress/plugins';
@@ -52,9 +49,6 @@ import WelcomeGuide from '../welcome-guide';
5249
import ActionsPanel from './actions-panel';
5350
import StartPageOptions from '../start-page-options';
5451
import { store as editPostStore } from '../../store';
55-
import { unlock } from '../../lock-unlock';
56-
57-
const { BlockRemovalWarningModal } = unlock( blockEditorPrivateApis );
5852

5953
const interfaceLabels = {
6054
/* translators: accessibility text for the editor top bar landmark region. */
@@ -69,12 +63,6 @@ const interfaceLabels = {
6963
footer: __( 'Editor footer' ),
7064
};
7165

72-
const blockRemovalRules = {
73-
'core/footnotes': __(
74-
'The Footnotes block displays all footnotes found in the content. Note that any footnotes in the content will persist after removing this block.'
75-
),
76-
};
77-
7866
function Layout( { styles } ) {
7967
const isMobileViewport = useViewportMatch( 'medium', '<' );
8068
const isHugeViewport = useViewportMatch( 'huge', '>=' );
@@ -214,7 +202,6 @@ function Layout( { styles } ) {
214202
<LocalAutosaveMonitor />
215203
<EditPostKeyboardShortcuts />
216204
<EditorKeyboardShortcutsRegister />
217-
<BlockRemovalWarningModal rules={ blockRemovalRules } />
218205
<SettingsSidebar />
219206
<InterfaceSkeleton
220207
isDistractionFree={ isDistractionFree && isLargeViewport }

packages/edit-site/src/components/editor/index.js

-3
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ const blockRemovalRules = {
7070
'core/post-content': __(
7171
'Post Content displays the content of a post or page.'
7272
),
73-
'core/footnotes': __(
74-
'The Footnotes block displays all footnotes found in the content. Note that any footnotes in the content will persist after removing this block.'
75-
),
7673
};
7774

7875
export default function Editor( { isLoading } ) {

0 commit comments

Comments
 (0)