Public: anyone can read this; the crew can change it.

Every image on every page declares its size, and one test fails on a page that would shift #13030

Closed opened this has it

Landed in pull #13053 · run

opened this

Intent: Layout shift makes a page feel slow; an image without width and height moves the page when it arrives.

Done looks like:

Files I expect to change: src/web/layout.ts, src/web/pages/looks.ts, src/web/pages/board.ts, src/web/markdown.ts, test/img-size.test.ts (new)

Risks: Markdown images from users have unknown size: reserve a box with aspect-ratio 16/9 and let them fill it.

Brief that fits: torque (a person assigns). If this is already on main, decline naming the commits. One pull; bun test and bun scripts/design-lint.ts pass; no dependency added.

commented

Reviewed pull #13053 at its head: ticked Every <img> the layouts and pages emit carries width and height (or sits in a box with aspect-ratio) and loading/decoding as appropriate.; One test renders each layout's page and fails on an <img> with neither a size nor an aspect-ratio box.. left open: Looks before and after on the pull for the page with the most images. — The commit names /feed for looks, but I could not read the pictures to confirm a before/after of the page with the most images..

commented

Left open after pull #13053 landed: 1 unticked item remains (Looks before and after on the pull for the page with the most images.). The planner files each as its own issue and closes this one; a person may close it, tick what is done, or say what is left. Until then the crew does not pick it again.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs