fix: reserve layout space for Partners carousel and Features images - #8022
fix: reserve layout space for Partners carousel and Features images#8022Bryandero98 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe PR updates feature image dimensions and aspect-ratio styling, adds explicit AWS and GCP logo sizes, and reserves desktop space for the partners carousel. ChangesHomepage layout stability
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change reserves space for homepage feature images and the desktop partner carousel to reduce layout shift without changing carousel or link behavior. The implementation is ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The changes address carousel space reservation and Feature image dimensions, but the provided summary does not show explicit dimensions or aspect-ratio reservations for partner images. It also provides no evidence that desktop and mobile CLS meet the required value below 0.10 or that hydration mismatches are avoided. Resolution Add explicit dimensions or an equivalent aspect-ratio reservation for partner images. Verify and document that desktop and mobile CLS are below 0.10, with no hydration mismatch or visual regression, while preserving existing carousel and Features behavior. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview deployment for PR #8022 removed. This PR preview was automatically pruned because we keep only the 3 most recently updated previews on GitHub Pages to stay within deployment size limits. If needed, push a new commit to this PR to generate a fresh preview. |
Two independent CLS (Cumulative Layout Shift) sources on the homepage: - The Partners carousel's slick/unslick breakpoint switch restructures the DOM on client-side init, shifting content below it. Reserves the single-row height (matching .partner__block__inner's fixed 110px) on desktop only, where slick renders a single row by design. - The Features section's images (whiteboarding/commenting/aws, all 877x476) had no width/height/aspect-ratio, so the browser couldn't reserve their box before load. Added aspect-ratio to the actual <img> (nested inside a Link, so the selector is `& > a > img`, not the `& > img` a first pass would reach for) plus explicit width/height on the small AWS/GCP logo icons in the linked-cards row, which were missing them entirely. Verified live with Playwright against `npm run develop:lite`: getComputedStyle confirms aspect-ratio resolves to 877/476 on the actual rendered images, and the carousel reserves ~110-113px on desktop. The bounding-box ratio still differs from 877/476 visually because ImageWrapper/ImageWrapperTwo apply a 3D transform (perspective + scale + rotateY/rotateZ) for a hover effect - that's a paint-time projection, not the layout box CLS is computed from, so it doesn't affect the fix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Bryandero98 <bryandero98@gmail.com>
900bab0 to
74ed350
Compare
Summary
Closes #8018. Two independent CLS (Cumulative Layout Shift) sources on the homepage:
min-height: 110px, matching.partner__block__inner's fixedheight: 110px) on desktop only (min-width: 1401px), where slick renders a single row by design — below that breakpoint.partner__block__innerwraps into multiple rows and a fixed height would be wrong.width/height/aspect-ratio, so the browser couldn't reserve their box before load. Addedaspect-ratio: 877 / 476to the actual<img>— it's nested inside aLink(renders as<a>), so the selector is& > a > img, not the& > imga first pass would reach for. Also added explicitwidth/heightto the small AWS/GCP logo icons in the linked-cards row, which were missing them entirely.Test plan
npm run checklint— no new errors introduced (286 pre-existing errors in unrelated files untouched by this PR; the 4 files this PR touches lint clean on their own).npm run develop:lite:getComputedStyleconfirmsaspect-ratioresolves to877 / 476on the actual rendered<img>elements (previouslyauto, meaning the original& > imgselector never matched).getBoundingClientRect.ImageWrapper/ImageWrapperTwoapply a 3D transform (perspective+scale+rotateY/rotateZ) for a hover effect — that's a paint-time projection, not the layout box CLS is actually computed from, so it doesn't affect this fix.🤖 Generated with Claude Code
Summary by CodeRabbit