Skip to content
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: Sync "Max pages to show" setting between Query and Pagination blocks #68931

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

im3dabasia
Copy link
Contributor

@im3dabasia im3dabasia commented Jan 29, 2025

Work in Progress

To do:

  • I am planning to refactor the code to make it more perfomant and organise it better.
  • I will explore options to improve the code quality

Related issues: #63027 , #63028

What?

  • Display "Max pages to show" only when a Pagination block is an inner block of the Query Loop.
  • Add the "Max pages to show" setting to the Pagination block, syncing it with the Query block for consistency.

Why?

Improves clarity by ensuring the setting only appears when relevant and enhances usability by allowing adjustments from both the Query and Pagination blocks.

How?

  • Checks if Pagination is an inner block before showing the setting.
  • Syncs the setting between Query and Pagination blocks.

Testing Instructions

  1. Add a Query Loop block > Start blank > Title & Date.
  2. Click 'Display settings' in the block toolbar.
  3. Verify "Max pages to show" appears only if a Pagination block is inside the Query Loop.
  4. Confirm that the setting is synced between the Query and Pagination blocks.
  5. Change the value and ensure updates reflect correctly in both places.

Screenshots or screencast

Before After

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Query Loop Affects the Query Loop Block labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Query Loop Affects the Query Loop Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants