From c72b0b6f799b06083851a1e7ab179e7bc46f9b19 Mon Sep 17 00:00:00 2001 From: Rostislav Wolny Date: Fri, 22 Nov 2024 10:56:46 +0100 Subject: [PATCH] Get rid of useFlashEditableBlocks It is a private API which is not critical for our application. It shortly highlights blocks that are editable after a click in the parent. As it is not critical and is private, it is a risk, and we should rather not use it. [MAILPOET-6319] --- .../components/block-editor/visual-editor/visual-editor.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/js/email-editor/src/components/block-editor/visual-editor/visual-editor.tsx b/packages/js/email-editor/src/components/block-editor/visual-editor/visual-editor.tsx index 29e56b3948..41bb227966 100644 --- a/packages/js/email-editor/src/components/block-editor/visual-editor/visual-editor.tsx +++ b/packages/js/email-editor/src/components/block-editor/visual-editor/visual-editor.tsx @@ -30,7 +30,7 @@ export const TEMPLATE_PART_POST_TYPE = 'wp_template_part'; export const PATTERN_POST_TYPE = 'wp_block'; export const NAVIGATION_POST_TYPE = 'wp_navigation'; -const { ExperimentalBlockCanvas: BlockCanvas, useFlashEditableBlocks } = unlock( +const { ExperimentalBlockCanvas: BlockCanvas } = unlock( blockEditorPrivateApis ); @@ -129,9 +129,6 @@ export function VisualEditor( { localRef, contentRef, renderingMode === 'post-only' ? typewriterRef : null, - useFlashEditableBlocks( { - isEnabled: renderingMode === 'template-locked', - } ), useSelectNearestEditableBlock( { isEnabled: renderingMode === 'template-locked', } ),