-
-
Notifications
You must be signed in to change notification settings - Fork 50.1k
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
refactor(Space): solve space circular dependency issue #42811
Conversation
Pull reviewers statsStats of the last 30 days for ant-design:
|
size-limit report 📦
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feature #42811 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 641 642 +1
Lines 10921 10922 +1
Branches 2966 2966
=========================================
+ Hits 10921 10922 +1
☔ View full report in Codecov by Sentry. |
New dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No new dependency issues detected in pull request Bot CommandsTo ignore an alert, reply with a comment starting with Pull request alert summary
📊 Modified Dependency Overview:
|
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
solve space circular dependency issue
components/space/Item.tsx -> components/space/index.tsx -> components/space/Item.tsx
components/space/index.tsx -> components/space/Item.tsx -> components/space/index.tsx
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at bafc83e
Extracted
SpaceContext
andSpaceContextProvider
fromcomponents/space/index.tsx
to a newcomponents/space/context.ts
module. This avoids circular imports and improves the structure of theSpace
component and its children.🔍 Walkthrough
🤖 Generated by Copilot at bafc83e
SpaceContext
andSpaceContextProvider
components from./index.tsx
to a new module./context.ts
to avoid circular dependencies and improve code organization (link, link, link)Space
component to useSpaceContextProvider
component from./context.ts
instead ofSpaceContext.Provider
component for consistent naming (link)SpaceContext
type from./index.tsx
for external use (link)