Skip to content
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

Merged
merged 2 commits into from
Jun 5, 2023

Conversation

kiner-tang
Copy link
Member

@kiner-tang kiner-tang commented Jun 3, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

solve space circular dependency issue

  • (undefined) Circular dependency detected:
    components/space/Item.tsx -> components/space/index.tsx -> components/space/Item.tsx
  • (undefined) Circular dependency detected:
    components/space/index.tsx -> components/space/Item.tsx -> components/space/index.tsx

📝 Changelog

Language Changelog
🇺🇸 English solve space circular dependency issue
🇨🇳 Chinese 解决间距组件循环依赖问题

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

🤖 Generated by Copilot at bafc83e

Extracted SpaceContext and SpaceContextProvider from components/space/index.tsx to a new components/space/context.ts module. This avoids circular imports and improves the structure of the Space component and its children.

🔍 Walkthrough

🤖 Generated by Copilot at bafc83e

  • Extract SpaceContext and SpaceContextProvider components from ./index.tsx to a new module ./context.ts to avoid circular dependencies and improve code organization (link, link, link)
  • Refactor Space component to use SpaceContextProvider component from ./context.ts instead of SpaceContext.Provider component for consistent naming (link)
  • Export SpaceContext type from ./index.tsx for external use (link)

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2023

Pull reviewers stats

Stats of the last 30 days for ant-design:

User Total reviews Time to review Total comments
li-jia-nan 94 1h 16m 57
afc163 90 1h 17m 77
MadCcc 53 1d 12h 18m 126
kiner-tang 45 12m 16
yoyo837 28 46m 30
zombieJ 27 58m 16
RedJue 9 3h 50m 11
PeachScript 3 19m 0
RexSkz 2 48m 5
vagusX 1 1h 36m 0
heiyu4585 1 5m 0
arvinxx 1 46m 12
Wxh16144 1 21m 3
sawadyecma 1 1h 51m 2
bombillazo 1 23h 49m 1
BoyYangzai 1 20m 2
lke-twh 1 2h 49m 0

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2023

size-limit report 📦

Path Size
./dist/antd.min.js 375.28 KB (-8.99 KB 🔽)
./dist/antd-with-locales.min.js 434.61 KB (-9.04 KB 🔽)

@codecov
Copy link

codecov bot commented Jun 3, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (b93495a) 100.00% compared to head (9f3181d) 100.00%.

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     
Impacted Files Coverage Δ
components/space/Item.tsx 100.00% <ø> (ø)
components/space/index.tsx 100.00% <ø> (ø)
components/space/context.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@socket-security
Copy link

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

➕ Added Package Capability Access +/- Transitive Count Publisher
rc-pagination@3.5.0 None +0 afc163
rc-picker@3.8.0 None +0 afc163
rc-collapse@3.7.0 None +0 madccc
rc-tabs@12.7.1 None +1 zombiej
rc-mentions@2.3.0 None +1 madccc
rc-menu@9.9.2 None +0 madccc
rc-rate@2.12.0 None +0 afc163

@kiner-tang kiner-tang changed the base branch from master to feature June 4, 2023 04:26
@afc163 afc163 merged commit f3e9b8d into feature Jun 5, 2023
@afc163 afc163 deleted the refactor-space-circular-dependency branch June 5, 2023 05:29
@MadCcc MadCcc mentioned this pull request Jun 6, 2023
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants