POC: Query Loop slider#74872
Draft
kmanijak wants to merge 3 commits into
Draft
Conversation
|
Size Change: +2.02 kB (+0.07%) Total Size: 3.1 MB
ℹ️ View Unchanged
|
This was referenced Jan 22, 2026
Draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Query Loop Slider Layout - POC
Extremely rough implementation of slider layout in Query Loop just to show the potential approach in opposition to #74769.
Approach
Instead of a dedicated Slider block, this POC explores adding a "Slider" variation to the existing Query Loop block. The idea is to reuse Query Loop's querying capabilities while applying slider behavior to the post-template output.
Structure:
What's Implemented
query/variations.js) withclassName: "is-style-slider"andisActivematcherquery/index.php- addsdata-wp-interactive="core/slider"and context when slider variation detectedpost-template/index.php- renders<div>instead of<ul>/<li>, adds.wp-block-slideclass to each post, injects scroll directivescore/slider) - sameview.jshandles both dedicated slider block and Query Loop variationquery/editor.scss) - horizontal layout preview for slider variationslider-controlsupdated to allowcore/queryas parentProblems & Limitations
1. Disconnected UX / Control Injection Problem
If we want to control slider-specific settings (slides per view, gap, peek amount, etc.), we need to inject custom inspector controls into Query Loop only for the slider layout. This is problematic because:
if (isSliderVariation)conditionals scattered throughout Query Loop's edit component2. Other Unsolved Issues
Conclusion
This POC demonstrates that Query Loop can be extended with slider behavior, but it highlights that neither approach (dedicated block nor variation) solves the underlying conflict between deterministic slides vs iteratively rendered blocks like Post Template.
A proper solution likely requires broader Gutenberg architecture work before sliders can be implemented cleanly.
Screenshots or screencast
Screen.Capture.on.2026-01-22.at.21-21-31.mp4