Menu

Keep AI-suggested loading skeletons matched to real content height
📰

Keep AI-suggested loading skeletons matched to real content height

DEV Community: react·Sherotree·9 days ago
#6I6aiBet
#devtoreact#devto#dev#skeleton#loaded
Reading 0:00
15s threshold

Agents love inventing skeleton screens. Ask for a loading state and you get a neat gray card with three lines… that is half the height of the real content. When data arrives, the layout jumps. CLS goes up. Reviewers shrug because “at least there is a skeleton.”

I’ve started treating height match as a hard constraint, not a nice-to-have. If the skeleton doesn’t reserve roughly the same vertical space as the loaded UI, send it back.

Why height mismatch slips through

AI drafts tend to:

Copy a generic “3 lines + avatar” pattern from training data

Ignore the real card’s padding, media block, or multi-row meta

Use fixed h-4 bars that look pretty in isolation and wrong in the page

Forget mobile denser layouts vs desktop taller cards

The PR still “has a loading state,” so it merges.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.