feat: adjust @rc-component/util imports to root path#565
Conversation
- src/Dialog/index.tsx: import contains, useId, pickAttrs, warning from root - src/Dialog/Content/Panel.tsx: import useComposeRef, useLockFocus, pickAttrs from root - src/IDialogPropTypes.ts: import GetContainer from root - tests/focus.spec.tsx: update jest mock path - src/Dialog/Content/index.tsx: add eslint-disable for CSSMotionRef import (not exported from root) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Someone 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 (2)
✅ Files skipped from review due to trivial changes (1)
Walkthrough统一将代码和测试中对 变更导入路径统一重构
代码审查工作量评估🎯 2 (Simple) | ⏱️ ~8 分钟 可能相关的 PR
建议审查人
诗
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/Dialog/Content/index.tsxESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. 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 |
There was a problem hiding this comment.
Code Review
This pull request consolidates imports from @rc-component/util subpaths (such as /lib/ref, /lib/Dom/focus, /lib/pickAttrs, and /lib/warning) to import directly from the main @rc-component/util package entry point across several files, including Panel.tsx, index.tsx, IDialogPropTypes.ts, and the corresponding test mock in focus.spec.tsx. I have no feedback to provide as the changes are clean and correct.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #565 +/- ##
=======================================
Coverage 98.92% 98.92%
=======================================
Files 8 8
Lines 186 186
Branches 67 67
=======================================
Hits 184 184
Misses 2 2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…#565) * feat: adjust @rc-component/util imports to root path - src/Dialog/index.tsx: import contains, useId, pickAttrs, warning from root - src/Dialog/Content/Panel.tsx: import useComposeRef, useLockFocus, pickAttrs from root - src/IDialogPropTypes.ts: import GetContainer from root - tests/focus.spec.tsx: update jest mock path - src/Dialog/Content/index.tsx: add eslint-disable for CSSMotionRef import (not exported from root) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat: update @rc-component/motion dependency to version 1.3.3 and adjust import path --------- Co-authored-by: 刘欢 <lh01217311@antgroup.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
背景
项目中有多个文件使用非根路径方式引入
@rc-component/util的模块,为了统一代码风格并遵循 eslint规则(
no-restricted-imports),将所有引入调整为从包根路径导入。主要改动
src/Dialog/index.tsx: 将contains,useId,pickAttrs,warning的引入从子路径调整为根路径引入src/Dialog/Content/Panel.tsx: 将useComposeRef,useLockFocus,pickAttrs的引入从子路径调整为根路径引入src/IDialogPropTypes.ts: 将GetContainer类型的引入从子路径调整为根路径引入tests/focus.spec.tsx: 更新 jest mock 路径Summary by CodeRabbit