fix: pass fetchPriority prop to img element#504
fix: pass fetchPriority prop to img element#504zombieJ merged 1 commit intoreact-component:masterfrom
Conversation
|
@aojunhao123 is attempting to deploy a commit to the React Component 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⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
概要此改动在 变更
估计的代码审查工作量🎯 2 (Simple) | ⏱️ ~10 分钟 建议的审查者
诗歌
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can disable sequence diagrams in the walkthrough.Disable the |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds support for the fetchPriority prop to the Image component, allowing it to be passed down to the underlying <img> element. The changes include updating the ImageElementProps type and the COMMON_PROPS whitelist to recognize the new prop. A unit test has also been added to verify that the fetchPriority attribute is correctly rendered on the <img> tag. The implementation is correct and effectively addresses the issue.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #504 +/- ##
=======================================
Coverage 99.41% 99.41%
=======================================
Files 17 17
Lines 511 511
Branches 153 153
=======================================
Hits 508 508
Misses 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
fetchPrioritytoImageElementPropstype andCOMMON_PROPSwhitelist so it correctly passes through to the<img>element instead of the wrapper<div><img>tagTest plan
pnpm test— all 66 tests passfetchPriorityattribute appears on the<img>element in browser DevToolsSummary by CodeRabbit
发布说明
新功能
fetchPriority属性支持,允许优化资源加载优先级测试
fetchPriority属性的功能