You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, the block guard feature had inconsistent behavior in query loop blocks. When enabled on a block within a query loop, it would only protect the first instance while leaving repeated instances across other posts unprotected. Additionally, all blocks of the same type would share the same guard state globally, causing unintended cross-contamination between different block contexts.
Fixes
✅ Block guard now applies consistently across all repeated instances within the same query loop
✅ Individual blocks outside query loops maintain independent guard states
✅ Different block positions within the same query loop are independent (e.g., 1st RSVP vs 2nd RSVP)
✅ No cross-contamination between blocks in different query loops or individual blocks
Testing
Query Loop Test: Add a GatherPress block with block guard to a query loop template, toggle the guard on/off, verify it affects all repeated instances across posts
Independence Test: Add multiple blocks of the same type in different contexts (individual blocks, different query loops, different positions), verify each has independent guard state
Mixed Context Test: Have the same block type both inside and outside query loops, verify they don't affect each other
Integration of a Centralized State Management System
This PR introduces a communal system that manages the settings of BlockGuard. This ensures consistency and harmony in operations across the network.
Transition from Local to Shared State Tracking
The PR substitutes the localized state tracking of BlockGuard with the newly integrated shared system, resulting in uniformity across all similar block types.
Refinement of Block Targeting Methodology
The PR has also refined the logic for targeting blocks within query loops. This allows for simultaneous control of multiple instances enhancing efficiency.
Revamping Focusable Elements Management and Visibility Control
Focusable aspects handling and their visibility control have been overhauled for better functionality within the new shared state context.
Optimized Cleanup Procedure
The PR includes a more effective cleanup process that efficiently removes overlays once a component is unmounted, especially when blocks belong to query loops.
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
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.
Description of the Change
Previously, the block guard feature had inconsistent behavior in query loop blocks. When enabled on a block within a query loop, it would only protect the first instance while leaving repeated instances across other posts unprotected. Additionally, all blocks of the same type would share the same guard state globally, causing unintended cross-contamination between different block contexts.
Fixes
Testing
How to test the Change
Changelog Entry
Credits
Props @mauteri
Checklist: