Repository navigation
fix(rules): perf/lcp-hints stops flagging eager images below a preloaded hero #1221 - #1223
Conversation
|
Review of #1223: the change is correct and I found nothing that should block merging. I did not run the tests or the checks; I read the diff and grepped for other users of
Test coverage looks good: the reporter fixture, a later preloaded candidate, the media and imagesrcset preload cases, the lazy-cards control and |
|
Round 1: all four addressed (docs line, grouping fixtures, wrapped condition, value comment). |
|
Review of #1223: the change is correct and I found nothing that should block merging.
I only read the diff and grepped for other uses. I didn't run the tests. Tests are good: the reporter fixture, a later preloaded candidate, imagesrcset and media preloads, a lazy control and fetchpriority parity are all covered. The docs and CHANGELOG are updated. |
…ded hero; one image named when none is preloaded #1221 Signed-off-by: Nik Cubrilovic <[email protected]>
…condition #1221 Signed-off-by: Nik Cubrilovic <[email protected]>
a4e03c3 to
948501d
Compare
|
Reviewed the diff. The logic change in
Test coverage is good: the reporter fixture, a later preloaded candidate, an imagesrcset or media preload, the lazy-cards control and fetchpriority parity are all covered. I did not run the tests myself. |
Closes #1221.
A page has one LCP element. Any preloaded candidate (of the first three eligible images) now satisfies
lcp-preload; with no image preload it warns once,Likely-LCP image loaded without preload, naming the first candidate (value 1).findLcpCandidatesis unchanged, soperf/lcp-fetchpriorityis untouched.largeImagesWithoutPreloadkeeps its type and now holds at most one entry; its only consumer is this rule. Preload matching is unchanged (href, any imagesrcset URL, media attribute).Tests: reporter fixture (preloaded hero + 4 eager 300x300 cards) passes with no candidates; a later preloaded candidate passes; no preload warns once naming the first; imagesrcset + media preload; lazy-cards control; fetchpriority parity. The tests that pinned the per-image count are updated. Docs:
docs/rules/perf/lcp-hints.mdx, regenerated glossary/hub blocks, CHANGELOG. Gates:scripts/test-suites.ts --run rules(8040 pass; two timing tests, h1-title-alignment-929 and a11y-nesting-parity-3066, failed under machine load and pass by path), rules/core-contracts/CLI typecheck, CLI lint/format,make validate.template-invariance-measured.jsonneeded no change (suite green on it).The squirrelscan agent skill needs no change.