Skip to content

Commit

Permalink
Update: Rephrase "Force page reload" and move to Advanced
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen committed Sep 5, 2024
1 parent 13af7fd commit eb52dd5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = __(
Expand All @@ -37,7 +37,7 @@ export default function EnhancedPaginationControl( {
<>
<ToggleControl
__nextHasNoMarginBottom
label={ __( 'Force page reload' ) }
label={ __( 'Reload full page' ) }
help={ help }
checked={
! enhancedPagination && ! fullPageClientSideNavigation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import AuthorControl from './author-control';
import ParentControl from './parent-control';
import { TaxonomyControls } from './taxonomy-controls';
import StickyControl from './sticky-control';
import EnhancedPaginationControl from './enhanced-pagination-control';
import CreateNewPostLink from './create-new-post-link';
import PerPageControl from './per-page-control';
import OffsetControl from './offset-controls';
Expand All @@ -43,9 +42,9 @@ import { useToolsPanelDropdownMenuProps } from '../../../utils/hooks';
const { BlockInfo } = unlock( blockEditorPrivateApis );

export default function QueryInspectorControls( props ) {
const { attributes, setQuery, setDisplayLayout, setAttributes, clientId } =
const { attributes, setQuery, setDisplayLayout } =
props;
const { query, displayLayout, enhancedPagination } = attributes;
const { query, displayLayout } = attributes;
const {
order,
orderBy,
Expand Down Expand Up @@ -262,11 +261,6 @@ export default function QueryInspectorControls( props ) {
}
/>
) }
<EnhancedPaginationControl
enhancedPagination={ enhancedPagination }
setAttributes={ setAttributes }
clientId={ clientId }
/>
</PanelBody>
) }
{ ! inherit && showDisplayPanel && (
Expand Down
7 changes: 7 additions & 0 deletions packages/block-library/src/query/edit/query-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -36,6 +37,7 @@ export default function QueryContent( {
queryId,
query,
displayLayout,
enhancedPagination,
tagName: TagName = 'div',
query: { inherit } = {},
} = attributes;
Expand Down Expand Up @@ -161,6 +163,11 @@ export default function QueryContent( {
}
help={ htmlElementMessages[ TagName ] }
/>
<EnhancedPaginationControl
enhancedPagination={ enhancedPagination }
setAttributes={ setAttributes }
clientId={ clientId }
/>
</InspectorControls>
<TagName { ...innerBlocksProps } />
</>
Expand Down

0 comments on commit eb52dd5

Please sign in to comment.