From d0270d6bcd23f430f33ba41b815c255ee320b04e Mon Sep 17 00:00:00 2001 From: jasmussen Date: Thu, 5 Sep 2024 09:59:31 +0200 Subject: [PATCH 1/5] Update: Rephrase "Force page reload" and move to Advanced --- .../inspector-controls/enhanced-pagination-control.js | 4 ++-- .../src/query/edit/inspector-controls/index.js | 10 ++-------- packages/block-library/src/query/edit/query-content.js | 7 +++++++ 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js b/packages/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js index e1001cda4dab3..00b41d258b064 100644 --- a/packages/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js +++ b/packages/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js @@ -25,7 +25,7 @@ export default function EnhancedPaginationControl( { ); } else if ( enhancedPagination ) { help = __( - "Browsing between pages won't require a full page reload, unless non-compatible blocks are detected." + 'Reload the full page—instead of just the posts list—when visitors navigate between pages.' ); } else if ( hasUnsupportedBlocks ) { help = __( @@ -37,7 +37,7 @@ export default function EnhancedPaginationControl( { <> ) } - ) } { ! inherit && showDisplayPanel && ( diff --git a/packages/block-library/src/query/edit/query-content.js b/packages/block-library/src/query/edit/query-content.js index 949ffc653420f..4624b3b96049e 100644 --- a/packages/block-library/src/query/edit/query-content.js +++ b/packages/block-library/src/query/edit/query-content.js @@ -18,6 +18,7 @@ import { store as coreStore } from '@wordpress/core-data'; /** * Internal dependencies */ +import EnhancedPaginationControl from './inspector-controls/enhanced-pagination-control'; import QueryToolbar from './query-toolbar'; import QueryInspectorControls from './inspector-controls'; import EnhancedPaginationModal from './enhanced-pagination-modal'; @@ -36,6 +37,7 @@ export default function QueryContent( { queryId, query, displayLayout, + enhancedPagination, tagName: TagName = 'div', query: { inherit } = {}, } = attributes; @@ -161,6 +163,11 @@ export default function QueryContent( { } help={ htmlElementMessages[ TagName ] } /> + From 660cd82ec920cf4efa56cd7f35c00a8c965a0954 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Thu, 5 Sep 2024 12:48:11 +0200 Subject: [PATCH 2/5] Linting. --- .../block-library/src/query/edit/inspector-controls/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/block-library/src/query/edit/inspector-controls/index.js b/packages/block-library/src/query/edit/inspector-controls/index.js index dc25806320b52..010e57b2da4fc 100644 --- a/packages/block-library/src/query/edit/inspector-controls/index.js +++ b/packages/block-library/src/query/edit/inspector-controls/index.js @@ -42,8 +42,7 @@ import { useToolsPanelDropdownMenuProps } from '../../../utils/hooks'; const { BlockInfo } = unlock( blockEditorPrivateApis ); export default function QueryInspectorControls( props ) { - const { attributes, setQuery, setDisplayLayout } = - props; + const { attributes, setQuery, setDisplayLayout } = props; const { query, displayLayout } = attributes; const { order, From d0e453ccd294d32b1df667683d550bdc482351de Mon Sep 17 00:00:00 2001 From: jasmussen Date: Thu, 5 Sep 2024 16:38:08 +0200 Subject: [PATCH 3/5] Update help text. --- .../block-library/src/query/edit/enhanced-pagination-modal.js | 4 ++-- .../edit/inspector-controls/enhanced-pagination-control.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/query/edit/enhanced-pagination-modal.js b/packages/block-library/src/query/edit/enhanced-pagination-modal.js index f33c45646e536..38167f7259380 100644 --- a/packages/block-library/src/query/edit/enhanced-pagination-modal.js +++ b/packages/block-library/src/query/edit/enhanced-pagination-modal.js @@ -42,7 +42,7 @@ export default function EnhancedPaginationModal( { }; let notice = __( - 'If you still want to prevent full page reloads, remove that block, then disable "Force page reload" again in the Query Block settings.' + 'If you still want to prevent full page reloads, remove that block, then disable "Reload full page" again in the Query Block settings.' ); if ( hasBlocksFromPlugins ) { notice = @@ -63,7 +63,7 @@ export default function EnhancedPaginationModal( { return ( isOpen && ( Date: Fri, 6 Sep 2024 08:39:56 +0200 Subject: [PATCH 4/5] Update packages/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Greg Ziółkowski --- .../edit/inspector-controls/enhanced-pagination-control.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js b/packages/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js index fac20a4994cc2..0586149077b34 100644 --- a/packages/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js +++ b/packages/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js @@ -29,7 +29,7 @@ export default function EnhancedPaginationControl( { ); } else if ( hasUnsupportedBlocks ) { help = __( - "Reload full page can't be disabled because there are non-compatible blocks inside the Query block." + "Enhancement disabled because there are non-compatible blocks inside the Query block." ); } From ba35aa50efbe605030cc93e4c21776856e5cbb08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Zi=C3=B3=C5=82kowski?= Date: Fri, 6 Sep 2024 09:22:31 +0200 Subject: [PATCH 5/5] Update packages/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js --- .../edit/inspector-controls/enhanced-pagination-control.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js b/packages/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js index 0586149077b34..9d47d67e61d78 100644 --- a/packages/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js +++ b/packages/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js @@ -29,7 +29,7 @@ export default function EnhancedPaginationControl( { ); } else if ( hasUnsupportedBlocks ) { help = __( - "Enhancement disabled because there are non-compatible blocks inside the Query block." + 'Enhancement disabled because there are non-compatible blocks inside the Query block.' ); }