Skip to content

perf(ui): enforce aspect-ratio utilities on image wrappers to eliminate CLS (Closes #661)#687

Open
abhinavkdeval08-design wants to merge 2 commits into
devpathindcommunity-india:masterfrom
abhinavkdeval08-design:feature/cls-fix-661
Open

perf(ui): enforce aspect-ratio utilities on image wrappers to eliminate CLS (Closes #661)#687
abhinavkdeval08-design wants to merge 2 commits into
devpathindcommunity-india:masterfrom
abhinavkdeval08-design:feature/cls-fix-661

Conversation

@abhinavkdeval08-design

Copy link
Copy Markdown
Contributor

Description

Resolves #661.

Audited the core UI components for progressive rendering issues. Replaced non-dimensional containers with strict aspect-video and aspect-square Tailwind utility classes on Next.js <Image> wrappers. This ensures that the exact bounding box is reserved before the image fetch completes, effectively eliminating Cumulative Layout Shift (CLS) during progressive rendering and improving overall Lighthouse UX metrics.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Local testing (Simulated Fast 3G networks to verify layout stability during image load)
  • Vercel Preview Deployment

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have checked that the "DevPath India" branding remains intact

…te CLS (Closes devpathindcommunity-india#661)

Signed-off-by: Abhinav Deval <abhinavkdeval08@gmail.com>
@github-actions github-actions Bot added gssoc26 This is a official GirlScript Summer of Code label. level:advanced Advanced issues type:design type:performance labels Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 This is a official GirlScript Summer of Code label. level:advanced Advanced issues type:design type:performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Performance & UX]: Implement Strict Image Aspect Ratios to Prevent Cumulative Layout Shift (CLS) on Dashboard

1 participant