feat(init)!: lazy start near the viewport (1.9.0) #4

Merged
nthxuyen merged 1 commit from feat/lazy-init into main 2026-10-26 14:02:08 +01:00
Owner

Replaces #3 (its base branch merged via #2).

Modules start one viewport before they scroll into view and fire google-reviews:ready. Breaking for code polling googleReviewsInstance at load (Horizon accueil-avis.js; Horizon is on 1.6.x so unaffected until it upgrades).

Verified on MCA at 1920: no instance at load, instance + ready event on approach, all 82 card clamps and both marquee timings identical to 1.8.0, page height and ScrollTrigger starts unchanged. PSI desktop: Accueil 95, Nos forces 97.

Tagged v1.9.0, released with pkg_google_reviews-1.9.0.zip.

https://claude.ai/code/session_0156Q4Q8bv6aBnYwsD4Jdj6H

Replaces #3 (its base branch merged via #2). Modules start one viewport before they scroll into view and fire `google-reviews:ready`. Breaking for code polling `googleReviewsInstance` at load (Horizon accueil-avis.js; Horizon is on 1.6.x so unaffected until it upgrades). Verified on MCA at 1920: no instance at load, instance + ready event on approach, all 82 card clamps and both marquee timings identical to 1.8.0, page height and ScrollTrigger starts unchanged. PSI desktop: Accueil 95, Nos forces 97. Tagged v1.9.0, released with pkg_google_reviews-1.9.0.zip. https://claude.ai/code/session_0156Q4Q8bv6aBnYwsD4Jdj6H
Started at page load, a module usually far below the fold ran ~300ms
of long tasks during load. Modules now start through an
IntersectionObserver (rootMargin one viewport), or immediately where
it is unavailable, and fire a bubbling google-reviews:ready event.

BREAKING CHANGE: googleReviewsInstance no longer exists at
DOMContentLoaded. Integrations that poll for it on load (Horizon's
accueil-avis.js) must listen for google-reviews:ready instead.

Bump to 1.9.0.

Claude-Session: https://claude.ai/code/session_012Hw45Q1YnrVg6zeRu3MXcT
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nthxuyen/review-module!4
No description provided.