Front-End Exercise 4
See the Pen Untitled by Desert Antihero (@Desert-Antihero) on CodePen.
English resources
Use these to discuss the bug clearly during/after the CodePen exercise.
🎤 Speaking Instructions how to perform
- Title: “Gallery images cause layout shift (CLS) on load.”
- Environment: “Chrome DevTools with Network throttled to ‘Slow 3G’; viewport 390×844.”
- Steps to reproduce:
- Open the page and throttle the network (Slow 3G).
- Scroll to the gallery and wait for images to load.
- Observe text/buttons jumping as each image appears.
- Expected vs. Actual:
- Expected: Content should stay stable while images load.
- Actual: Content jumps (layout shifts) as images load without reserved space.
- Impact/Severity: “Medium–High — hurts perceived quality; may cause mis-clicks and lower engagement; impacts Core Web Vitals (CLS).”
- Recommendation: “Add explicit
width/heightor CSSaspect-ratio; consider placeholders/skeletons; keep dimensions consistent.” - Hand-off: “I’ll attach a short recording and a Lighthouse report showing CLS spikes.”
📖 Vocabulary definitions
- CLS (Cumulative Layout Shift) — a metric that measures unexpected layout movement during page load.
- layout shift — visible movement of elements when content loads in.
- placeholder — temporary block that reserves space until the real content loads.
- aspect ratio — proportional relationship between width and height.
- Lighthouse — Google’s tool for auditing performance and web vitals.
- Core Web Vitals — UX metrics (e.g., LCP, CLS, INP).
- throttling — simulating slow network/CPU in DevTools.
- viewport — visible area of a web page in the browser.
🧩 Collocations natural pairings
- reserve space for images
- stabilize the layout
- reduce layout shift
- audit Core Web Vitals
- simulate slow networks
- add width/height attributes
- apply an aspect ratio
🗣️ Idioms & Phrasal Verbs natural speech
- jump around — move erratically (“The page jumps around while loading.”)
- zero in on — focus on the main cause.
- iron out — smooth or fix minor issues.
- lock in — secure a value (e.g., “lock in the aspect ratio”).
- point out — highlight an issue to others.
🧠 Grammar Focus useful forms
- Present continuous for live observation: “The buttons are jumping when images load.”
- Present simple for facts: “CLS measures unexpected layout movement.”
- Passive for impact: “User experience is affected by layout shifts.”
- Cause–effect with participles: “Missing dimensions causes instability.”
🎯 Modal Phrases recommendations
- “We should add width/height attributes to reserve space.”
- “Engineering could use
aspect-ratiofor consistency.” - “Design might want to align image crops to a fixed ratio.”
- “We can provide a skeleton as a placeholder.”
🧪 Model Answer (spoken style) example
“Title: Gallery images cause layout shift (CLS) on load. Environment: Chrome with Slow 3G, mobile viewport.
Steps: open the page, scroll to the gallery, and wait for images to load. Expected: the content remains stable while images
load. Actual: the cards jump as each image appears, which is distracting and can cause mis-clicks.
Impact: medium–high, and it negatively affects Core Web Vitals, specifically CLS. Likely cause: images are missing
explicit width/height or an aspect-ratio placeholder, so the browser can’t reserve space. Recommendation: add width and
height attributes to images (letting the browser infer aspect ratio), or apply CSS aspect-ratio with a reserved
height/skeleton. I’ll add a short screen recording and a Lighthouse report to the ticket.”