From 0e671a2eca9c78dfdb45b2149ce9e3fb5bf3ae4a Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Thu, 12 Sep 2024 10:18:02 +0100 Subject: [PATCH 1/9] Show top level sections in List View in Zoom Out mode (#65202) * Show top level sections in List View * Recompute enabled clientIds when editorMode changes * Revert initial changes * Avoid special conditional for Zoom Out mode --- .../block-editor/src/components/list-view/index.js | 11 +++-------- packages/block-editor/src/store/private-selectors.js | 1 + 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/block-editor/src/components/list-view/index.js b/packages/block-editor/src/components/list-view/index.js index 1493fa655a5aac..87599ea870913b 100644 --- a/packages/block-editor/src/components/list-view/index.js +++ b/packages/block-editor/src/components/list-view/index.js @@ -119,20 +119,16 @@ function ListViewComponent( const blockIndexes = useListViewBlockIndexes( clientIdsTree ); const { getBlock } = useSelect( blockEditorStore ); - const { visibleBlockCount, shouldShowInnerBlocks } = useSelect( + const { visibleBlockCount } = useSelect( ( select ) => { - const { - getGlobalBlockCount, - getClientIdsOfDescendants, - __unstableGetEditorMode, - } = select( blockEditorStore ); + const { getGlobalBlockCount, getClientIdsOfDescendants } = + select( blockEditorStore ); const draggedBlockCount = draggedClientIds?.length > 0 ? getClientIdsOfDescendants( draggedClientIds ).length + 1 : 0; return { visibleBlockCount: getGlobalBlockCount() - draggedBlockCount, - shouldShowInnerBlocks: __unstableGetEditorMode() !== 'zoom-out', }; }, [ draggedClientIds ] @@ -397,7 +393,6 @@ function ListViewComponent( fixedListWindow={ fixedListWindow } selectedClientIds={ selectedClientIds } isExpanded={ isExpanded } - shouldShowInnerBlocks={ shouldShowInnerBlocks } showAppender={ showAppender } /> diff --git a/packages/block-editor/src/store/private-selectors.js b/packages/block-editor/src/store/private-selectors.js index b72ebd18183377..d76f90bc94ffe1 100644 --- a/packages/block-editor/src/store/private-selectors.js +++ b/packages/block-editor/src/store/private-selectors.js @@ -114,6 +114,7 @@ export const getEnabledClientIdsTree = createSelector( state.blockEditingModes, state.settings.templateLock, state.blockListSettings, + state.editorMode, ] ); From 394288f5343b92738ab086b97f62e15262845a35 Mon Sep 17 00:00:00 2001 From: Akshat Kakkad <87222220+AKSHAT2802@users.noreply.github.com> Date: Thu, 12 Sep 2024 15:23:49 +0530 Subject: [PATCH 2/9] Add __next40pxDefaultSize for files in editor 4 (#65140) * Add __next40pxDefaultSize in button for editor 3 files * address feedback Co-authored-by: AKSHAT2802 Co-authored-by: tyxla Co-authored-by: mirka <0mirka00@git.wordpress.org> --- .../editor/src/components/start-template-options/index.js | 3 +-- packages/editor/src/components/table-of-contents/index.js | 3 +-- packages/editor/src/components/text-editor/index.js | 3 +-- packages/editor/src/components/text-editor/style.scss | 2 +- packages/editor/src/dataviews/actions/reset-post.tsx | 6 ++---- packages/editor/src/dataviews/actions/trash-post.tsx | 6 ++---- 6 files changed, 8 insertions(+), 15 deletions(-) diff --git a/packages/editor/src/components/start-template-options/index.js b/packages/editor/src/components/start-template-options/index.js index e86531272b54fd..3651c5c029a2c7 100644 --- a/packages/editor/src/components/start-template-options/index.js +++ b/packages/editor/src/components/start-template-options/index.js @@ -156,8 +156,7 @@ function StartModal( { slug, isCustom, onClose, postType } ) { >