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: 😢 Fix Tree showLine and showIcon missing icon #20196

Merged
merged 2 commits into from Dec 12, 2019

Conversation

@afc163
Copy link
Member

afc163 commented Dec 11, 2019

🤔 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

close #20192

💡 Background and solution

Caused by #20102

image

fixed back to

image

We should use switcherIcon instead of icon to customize icon in Tree showLine mode.

📝 Changelog

Language Changelog
🇺🇸 English Fix Tree showLine and showIcon missing icon.
🇨🇳 Chinese 修复 Tree showLine 和 showIcon 同时开启时 [+] [-] 图标丢失的问题。

☑️ Self Check before Merge

  • 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

View rendered components/tree/demo/line.md

@afc163 afc163 requested a review from zombieJ as a code owner Dec 11, 2019
@auto-add-label auto-add-label bot added the bug label Dec 11, 2019
@pr-triage pr-triage bot added the PR: unreviewed label Dec 11, 2019
Copy link

tests-checker bot left a comment

Could you please add tests to make sure this change works as expected?

@netlify

This comment has been minimized.

Copy link

netlify bot commented Dec 11, 2019

Deploy preview for ant-design ready!

Built with commit 20f0749

https://deploy-preview-20196--ant-design.netlify.com

@@ -37,7 +37,7 @@ class Demo extends React.Component {
</TreeNode>
<TreeNode title="parent 1-2" key="0-0-2">
<TreeNode title="leaf" key="0-0-2-0" />
<TreeNode icon={<Icon type="form" />} title="leaf" key="0-0-2-1" />
<TreeNode switcherIcon={<Icon type="form" />} title="leaf" key="0-0-2-1" />

This comment has been minimized.

Copy link
@afc163

afc163 Dec 11, 2019

Author Member

不应该用 icon 去设置 switcherIcon:#20090

@codesandbox

This comment has been minimized.

Copy link

codesandbox bot commented Dec 11, 2019

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 20f0749:

Sandbox Source
antd reproduction template Configuration
@codecov

This comment has been minimized.

Copy link

codecov bot commented Dec 11, 2019

Codecov Report

Merging #20196 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #20196      +/-   ##
==========================================
- Coverage   97.81%   97.81%   -0.01%     
==========================================
  Files         286      286              
  Lines        7739     7735       -4     
  Branches     2132     2164      +32     
==========================================
- Hits         7570     7566       -4     
  Misses        169      169
Impacted Files Coverage Δ
components/tree/Tree.tsx 96.66% <100%> (-0.4%) ⬇️

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 f459ae9...20f0749. Read the comment docs.

@afc163 afc163 changed the title fix: 🐛 Fix Tree showLine and showIcon missing icon fix: 😢 Fix Tree showLine and showIcon missing icon Dec 11, 2019
@@ -37,7 +37,7 @@ class Demo extends React.Component {
</TreeNode>
<TreeNode title="parent 1-2" key="0-0-2">
<TreeNode title="leaf" key="0-0-2-0" />
<TreeNode icon={<Icon type="form" />} title="leaf" key="0-0-2-1" />
<TreeNode switcherIcon={<Icon type="form" />} title="leaf" key="0-0-2-1" />

This comment has been minimized.

Copy link
@zombieJ

zombieJ Dec 11, 2019

Member

也保留一个 icon 的例子

This comment has been minimized.

Copy link
@afc163

afc163 Dec 11, 2019

Author Member

image

加了个完整一点的例子。

@afc163 afc163 force-pushed the fix-tree-show-line-icon branch from 97636c3 to 20f0749 Dec 12, 2019
@afc163 afc163 merged commit b02d80d into master Dec 12, 2019
35 checks passed
35 checks passed
lighthouse
Details
setup
Details
compile
Details
dist
Details
lint
Details
node
Details
lib
Details
es
Details
Header rules - ant-design No header rules processed
Details
Pages changed - ant-design 218 new files uploaded
Details
Mixed content - ant-design No mixed content detected
Details
Redirect rules - ant-design 18 redirect rules processed
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
bundlesize Total bundle size is 586.99KB/600KB (-null)
Details
ci/circleci: check_metadata Your tests passed on CircleCI!
Details
ci/circleci: compile Your tests passed on CircleCI!
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_es Your tests passed on CircleCI!
Details
ci/circleci: test_es_15 Your tests passed on CircleCI!
Details
ci/circleci: test_lib Your tests passed on CircleCI!
Details
ci/circleci: test_lib_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
ci/codesandbox Building packages succeeded.
Details
codecov/patch 100% of diff hit (target 97.81%)
Details
codecov/project Absolute coverage decreased by -<.01% but relative coverage increased by +2.18% compared to f459ae9
Details
netlify/ant-design/deploy-preview Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No new issues
Details
@afc163 afc163 deleted the fix-tree-show-line-icon branch Dec 12, 2019
@pr-triage pr-triage bot added PR: merged and removed PR: unreviewed labels Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.