Skip to content

Commit

Permalink
Use BlockPopoverCover with inline prop
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Aug 8, 2024
1 parent ebcd385 commit 9e3b9ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 93 deletions.
90 changes: 0 additions & 90 deletions packages/block-editor/src/components/grid/grid-underlay.js

This file was deleted.

7 changes: 4 additions & 3 deletions packages/block-editor/src/components/grid/grid-visualizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { __experimentalUseDropZone as useDropZone } from '@wordpress/compose';
/**
* Internal dependencies
*/
import GridUnderlay from './grid-underlay';
import { useBlockElement } from '../block-list/use-block-props/use-block-refs';
import BlockPopoverCover from '../block-popover/cover';
import { range, GridRect, getGridInfo } from './utils';
import { store as blockEditorStore } from '../../store';
import { useGetNumberOfBlocksBeforeCell } from './use-get-number-of-blocks-before-cell';
Expand Down Expand Up @@ -84,7 +84,8 @@ const GridVisualizerGrid = forwardRef(
}, [] );

return (
<GridUnderlay
<BlockPopoverCover
inline
className={ clsx( 'block-editor-grid-visualizer', {
'is-dropping-allowed': isDroppingAllowed,
} ) }
Expand All @@ -109,7 +110,7 @@ const GridVisualizerGrid = forwardRef(
) )
) }
</div>
</GridUnderlay>
</BlockPopoverCover>
);
}
);
Expand Down
1 change: 1 addition & 0 deletions packages/block-editor/src/components/grid/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export function getGridInfo( gridElement ) {
gridTemplateRows,
gap: getComputedCSS( gridElement, 'gap' ),
display: 'grid',
padding: getComputedCSS( gridElement, 'padding' ),
},
};
}

0 comments on commit 9e3b9ae

Please sign in to comment.