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: use flex to correct avatar child position #47236

Merged
merged 10 commits into from Jan 31, 2024

Conversation

lcgash
Copy link
Contributor

@lcgash lcgash commented Jan 30, 2024

[English Template / 英文模板]

🤔 这个变动的性质是?

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 演示代码改进
  • [ ✔️] 组件样式/交互改进
  • TypeScript 定义更新
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 工作流程
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

fix: #47232

💡 需求背景和解决方案

image

📝 更新日志

修复高度过小时,avatar 组件内容因为 border 存在无法居中的问题

语言 更新描述
🇺🇸 英文 Fix the problem that the content of the avatar component is not centered when the height is less than 16px
🇨🇳 中文 修复 avatar 组件当高度小于 16px 内容不居中的问题

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • [ ✔️] 文档已补充或无须补充
  • [✔️ ] 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

Copy link

stackblitz bot commented Jan 30, 2024

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

Copy link
Contributor

github-actions bot commented Jan 30, 2024

Preview Is ready

Copy link
Contributor

github-actions bot commented Jan 30, 2024

Visual Regression Report for PR #47236 Failed ❌

Target branch: master (ebd4c15)
View Full Report


image name expected actual diff
avatar-badge.compact.png master: ebd4c15cdf5a6a60b0a2516b653698c285d81a24 current: pr-47236 diff
avatar-badge.compact.css-var.png master: ebd4c15cdf5a6a60b0a2516b653698c285d81a24 current: pr-47236 diff
avatar-badge.dark.png master: ebd4c15cdf5a6a60b0a2516b653698c285d81a24 current: pr-47236 diff
avatar-badge.dark.css-var.png master: ebd4c15cdf5a6a60b0a2516b653698c285d81a24 current: pr-47236 diff
avatar-badge.default.png master: ebd4c15cdf5a6a60b0a2516b653698c285d81a24 current: pr-47236 diff
avatar-badge.default.css-var.png master: ebd4c15cdf5a6a60b0a2516b653698c285d81a24 current: pr-47236 diff
avatar-basic.compact.png master: ebd4c15cdf5a6a60b0a2516b653698c285d81a24 current: pr-47236 diff
avatar-basic.compact.css-var.png master: ebd4c15cdf5a6a60b0a2516b653698c285d81a24 current: pr-47236 diff
avatar-basic.dark.png master: ebd4c15cdf5a6a60b0a2516b653698c285d81a24 current: pr-47236 diff
avatar-basic.dark.css-var.png master: ebd4c15cdf5a6a60b0a2516b653698c285d81a24 current: pr-47236 diff

Check Full Report for details

Copy link

codesandbox-ci bot commented Jan 30, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ef3c1b8:

Sandbox Source
antd reproduction template (forked) Configuration

@lcgash lcgash changed the title fix: remove avatar border when height less then 16 fix: use flex to correct avatar child position Jan 31, 2024
lcgash and others added 3 commits January 31, 2024 14:26
Co-authored-by: afc163 <afc163@gmail.com>
Signed-off-by: mr-chenguang <37072324+lcgash@users.noreply.github.com>
@MadCcc
Copy link
Member

MadCcc commented Jan 31, 2024

测试再看一下,snapshot 需要更新,效果看起来没什么问题

@lcgash
Copy link
Contributor Author

lcgash commented Jan 31, 2024

测试再看一下,snapshot 需要更新,效果看起来没什么问题
snapshot 已经更新了,测试看起来没啥问题

@afc163
Copy link
Member

afc163 commented Jan 31, 2024

snapshot 测试还是挂的。

@lcgash
Copy link
Contributor Author

lcgash commented Jan 31, 2024

snapshot 测试还是挂的。

抱歉,没看见那个

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (441ba5f) 100.00% compared to head (ef3c1b8) 100.00%.
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #47236   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          732       732           
  Lines        12566     12563    -3     
  Branches      3298      3296    -2     
=========================================
- Hits         12566     12563    -3     

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

@MadCcc MadCcc merged commit f1f4788 into ant-design:master Jan 31, 2024
61 of 62 checks passed
Copy link
Contributor

🎉 Thank you for your contribution! If you have not yet joined our DingTalk community group, please feel free to join us (when joining, please provide the link to this PR).

🎉 感谢您的贡献!如果您还没有加入钉钉社区群,请扫描下方二维码加入我们(加群时请提供此 PR 链接)。

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.

avatar 组件在 size 较小时内容文字不居中
5 participants