From c80ce4d587b0875487f5e524842525ba78269772 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Tue, 25 Jun 2024 15:22:56 +1000 Subject: [PATCH] Bring back range control when experiment is disabled --- packages/block-editor/src/layouts/grid.js | 48 +++++++++++++++-------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/packages/block-editor/src/layouts/grid.js b/packages/block-editor/src/layouts/grid.js index 6815b822691854..6a42d6898697f4 100644 --- a/packages/block-editor/src/layouts/grid.js +++ b/packages/block-editor/src/layouts/grid.js @@ -275,23 +275,39 @@ function GridLayoutColumnsAndRowsControl( { label={ __( 'Columns' ) } /> - { allowSizingOnChildren && - window.__experimentalEnableGridInteractivity && ( - - { - onChange( { - ...layout, - rowCount: value, - } ); - } } - value={ rowCount } - min={ 1 } - label={ __( 'Rows' ) } - /> - + + + { window.__experimentalEnableGridInteractivity && + allowSizingOnChildren ? ( + { + onChange( { + ...layout, + rowCount: value, + } ); + } } + value={ rowCount } + min={ 1 } + label={ __( 'Rows' ) } + /> + ) : ( + + onChange( { + ...layout, + columnCount: value, + } ) + } + min={ 1 } + max={ 16 } + withInputField={ false } + label={ __( 'Columns' ) } + hideLabelFromVision + /> ) } +