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(Menu): remove unexpected re-render, which causes flash and shake when collapsed #15625

Merged
merged 3 commits into from Mar 25, 2019

Conversation

Projects
None yet
2 participants
@zy410419243
Copy link
Contributor

commented Mar 25, 2019

🤔 This is a ...

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

👻 What's the background?

  1. Describe the source of requirement, like related issue link.

    To close #15614

  2. Describe the problem and the scenario.

💡 Solution

  1. How to fix the problem, and list final API implementation and usage sample if that is an new feature.

  2. GIF or snapshot should be provided if includes UI/interactive modification.

📝 Changelog description

Describe changes from userside, and list all potential break changes or other risks.

  1. English description

    Fix Menu unexpected shaking when collapsed.

  2. Chinese description (optional)

    修复 Menu 收缩的异常闪动。

☑️ 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
@netlify

This comment has been minimized.

Copy link

commented Mar 25, 2019

Deploy preview for ant-design ready!

Built with commit 5362d57

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

@codecov

This comment has been minimized.

Copy link

commented Mar 25, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15625      +/-   ##
==========================================
- Coverage   94.44%   94.44%   -0.01%     
==========================================
  Files         250      250              
  Lines        6646     6645       -1     
  Branches     1909     1941      +32     
==========================================
- Hits         6277     6276       -1     
  Misses        368      368              
  Partials        1        1
Impacted Files Coverage Δ
components/menu/index.tsx 91.58% <100%> (+0.16%) ⬆️
components/menu/MenuItem.tsx 77.77% <100%> (-5.56%) ⬇️

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 3dc0316...5362d57. Read the comment docs.

@zy410419243 zy410419243 marked this pull request as ready for review Mar 25, 2019

@afc163 afc163 merged commit 788292c into ant-design:master Mar 25, 2019

27 of 29 checks passed

Header rules No header rules processed
Details
Pages changed 13 new files uploaded
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
CodeFactor No issues found.
Details
LGTM analysis: JavaScript No new or fixed alerts
Details
Mixed content No mixed content detected
Details
Redirect rules 18 redirect rules processed
Details
WIP Ready for review
Details
ant-design.ant-design #ant design succeeded
Details
buildsize No change
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
codebeat no reportable quality changes
Details
codecov/patch 100% of diff hit (target 94.44%)
Details
codecov/project Absolute coverage decreased by -<.01% but relative coverage increased by +5.55% compared to 3dc0316
Details
deploy/netlify Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No manifest changes detected

@zy410419243 zy410419243 deleted the zy410419243:issue-15614 branch Mar 25, 2019


return (
<Tooltip
title={titleNode}
placement="right"
overlayClassName={`${rootPrefixCls}-inline-collapsed-tooltip`}
>
<Item {...rest} title={inlineCollapsed ? null : title} ref={this.saveMenuItem} />
<Item {...rest} title={title} ref={this.saveMenuItem} />

This comment has been minimized.

Copy link
@afc163

afc163 Mar 27, 2019

Member

image

这里造成了非 inlineCollapsed 情况下显示了多余的 Tooltip 问题。

@zy410419243

This comment has been minimized.

Copy link
@zy410419243

zy410419243 Mar 28, 2019

Author Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.