Repository navigation
Show products and posts that load after a page change - #283
Merged
Merged
Conversation
Pagination, sorting and filters on a Woo product collection, and on a core Query Loop with "Force page reload" off, swap results in through the Interactivity API router without a page load. The new cards still carry .ext-animate--on, so the head CSS hid them, but the script only set elements up once on DOMContentLoaded. Page 2 of the shop rendered blank until a reload. A MutationObserver now runs the existing per-element setup on newly added .ext-animate--on elements only, the way WOW.js handles content added later. The router has no public "region swapped" event, so an observer is the only hook a plain script has. A full re-scan, as AOS does, was rejected because it replays cards the visitor already saw. The hide rule now applies only to elements the script has set up. One it never sets up is held hidden by a 3s animation and then shows, so a missed element, a blocked script or a script error can no longer keep content invisible. On a load where the footer script runs later than 3s, an element can show, hide and then animate in; visible content was preferred over the risk of content that never appears. The fix lives in the animation code every site loads, so sites with a saved copy of the shop template are covered without re-saving it.
The hold rule matched any .ext-animate--on element without the ext-animate class. Blocks with Interactivity API class directives, such as accordion items, get their class attribute rebuilt when they change state, which drops ext-animate. Opening an accordion item that had already animated hid it again for up to 3s. data-ext-animated survives the rebuild, which is why the long-lived hide rule already checks it; the hold rule now checks it too.
amjadr360
marked this pull request as ready for review
November 23, 2026 23:07
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.
With animations turned on, a shop showed blank product cards after a visitor clicked "Next page". The new products only appeared after a reload. The same happened to posts in a blog list set to change pages without reloading. The theme now animates whatever arrives after the page has loaded. If anything is still waiting to animate after 3 seconds, it shows anyway, so content can no longer stay invisible.