-
Couldn't load subscription status.
- Fork 286
docs: 更新介绍部分内容 #3324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: 更新介绍部分内容 #3324
Conversation
Walkthrough本次变更更新了 NutUI-React 的文档,明确其基于 Taro 并支持多端小程序与 H5 的开发,调整了包名、测试覆盖率描述和 SSR 支持状态,并对表述和格式进行了细微优化。 Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 分钟 Possibly related issues
Possibly related PRs
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat_v3.x #3324 +/- ##
==========================================
Coverage 88.14% 88.14%
==========================================
Files 290 290
Lines 19110 19110
Branches 2960 2960
==========================================
Hits 16844 16844
Misses 2261 2261
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/sites/sites-react/doc/docs/taro/intro-react.md (1)
16-16: 单元测试覆盖率数据下调需同步其他文档
此处由 “>85%” 改为 “>80%”。请确认:
- CI 报告中的最新覆盖率是否匹配;
- 其他页面/README 中的覆盖率描述是否也需更新,避免信息不一致。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/sites/sites-react/doc/docs/taro/intro-react.md(2 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: oasis-cloud
PR: jdf2e/nutui-react#2700
File: src/packages/animatingnumbers/animatingnumbers.harmony.css:25-32
Timestamp: 2024-11-06T05:56:06.800Z
Learning: 在优化 NutUI React 动画性能时,添加 `will-change` 属性可能会对布局产生影响,需要谨慎使用。
📚 Learning: 在优化 nutui react 动画性能时,添加 `will-change` 属性可能会对布局产生影响,需要谨慎使用。...
Learnt from: oasis-cloud
PR: jdf2e/nutui-react#2700
File: src/packages/animatingnumbers/animatingnumbers.harmony.css:25-32
Timestamp: 2024-11-06T05:56:06.800Z
Learning: 在优化 NutUI React 动画性能时,添加 `will-change` 属性可能会对布局产生影响,需要谨慎使用。
Applied to files:
src/sites/sites-react/doc/docs/taro/intro-react.md
📚 Learning: when changes are made to the `filelist` state in the `src/packages/uploader/uploader.taro.tsx` file,...
Learnt from: Alex-huxiyang
PR: jdf2e/nutui-react#2416
File: src/packages/uploader/uploader.taro.tsx:230-230
Timestamp: 2024-07-05T02:58:57.992Z
Learning: When changes are made to the `fileList` state in the `src/packages/uploader/uploader.taro.tsx` file, ensure to generate unit tests to cover these changes.
Applied to files:
src/sites/sites-react/doc/docs/taro/intro-react.md
📚 Learning: 在 react/taro 组件中使用 settimeout 或 setinterval 时,应当在组件卸载时通过 useeffect 的清理函数清除定时器,以防止内存泄漏。可以使用 usestate ...
Learnt from: irisSong
PR: jdf2e/nutui-react#3209
File: src/packages/searchbar/searchbar.taro.tsx:111-124
Timestamp: 2025-05-02T01:45:09.576Z
Learning: 在 React/Taro 组件中使用 setTimeout 或 setInterval 时,应当在组件卸载时通过 useEffect 的清理函数清除定时器,以防止内存泄漏。可以使用 useState 存储定时器 ID,并在 useEffect 的返回函数中清除。
Applied to files:
src/sites/sites-react/doc/docs/taro/intro-react.md
📚 Learning: 在`trendarrow`组件(`src/packages/trendarrow/trendarrow.taro.tsx`)中,css变量在鸿蒙系统(harmony os)中可能未被完全支持,导致兼容...
Learnt from: oasis-cloud
PR: jdf2e/nutui-react#2540
File: src/packages/trendarrow/trendarrow.taro.tsx:29-30
Timestamp: 2024-11-06T02:16:07.069Z
Learning: 在`TrendArrow`组件(`src/packages/trendarrow/trendarrow.taro.tsx`)中,CSS变量在鸿蒙系统(Harmony OS)中可能未被完全支持,导致兼容性问题。因此,使用硬编码的十六进制颜色值可以确保在鸿蒙系统上的正确显示。
Applied to files:
src/sites/sites-react/doc/docs/taro/intro-react.md
🪛 markdownlint-cli2 (0.17.2)
src/sites/sites-react/doc/docs/taro/intro-react.md
27-27: Images should have alternate text (alt text)
(MD045, no-alt-text)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build
- GitHub Check: test
🔇 Additional comments (1)
src/sites/sites-react/doc/docs/taro/intro-react.md (1)
13-13: “支持服务端渲染(测试阶段)” 需进一步说明
当前表述过于笼统,建议补充:
- 已验证的 SSR 方案(如 Next.js、Remix 等)
- 已知限制或待解决问题
以免读者误解稳定性。
| | 版本 | 支持的框架 | 视觉规范 | 兼容 | | ||
| | --- | --- | --- | --- | | ||
| | @nutui/nutui-react <img src="https://img.shields.io/npm/v/@nutui/nutui-react" /> | React 17\18 | 京东 APP 15.0 规范 | 现代浏览器以 Chrome >= 51、iOS >= 10.0 | | ||
| | @nutui/nutui-react-taro <img src="https://img.shields.io/npm/v/@nutui/nutui-react" /> | React 17\18 | 京东 APP 15.0 规范 | 现代浏览器以 Chrome >= 51、iOS >= 10.0 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
npm 徽章链接与包名不一致且缺少 alt 文本
- 行内徽章仍指向旧包
@nutui/nutui-react,而表格已改为@nutui/nutui-react-taro,显示的版本号可能误导读者。 <img>标签未提供alt属性,违反无障碍规范(markdownlint MD045 提示)。
可按以下 diff 修正:
-| @nutui/nutui-react-taro <img src="https://img.shields.io/npm/v/@nutui/nutui-react" /> | React 17\18 | 京东 APP 15.0 规范 | 现代浏览器以 Chrome >= 51、iOS >= 10.0 |
+| @nutui/nutui-react-taro <img src="https://img.shields.io/npm/v/@nutui/nutui-react-taro" alt="npm version (@nutui/nutui-react-taro)" /> | React 17\18 | 京东 APP 15.0 规范 | 现代浏览器以 Chrome >= 51、iOS >= 10.0 |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | @nutui/nutui-react-taro <img src="https://img.shields.io/npm/v/@nutui/nutui-react" /> | React 17\18 | 京东 APP 15.0 规范 | 现代浏览器以 Chrome >= 51、iOS >= 10.0 | | |
| | @nutui/nutui-react-taro <img src="https://img.shields.io/npm/v/@nutui/nutui-react-taro" alt="npm version (@nutui/nutui-react-taro)" /> | React 17\18 | 京东 APP 15.0 规范 | 现代浏览器以 Chrome >= 51、iOS >= 10.0 | |
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
27-27: Images should have alternate text (alt text)
(MD045, no-alt-text)
🤖 Prompt for AI Agents
In src/sites/sites-react/doc/docs/taro/intro-react.md at line 27, the npm badge
link and package name are inconsistent and the img tag lacks an alt attribute.
Update the badge URL to point to the correct package @nutui/nutui-react-taro
instead of @nutui/nutui-react, and add a meaningful alt attribute to the img tag
to comply with accessibility standards.
🤔 这个变动的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
☑️ 请求合并前的自查清单
Summary by CodeRabbit
@nutui/nutui-react-taro。