Skip to content

Commit

Permalink
Query block: Move "Enhance pagination" toggle under Settings (#54198)
Browse files Browse the repository at this point in the history
* Move enhanced pagination under settings

* Update Enhanced pagination help message
  • Loading branch information
DAreRodz authored Sep 6, 2023
1 parent ccd4320 commit 97ccdb6
Showing 1 changed file with 23 additions and 30 deletions.
53 changes: 23 additions & 30 deletions packages/block-library/src/query/edit/inspector-controls/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,29 @@ export default function QueryInspectorControls( props ) {
}
/>
) }
<ToggleControl
label={ __( 'Enhanced pagination' ) }
help={ __(
'Browsing between pages won’t require a full page reload.'
) }
checked={ !! enhancedPagination }
onChange={ ( value ) =>
setAttributes( {
enhancedPagination: !! value,
} )
}
/>
{ enhancedPagination && (
<div>
<Notice
spokenMessage={ null }
status="warning"
isDismissible={ false }
>
{ enhancedPaginationNotice }
</Notice>
</div>
) }
</PanelBody>
</InspectorControls>
) }
Expand Down Expand Up @@ -293,36 +316,6 @@ export default function QueryInspectorControls( props ) {
</ToolsPanel>
</InspectorControls>
) }
<InspectorControls>
<PanelBody
title={ __( 'User Experience' ) }
initialOpen={ false }
>
<ToggleControl
label={ __( 'Enhanced pagination' ) }
help={ __(
"Don't refresh the page when paginating to another page."
) }
checked={ !! enhancedPagination }
onChange={ ( value ) =>
setAttributes( {
enhancedPagination: !! value,
} )
}
/>
{ enhancedPagination && (
<div>
<Notice
spokenMessage={ null }
status="warning"
isDismissible={ false }
>
{ enhancedPaginationNotice }
</Notice>
</div>
) }
</PanelBody>
</InspectorControls>
</>
);
}

1 comment on commit 97ccdb6

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 97ccdb6.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6094437002
📝 Reported issues:

Please sign in to comment.