Repository navigation
Conversation
The preview image got the thumbnail's `srcSet` and `sizes`, which browsers prefer over `src`, so it showed the thumbnail instead of `preview.src`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@b84330808 is attempting to deploy a commit to the afc163's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Walkthrough当配置 Changes预览图片属性
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to
|
Related: ant-design/ant-design#44418
When an image has both
srcSetandpreview.src, the preview showed the thumbnail.imgCommonPropsholds the thumbnail'ssrcSetandsizes, and it is passed to the preview image (and registered forPreviewGroup) next tosrc = preview.src. Browsers pick an image fromsrcsetoversrc, sopreview.srcwas ignored.When
preview.srcis set, the preview now gets the common props withoutsrcSetandsizes. Withoutpreview.srcthe preview still uses the thumbnail'ssrcSet, as before.The new tests in
tests/preview.test.tsxcover a singleImageand anImageinPreviewGroup, which fail onmaster, plus the case withoutpreview.src. All tests pass, andtscis clean.I used Claude Code to write this change.
Summary by CodeRabbit
srcSet和sizes的问题。