fix(blocks): restore allow-duplicate toggle for static blocks#180
Open
miguelpeixe wants to merge 1 commit into
Open
fix(blocks): restore allow-duplicate toggle for static blocks#180miguelpeixe wants to merge 1 commit into
miguelpeixe wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Restores editor access to the “Allow duplicate content” toggle for blocks in Static mode by rendering the toggle outside the Dynamic-only controls section in QueryControls.
Changes:
- Move the “Allow duplicate content”
ToggleControlso it renders for both Static and Dynamic modes (whenonAllowDedupeChangeis provided). - Preserve existing toggle behavior/props (
allowDedupeCurrentValue,onAllowDedupeChange) while making the UI reachable in Static mode.
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.
All Submissions:
Changes proposed in this Pull Request:
The "Allow duplicate content" toggle is once again shown on Homepage Posts and Carousel blocks set to Static mode, not only Dynamic mode.
A page-wide deduplication process collects the posts pinned in static blocks and excludes them from dynamic blocks anywhere on the page — including dynamic blocks placed above the static one. The intended way to opt a static block out of that behavior is its "Allow duplicate content" toggle, but a recent change (Automattic/newspack-blocks#2309) moved the toggle into a section that only renders in Dynamic mode, so editors could no longer reach it on static blocks. This restores that control, fixing cases where a post pinned lower on the page disappears from a dynamic loop higher up.
Closes NPPM-2826.
How to test the changes in this Pull Request:
n build newspack-blocks.Other information: