Skip to content

Commit

Permalink
Zoom Out: Remove double click to exit hook from the block-editor pack…
Browse files Browse the repository at this point in the history
…age (WordPress#66335)

Co-authored-by: youknowriad <[email protected]>
Co-authored-by: ellatrix <[email protected]>
  • Loading branch information
3 people authored Oct 23, 2024
1 parent 4440247 commit abe3767
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
} from '../../block-edit/context';
import { useFocusHandler } from './use-focus-handler';
import { useEventHandlers } from './use-selected-block-event-handlers';
import { useZoomOutModeExit } from './use-zoom-out-mode-exit';
import { useBlockRefProvider } from './use-block-refs';
import { useIntersectionObserver } from './use-intersection-observer';
import { useScrollIntoView } from './use-scroll-into-view';
Expand Down Expand Up @@ -112,7 +111,6 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {
useBlockRefProvider( clientId ),
useFocusHandler( clientId ),
useEventHandlers( { clientId, isSelected } ),
useZoomOutModeExit(),
useIsHovered( { clientId } ),
useIntersectionObserver(),
useMovingAnimation( { triggerAnimationOnChange: index, clientId } ),
Expand Down
2 changes: 0 additions & 2 deletions packages/block-editor/src/private-apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { usesContextKey } from './components/rich-text/format-edit';
import { ExperimentalBlockCanvas } from './components/block-canvas';
import { getDuotoneFilter } from './components/duotone/utils';
import { useFlashEditableBlocks } from './components/use-flash-editable-blocks';
import { useZoomOutModeExit } from './components/block-list/use-block-props/use-zoom-out-mode-exit';
import {
selectBlockPatternsKey,
reusableBlocksSelectKey,
Expand Down Expand Up @@ -79,7 +78,6 @@ lock( privateApis, {
TextAlignmentControl,
usesContextKey,
useFlashEditableBlocks,
useZoomOutModeExit,
globalStylesDataKey,
globalStylesLinksDataKey,
selectBlockPatternsKey,
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/visual-editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ import {
TEMPLATE_PART_POST_TYPE,
TEMPLATE_POST_TYPE,
} from '../../store/constants';
import { useZoomOutModeExit } from './use-zoom-out-mode-exit';

const {
LayoutStyle,
useLayoutClasses,
useLayoutStyles,
ExperimentalBlockCanvas: BlockCanvas,
useFlashEditableBlocks,
useZoomOutModeExit,
} = unlock( blockEditorPrivateApis );

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
*/
import { useSelect, useDispatch } from '@wordpress/data';
import { useRefEffect } from '@wordpress/compose';
import { store as blockEditorStore } from '@wordpress/block-editor';

/**
* Internal dependencies
*/
import { store as blockEditorStore } from '../../../store';
import { unlock } from '../../../lock-unlock';
import { unlock } from '../../lock-unlock';

/**
* Allows Zoom Out mode to be exited by double clicking in the selected block.
Expand Down

0 comments on commit abe3767

Please sign in to comment.