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

fix: Space.Compact UI bug #42199

Merged
merged 7 commits into from
May 9, 2023
Merged

Conversation

Ec-tracker
Copy link
Contributor

@Ec-tracker Ec-tracker commented May 7, 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 #41876

fix #41876

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English fix(Space.Compact): fix(Space.Compact): fix the size is not inherited from ConfigProvider when the componentSize is set
🇨🇳 Chinese 修复: 当ConfigProvider中componentSize被设定时, Space.Compact没有继承的问题

☑️ 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 e44f7d0

Added support for ConfigProvider size in Space.Compact component and added corresponding test cases. Updated components/space/Compact.tsx and components/space/__tests__/space-compact.test.tsx files.

🔍 Walkthrough

🤖 Generated by Copilot at e44f7d0

  • Add ConfigProvider component to test cases for Space.Compact component (link)
  • Test that Space.Compact component inherits size from ConfigProvider component if size prop is not specified (link)
  • Test that size prop of Space.Compact component overrides componentSize property of ConfigProvider component if both are specified (link)
  • Import SizeContext from ../config-provider/SizeContext to access componentSize property from ConfigProvider component in Space.Compact component (link)
  • Modify size prop of Space.Compact component to use sizeInContext variable, which is the value of componentSize property from ConfigProvider component or 'middle' by default (link)

@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2023

@afc163
Copy link
Member

afc163 commented May 7, 2023

Please update jest snapshot.

@Ec-tracker
Copy link
Contributor Author

Ec-tracker commented May 8, 2023

Please update jest snapshot.

Thank you for updating the snapshot for me!

@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (52d91ce) 100.00% compared to head (9d63c75) 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##            master    #42199    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          619       617     -2     
  Lines        11047     10529   -518     
  Branches      3079      2876   -203     
==========================================
- Hits         11047     10529   -518     
Impacted Files Coverage Δ
components/space/Compact.tsx 100.00% <100.00%> (ø)

... and 23 files with indirect coverage changes

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

@zombieJ zombieJ merged commit 24dd535 into ant-design:master May 9, 2023
52 checks passed
@afc163
Copy link
Member

afc163 commented May 9, 2023

PR 标题应该先改对再合并的。

@afc163 afc163 changed the title Ec tracker/fix 41876 fix: Space.Compact UI bug May 9, 2023
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.

Input.Group[compact] 改成了 Space.Compact 组件UI有问题
3 participants