Skip to content

Query Total: Add interactivity.clientNavigation block support #69661

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

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

t-hamano
Copy link
Contributor

@t-hamano t-hamano commented Mar 23, 2025

What?

Related:

Adds interactivity.clientNavigation support to the Query Total block in order to enable client navigation.

Why?

The Query Total block is available only if the ancestor block is the Query Loop block, but we can't use the client navigation if the Query Loop block includes the Query Total block.

Screenshot - Notice modal when inserting the Query Total block into the Query Loop block with "Reload full page" disabled:

image

I don't see any reason why we can't add the interactivity support.

Testing Instructions

  • Insert a Query Loop block and Query Total block
  • In the Query Loop block, disable "Reload full page" toggle
  • In the Query Total block, change display type to "Range dispaly"
  • Open the post on the frontend
  • Make sure that client navigation works properly

Screenshots or screencast

ab4ddc82c1c1818b8ab959b8848c7287.mp4

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Query Total Affects the query total block labels Mar 23, 2025
@t-hamano t-hamano self-assigned this Mar 23, 2025
@t-hamano t-hamano added the Backport to WP 6.8 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Mar 23, 2025
@t-hamano t-hamano marked this pull request as ready for review March 23, 2025 01:45
Copy link

github-actions bot commented Mar 23, 2025

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>
Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>
Co-authored-by: sarthaknagoshe2002 <sarthaknagoshe2002@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: luisherranz <luisherranz@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano
Copy link
Contributor Author

I'd suggest backporting this feature into 6.8 release, as some users may feel it's a bug if they can't use the client navigation.

@Mamaduka
Copy link
Member

I'd suggest backporting this feature into 6.8 release, as some users may feel it's a bug if they can't use the client navigation.

Cannot backport Enhancements in Beta/RC cycle :(

@t-hamano
Copy link
Contributor Author

If it's a small enhancement and there is a consensus or agreement, enhancements can be allowed to be backported even during the Beta/Rc cycle, no? 🤔

@Mamaduka
Copy link
Member

If it can become a "blessed" task, then I think it's okay. The general guideline is that only bug fixes are backported.

You could share this in the leads channel for more feedback.

Copy link
Member

@fabiankaegy fabiankaegy left a comment

Choose a reason for hiding this comment

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

Good catch!

@luisherranz
Copy link
Member

That a block specifically created for the Query Loop block cannot be used without the "Force reloading the page" setting seems like a bug to me, not an enhancement.

@t-hamano
Copy link
Contributor Author

Posted the suggestion about backporting this PR on Slack: https://wordpress.slack.com/archives/C080HLPP2Q6/p1742806743015109

Copy link
Contributor

@sarthaknagoshe2002 sarthaknagoshe2002 left a comment

Choose a reason for hiding this comment

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

Nice find!

@t-hamano
Copy link
Contributor Author

Based on the discussion on Slack, I'm backporting this PR to 6.8: https://wordpress.slack.com/archives/C080HLPP2Q6/p1742826838468909?thread_ts=1742806743.015109&cid=C080HLPP2Q6

@t-hamano t-hamano merged commit 2382689 into trunk Mar 24, 2025
81 checks passed
@t-hamano t-hamano deleted the query-total-iapi branch March 24, 2025 15:13
@github-project-automation github-project-automation bot moved this from 🔎 Needs Review to ✅ Done in WordPress 6.8 Editor Tasks Mar 24, 2025
@github-actions github-actions bot added this to the Gutenberg 20.6 milestone Mar 24, 2025
@github-actions github-actions bot removed the Backport to WP 6.8 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Mar 24, 2025
gutenbergplugin pushed a commit that referenced this pull request Mar 24, 2025
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>
Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>
Co-authored-by: sarthaknagoshe2002 <sarthaknagoshe2002@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: luisherranz <luisherranz@git.wordpress.org>
@github-actions github-actions bot added the Backported to WP Core Pull request that has been successfully merged into WP Core label Mar 24, 2025
Copy link

I just cherry-picked this PR to the wp/6.8 branch to get it included in the next release: d907387

chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
…ess#69661)

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>
Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>
Co-authored-by: sarthaknagoshe2002 <sarthaknagoshe2002@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: luisherranz <luisherranz@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported to WP Core Pull request that has been successfully merged into WP Core [Block] Query Total Affects the query total block [Type] Enhancement A suggestion for improvement.
Projects
Development

Successfully merging this pull request may close these issues.

6 participants