From bd54d6c4c6070f1d32e6184fca46f723cbd74702 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Tue, 25 Jun 2024 17:43:35 +1000 Subject: [PATCH] Change `grid-visualizer` folder name to `grid`. (#62810) Co-authored-by: tellthemachines Co-authored-by: aaronrobertshaw --- .../src/components/child-layout-control/index.js | 2 +- .../components/{grid-visualizer => grid}/grid-item-movers.js | 0 .../{grid-visualizer => grid}/grid-item-resizer.js | 0 .../components/{grid-visualizer => grid}/grid-visualizer.js | 0 .../src/components/{grid-visualizer => grid}/index.js | 0 .../src/components/{grid-visualizer => grid}/style.scss | 0 .../use-get-number-of-blocks-before-cell.js | 0 .../{grid-visualizer => grid}/use-grid-layout-sync.js | 0 .../src/components/{grid-visualizer => grid}/utils.js | 0 packages/block-editor/src/hooks/layout-child.js | 2 +- packages/block-editor/src/layouts/grid.js | 5 +---- packages/block-editor/src/style.scss | 2 +- 12 files changed, 4 insertions(+), 7 deletions(-) rename packages/block-editor/src/components/{grid-visualizer => grid}/grid-item-movers.js (100%) rename packages/block-editor/src/components/{grid-visualizer => grid}/grid-item-resizer.js (100%) rename packages/block-editor/src/components/{grid-visualizer => grid}/grid-visualizer.js (100%) rename packages/block-editor/src/components/{grid-visualizer => grid}/index.js (100%) rename packages/block-editor/src/components/{grid-visualizer => grid}/style.scss (100%) rename packages/block-editor/src/components/{grid-visualizer => grid}/use-get-number-of-blocks-before-cell.js (100%) rename packages/block-editor/src/components/{grid-visualizer => grid}/use-grid-layout-sync.js (100%) rename packages/block-editor/src/components/{grid-visualizer => grid}/utils.js (100%) diff --git a/packages/block-editor/src/components/child-layout-control/index.js b/packages/block-editor/src/components/child-layout-control/index.js index b27d6cacd0697..c0d90b24b2931 100644 --- a/packages/block-editor/src/components/child-layout-control/index.js +++ b/packages/block-editor/src/components/child-layout-control/index.js @@ -19,7 +19,7 @@ import { useSelect, useDispatch } from '@wordpress/data'; /** * Internal dependencies */ -import { useGetNumberOfBlocksBeforeCell } from '../grid-visualizer/use-get-number-of-blocks-before-cell'; +import { useGetNumberOfBlocksBeforeCell } from '../grid/use-get-number-of-blocks-before-cell'; import { store as blockEditorStore } from '../../store'; function helpText( selfStretch, parentLayout ) { diff --git a/packages/block-editor/src/components/grid-visualizer/grid-item-movers.js b/packages/block-editor/src/components/grid/grid-item-movers.js similarity index 100% rename from packages/block-editor/src/components/grid-visualizer/grid-item-movers.js rename to packages/block-editor/src/components/grid/grid-item-movers.js diff --git a/packages/block-editor/src/components/grid-visualizer/grid-item-resizer.js b/packages/block-editor/src/components/grid/grid-item-resizer.js similarity index 100% rename from packages/block-editor/src/components/grid-visualizer/grid-item-resizer.js rename to packages/block-editor/src/components/grid/grid-item-resizer.js diff --git a/packages/block-editor/src/components/grid-visualizer/grid-visualizer.js b/packages/block-editor/src/components/grid/grid-visualizer.js similarity index 100% rename from packages/block-editor/src/components/grid-visualizer/grid-visualizer.js rename to packages/block-editor/src/components/grid/grid-visualizer.js diff --git a/packages/block-editor/src/components/grid-visualizer/index.js b/packages/block-editor/src/components/grid/index.js similarity index 100% rename from packages/block-editor/src/components/grid-visualizer/index.js rename to packages/block-editor/src/components/grid/index.js diff --git a/packages/block-editor/src/components/grid-visualizer/style.scss b/packages/block-editor/src/components/grid/style.scss similarity index 100% rename from packages/block-editor/src/components/grid-visualizer/style.scss rename to packages/block-editor/src/components/grid/style.scss diff --git a/packages/block-editor/src/components/grid-visualizer/use-get-number-of-blocks-before-cell.js b/packages/block-editor/src/components/grid/use-get-number-of-blocks-before-cell.js similarity index 100% rename from packages/block-editor/src/components/grid-visualizer/use-get-number-of-blocks-before-cell.js rename to packages/block-editor/src/components/grid/use-get-number-of-blocks-before-cell.js diff --git a/packages/block-editor/src/components/grid-visualizer/use-grid-layout-sync.js b/packages/block-editor/src/components/grid/use-grid-layout-sync.js similarity index 100% rename from packages/block-editor/src/components/grid-visualizer/use-grid-layout-sync.js rename to packages/block-editor/src/components/grid/use-grid-layout-sync.js diff --git a/packages/block-editor/src/components/grid-visualizer/utils.js b/packages/block-editor/src/components/grid/utils.js similarity index 100% rename from packages/block-editor/src/components/grid-visualizer/utils.js rename to packages/block-editor/src/components/grid/utils.js diff --git a/packages/block-editor/src/hooks/layout-child.js b/packages/block-editor/src/hooks/layout-child.js index d92d1069c2e33..f510421372936 100644 --- a/packages/block-editor/src/hooks/layout-child.js +++ b/packages/block-editor/src/hooks/layout-child.js @@ -15,7 +15,7 @@ import { GridVisualizer, GridItemResizer, GridItemMovers, -} from '../components/grid-visualizer'; +} from '../components/grid'; function useBlockPropsChildLayoutStyles( { style } ) { const shouldRenderChildLayoutStyles = useSelect( ( select ) => { diff --git a/packages/block-editor/src/layouts/grid.js b/packages/block-editor/src/layouts/grid.js index 6a42d6898697f..744441b22608b 100644 --- a/packages/block-editor/src/layouts/grid.js +++ b/packages/block-editor/src/layouts/grid.js @@ -23,10 +23,7 @@ import { appendSelectors, getBlockGapCSS } from './utils'; import { getGapCSSValue } from '../hooks/gap'; import { shouldSkipSerialization } from '../hooks/utils'; import { LAYOUT_DEFINITIONS } from './definitions'; -import { - GridVisualizer, - useGridLayoutSync, -} from '../components/grid-visualizer'; +import { GridVisualizer, useGridLayoutSync } from '../components/grid'; const RANGE_CONTROL_MAX_VALUES = { px: 600, diff --git a/packages/block-editor/src/style.scss b/packages/block-editor/src/style.scss index cf4683b02c707..0772ddf0d31e5 100644 --- a/packages/block-editor/src/style.scss +++ b/packages/block-editor/src/style.scss @@ -27,7 +27,7 @@ @import "./components/duotone-control/style.scss"; @import "./components/font-appearance-control/style.scss"; @import "./components/global-styles/style.scss"; -@import "./components/grid-visualizer/style.scss"; +@import "./components/grid/style.scss"; @import "./components/height-control/style.scss"; @import "./components/image-size-control/style.scss"; @import "./components/inserter-list-item/style.scss";