Repository navigation
refactor(docs): remove POSTER_SIZES, which does nothing while images are unoptimized - #241
Merged
hunterbecton merged 1 commit intoOct 9, 2026
Conversation
…are unoptimized
The docs site exports with `images: { unoptimized: true }`, so next/image
renders each card poster as a plain <img> with no srcset, and it drops
`sizes`. POSTER_SIZES never picked a smaller file. Remove it, and remove
the homepage spec comment that said next/image may serve a resized file.
React Doctor's nextjs-image-missing-sizes rule assumes optimization is on,
so the card's Image carries an inline suppression that gives the reason.
Contributor
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused refactor matches the unoptimized Next.js configuration without changing tested behavior.
0 open findings
What changed in this PR
Removes ineffective sizes handling for unoptimized favorite posters and updates related test commentary.
Changes:
- Removes
POSTER_SIZESand the unusedsizesprop. - Adds a targeted React Doctor suppression with rationale.
- Corrects outdated test commentary.
| File | Description |
|---|---|
apps/docs/src/components/favorites/favorites-list.tsx |
Removes ineffective poster sizing metadata. |
apps/docs-tests/docs/homepage.spec.ts |
Removes an inaccurate image-resizing comment. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
hunterbecton
deleted the
hunter/sha-221-remove-poster_sizes-which-does-nothing-while-images-are
branch
October 9, 2026 21:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
POSTER_SIZESsaid it made next/image pick a card poster no larger than the card needs. The docs site exports withimages: { unoptimized: true }, so next/image renders each card poster as a plain<img>with nosrcset, and it dropssizes. The prop never changed which file a visitor downloads. SHA-221.What changes
The card poster
The card poster's
Imageno longer takessizes, andPOSTER_SIZESis gone. The homepage's HTML is the same as before. Next warns about afillimage with nosizesonly when the image is optimized, so the dev console stays quiet on/.DemoPoster.tsxandhome-hero.tsxkeep theirsizes="100vw". It does nothing either, but no comment there claims it does, and the ticket leaves them alone.The React Doctor suppression
React Doctor's
nextjs-image-missing-sizesrule reads the JSX but notnext.config.ts, so it flags the barefill. TheImagecarries an inline suppression, and the comment above it says what to add if optimization comes on. The rule stays on for the rest of the repo, where it will catch a missingsizesonce optimization is on.The homepage spec
"each favorite shows its poster" drops the comment that next/image may serve a resized file, which is never true under
unoptimized. The shape check stays.