Skip eager-loading hidden hero-marquee foreground at current breakpoint - #192
Open
JasonHowellSlavin wants to merge 1 commit into
Open
Skip eager-loading hidden hero-marquee foreground at current breakpoint#192JasonHowellSlavin wants to merge 1 commit into
JasonHowellSlavin wants to merge 1 commit into
Conversation
getLCPImages falls back to the foreground image when no breakpoint-specific background exists. When a hero-marquee hides its foreground via media-hidden-mobile / media-hidden-tablet, that fallback could eager-load an image that is not rendered at the active breakpoint. Guard the fallback so a hidden foreground is never hinted as the LCP. Adopts the visibility-aware pattern from adobecom/cc#407. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
Brandon32
approved these changes
Jun 25, 2026
jsandland
approved these changes
Jun 25, 2026
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.
What
Guards the foreground fallback in
getLCPImagesso ahero-marqueeforeground that is hidden at the active breakpoint (media-hidden-mobile/media-hidden-tablet) is never hinted as the LCP image.Why
getLCPImagesfalls back to the foreground image when no breakpoint-specific background exists. If the foreground is hidden for the current viewport, that fallback could eager-load an image that is never rendered — wasting bandwidth and supplying a wrongfetchpriorityhint.How
Strictly narrowing — the existing breakpoint background paths are unchanged; only the hidden-foreground fallback now no-ops.
Context
Adopts the visibility-aware pattern from adobecom/cc#407, per discussion adobecom/milo-private#374. Breakpoint-aware background selection (cc#346) was already present; MEP marquee replacement (cc#345) does not apply to bacom (eager attributes are set before
loadArea/MEP).Test
hero-marqueepage usingmedia-hidden-mobile/media-hidden-tabletwith no breakpoint background, across mobile/tablet/desktop.🤖 Generated with Claude Code