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

feat: Avatar.Group support shape props #43817

Merged
merged 14 commits into from
Jul 27, 2023
Merged

feat: Avatar.Group support shape props #43817

merged 14 commits into from
Jul 27, 2023

Conversation

li-jia-nan
Copy link
Member

@li-jia-nan li-jia-nan commented Jul 26, 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

📝 Changelog

Language Changelog
🇺🇸 English feat: Avatar.Group support shape props
🇨🇳 Chinese Avatar.Group 支持设置形状

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

Added a shape prop to the Avatar and Avatar.Group components to enable square avatars. Updated the Avatar component to use the new AvatarContext from the SizeContext file. Added a new demo and documentation for the shape prop. Fixed some minor style issues.

🔍 Walkthrough

🤖 Generated by Copilot at 8060644

  • Add shape prop to Avatar and Avatar.Group components to allow square avatars (link, link, link, link, link, link, link, link, link, link)
  • Use AvatarContext type to pass shape and size props from Avatar.Group to Avatar (link, link, link, link)
  • Simplify cloneElement function in Avatar.Group to only pass key prop to children (link)
  • Add default values for maxPopoverPlacement and maxPopoverTrigger props in Avatar.Group (link)
  • Use destructured style prop in Avatar.Group (link, link, link)
  • Add demo for shape prop in Avatar.Group in components/avatar/demo/group.tsx (link)

@stackblitz
Copy link

stackblitz bot commented Jul 26, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 26, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Jul 26, 2023

size-limit report 📦

Path Size
./dist/antd.min.js 383.57 KB (+31 B 🔺)
./dist/antd-with-locales.min.js 443.06 KB (+31 B 🔺)

@argos-ci
Copy link

argos-ci bot commented Jul 26, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 4 changes Jul 27, 2023, 10:01 AM

li-jia-nan and others added 2 commits July 26, 2023 15:02
Co-authored-by: MadCcc <1075746765@qq.com>
Signed-off-by: lijianan <574980606@qq.com>
@li-jia-nan li-jia-nan requested a review from MadCcc July 26, 2023 07:08
@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (8000750) 100.00% compared to head (a81ccab) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #43817   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          658       658           
  Lines        11143     11146    +3     
  Branches      3017      3018    +1     
=========================================
+ Hits         11143     11146    +3     
Files Changed Coverage Δ
components/avatar/AvatarContext.ts 100.00% <100.00%> (ø)
components/avatar/avatar.tsx 100.00% <100.00%> (ø)
components/avatar/group.tsx 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

components/avatar/group.tsx Outdated Show resolved Hide resolved
@li-jia-nan li-jia-nan requested a review from MadCcc July 26, 2023 09:08
@li-jia-nan li-jia-nan requested a review from MadCcc July 27, 2023 07:04
@MadCcc MadCcc merged commit deea6fe into feature Jul 27, 2023
87 checks passed
@MadCcc MadCcc deleted the avatar-group branch July 27, 2023 12:04
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.

None yet

3 participants