-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query Pagination Previous: Add support for maximum page limit #67772
Query Pagination Previous: Add support for maximum page limit #67772
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @gutenbergplugin. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Besides my small comment this looks good. Also, can you rebase the PR please?
$page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ]; | ||
|
||
$total_pages = $max_page; | ||
if ( ! isset( $block->context['query']['inherit'] ) || ! $block->context['query']['inherit'] ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this whole block below here:https://github.com/WordPress/gutenberg/pull/67772/files#diff-f39b437ed48cda203e2489cc1acb59ed960f12669515152c85d2f6b630c81fdaR58?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ntsekouras, Thanks for the review. I rebased the PR, and all the succeeding commits were pushed to it. That resulted in requesting reviews from many people. I don't think if that was expected out from this comment, so I've created a new PR here: #68070
I'll be proceeding to close this PR in contrast to the newly created PR.
… clarity and efficiency
Co-authored-by: dknauss <[email protected]> Co-authored-by: oandregal <[email protected]>
In this view, ensure that the content is horizontally scrollable and the width takes up the screen.Co-authored-by: ramonjd <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: megane9988 <[email protected]>
…WordPress#67713) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: jsnajdr <[email protected]> Co-authored-by: tyxla <[email protected]>
…efault via defaultControls config (WordPress#45994) Co-authored-by: fabiankaegy <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: aaronrobertshaw <[email protected]> Co-authored-by: jasmussen <[email protected]> Co-authored-by: carolinan <[email protected]> Co-authored-by: jeffpaul <[email protected]> Co-authored-by: jordesign <[email protected]>
…Block (WordPress#67657) Co-authored-by: fabiankaegy <[email protected]> Co-authored-by: carolinan <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: ntsekouras <[email protected]>
…Press#67664) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: oandregal <[email protected]> Co-authored-by: ciampo <[email protected]> Co-authored-by: doekenorg <[email protected]>
…cestor` (WordPress#48348) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: gziolo <[email protected]> Co-authored-by: webmandesign <[email protected]>
* render overview colors in 4 columns * use templateColums instead of colums to enable responsive columns * use templateColumns instead of columns * tweak CSS Co-authored-by: matiasbenedetto <[email protected]> Co-authored-by: tellthemachines <[email protected]> Co-authored-by: jasmussen <[email protected]>
* Navigation: Fix active item hover color * Add CHANGELOG entry * Fix duplicate Enhancements sections Co-authored-by: tyxla <[email protected]> Co-authored-by: mirka <[email protected]>
* Components: Deprecate `COLORS.white` * Add changelogs * Update snapshot Co-authored-by: mirka <[email protected]> Co-authored-by: tyxla <[email protected]>
…67735) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: gziolo <[email protected]> Co-authored-by: tyxla <[email protected]>
Co-authored-by: youknowriad <[email protected]> Co-authored-by: ntsekouras <[email protected]>
* wp-env: Add phpMyAdmin support Defines two new docker-compose services: `phpmyadmin` and `tests-phpmyadmin`. These are off by default. They can be individually turned on by: - Specifying a port in any enviroment's config via key `phpmyadminPort` (see bottom of commit message for example). - By setting environment variable `WP_ENV_PHPMYADMIN_PORT` and/or `WP_ENV_TESTS_PHPMYADMIN_PORT`. * Opt into the phpMyAdmin service in the Gutenberg environment * wp-env: start: refactor computation of command output - Refactor repeating logic into getPublicDockerPort - Remove trailing newlines from dockerCompose output - Refactor evaluation of spinner.prefixText so as to clearly reveal newlines. { env: { development: { ... phpmyadminPort: 9000 }, tests: { ... } } } --------- Co-authored-by: Riad Benguella <[email protected]>
…ss#67707) * Replace remaining custom deep cloning with 'structuredClone' * Polyfill structuredClone for jsdom Co-authored-by: Mamaduka <[email protected]> Co-authored-by: tyxla <[email protected]> Co-authored-by: jsnajdr <[email protected]>
* Set default tab to 'blocks' if none passed * Add tests for focusing blocks tab and closing inserter on keypresses
…ress#67689) Co-authored-by: jorgefilipecosta <[email protected]> Co-authored-by: youknowriad <[email protected]>
* Add command to navigate to site editor * No icon, improved label * Modified code to display command other than Site editor * Feedback and suggestion updates --------- Co-authored-by: benazeer-ben <[email protected]> Co-authored-by: richtabor <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: annezazu <[email protected]> Co-authored-by: jameskoster <[email protected]> Co-authored-by: jasmussen <[email protected]> Co-authored-by: ramonjd <[email protected]>
…ress#67811) * Give style book its own route so it can be linked to directly. * Fix paths to and from global styles. * Use query instead of path * Fix path * Effect for editor settings update
Fixes: #67748
What?
The Query Pagination Previous block is displayed even when a user navigates beyond the range of available query results. Since no results are shown in such cases, displaying this block is unnecessary and can be confusing. This PR addresses the issue by ensuring the Query Pagination Previous block is hidden when the query has no results, improving user experience and interface clarity.
How?
The logic has been updated to render the block only when the page number is greater than 1 and less than or equal to the total number of pages, ensuring accurate and appropriate visibility.
Testing Instructions
Screencast
Screen.Recording.2024-12-10.at.10.47.05.AM.mov
Screenshots
Before:
After: