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 order of operations for tooltipPlacement #22772

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

phoenixeliot
Copy link
Contributor

🤔 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

No issue was created.

💡 Background and solution

tooltipPlacement was broken by a6c207d.
The grouping of this term was getting parsed as (tooltipPlacement || vertical) ? 'right' : 'top', which was incorrect.

📝 Changelog

Language Changelog
🇺🇸 English Slider.tooltipPlacement option API is changed to be correct again
🇨🇳 Chinese

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

tooltipPlacement was broken by ant-design@a6c207d.
The grouping of this term was getting parsed as `(tooltipPlacement || vertical) ? 'right' : 'top'`, which was incorrect.
@phoenixeliot
Copy link
Contributor Author

One test fails, but I believe it was failing before my change.

@yoyo837 yoyo837 changed the title Fix order of operations for tooltipPlacement fix: Fix order of operations for tooltipPlacement Mar 31, 2020
@ant-design-bot
Copy link
Contributor

ant-design-bot commented Mar 31, 2020

@yoyo837
Copy link
Contributor

yoyo837 commented Mar 31, 2020

@wendellhu95

Copy link

@wzhudev wzhudev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@codesandbox-ci
Copy link

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 a392930:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented Mar 31, 2020

Codecov Report

Merging #22772 into master will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #22772   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files         361      361           
  Lines        7212     7212           
  Branches     1971     1934   -37     
=======================================
  Hits         7088     7088           
  Misses        124      124           
Impacted Files Coverage Δ
components/slider/index.tsx 100.00% <100.00%> (ø)

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 cefb7b2...a392930. Read the comment docs.

@yoyo837 yoyo837 merged commit ebdf911 into ant-design:master Mar 31, 2020
@phoenixeliot phoenixeliot deleted the patch-1 branch March 31, 2020 20:49
@phoenixeliot
Copy link
Contributor Author

Wow, nice turnaround time.

This could probably use a regression test, but I wasn't familiar enough with the testing library to want to figure it out for this. Up to y'all whether to add one.

@yoyo837
Copy link
Contributor

yoyo837 commented Apr 1, 2020

@wendellhu95 Could you add a test case about tooltipPlacement?

@wzhudev
Copy link

wzhudev commented Apr 1, 2020

@wendellhu95 Could you add a test case about tooltipPlacement?

OK. I will do that.

@ycjcl868 ycjcl868 mentioned this pull request Apr 3, 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.

5 participants