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: #23986 [Comment] Should not render avatar wrapper when avatar is… #23994

Merged
merged 2 commits into from May 9, 2020
Merged

Conversation

Xuhao
Copy link
Contributor

@Xuhao Xuhao commented May 9, 2020

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

Closes: #23986

💡 Background and solution

When avatar prop of Comment not present, it will render an empty wrapper div with css class "ant-comment-avatar" which is hold style margin-right: 12px;, so 12px blank space left there to broken the page style.

So, this PR just remove this empty wrapper div as render nothing when avatar not provide.

📝 Changelog

Language Changelog
🇺🇸 English [Comment] render nothing when avatar not present
🇨🇳 Chinese [Comment] 当 avatar 为空时,不再渲染空白的包装div,避免影响页面样式

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • 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

@ant-design-bot
Copy link
Contributor

@ant-design-bot ant-design-bot commented May 9, 2020

@codesandbox-ci
Copy link

@codesandbox-ci codesandbox-ci bot commented May 9, 2020

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 89abc8f:

Sandbox Source
antd reproduction template Configuration

@afc163
Copy link
Member

@afc163 afc163 commented May 9, 2020

这个组件难得有更新。😹

@Xuhao
Copy link
Contributor Author

@Xuhao Xuhao commented May 9, 2020

@afc163 大佬有空review 一下🙇‍♂️

@afc163
Copy link
Member

@afc163 afc163 commented May 9, 2020

npm test -- -u 跑一下,提交。

@codecov
Copy link

@codecov codecov bot commented May 9, 2020

Codecov Report

Merging #23994 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #23994   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files         364      364           
  Lines        7270     7272    +2     
  Branches     2024     2028    +4     
=======================================
+ Hits         7181     7183    +2     
  Misses         89       89           
Impacted Files Coverage Δ
components/comment/index.tsx 96.15% <100.00%> (+0.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee58a34...89abc8f. Read the comment docs.

@afc163 afc163 merged commit 9c0f12c into ant-design:master May 9, 2020
22 checks passed
@ycjcl868 ycjcl868 mentioned this pull request May 11, 2020
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.

3 participants