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: Typography warning for ref error #19074

Merged
merged 8 commits into from Oct 1, 2019
Merged

fix: Typography warning for ref error #19074

merged 8 commits into from Oct 1, 2019

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Oct 1, 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

fix #19064
ref #19066

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix Typography warning for ref error.
🇨🇳 Chinese 修复 Typography 提示获取不到 ref 的错误信息。

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

Copy link

@tests-checker tests-checker bot left a comment

Choose a reason for hiding this comment

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

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

@netlify
Copy link

netlify bot commented Oct 1, 2019

Deploy preview for ant-design ready!

Built with commit 637425c

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

@auto-add-label auto-add-label bot added the bug label Oct 1, 2019
@codecov
Copy link

codecov bot commented Oct 1, 2019

Codecov Report

Merging #19074 into master will decrease coverage by 0.05%.
The diff coverage is 82.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19074      +/-   ##
==========================================
- Coverage   97.38%   97.32%   -0.06%     
==========================================
  Files         280      281       +1     
  Lines        7527     7548      +21     
  Branches     2063     2110      +47     
==========================================
+ Hits         7330     7346      +16     
- Misses        196      201       +5     
  Partials        1        1
Impacted Files Coverage Δ
components/typography/Base.tsx 100% <ø> (ø) ⬆️
components/typography/Typography.tsx 80% <80%> (-20%) ⬇️
components/_util/ref.ts 88.88% <88.88%> (ø)

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 3d378f2...637425c. Read the comment docs.


let RefTypography;

if (React.forwardRef) {
Copy link
Member

Choose a reason for hiding this comment

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

一开始我是考虑 forwardRef 有兼容性问题,所以没有这样修,4.0 都不需要这样写,感觉需要个 to-do

Copy link
Member Author

Choose a reason for hiding this comment

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

嗯,这些 4.0 发布后再清理就行了。否则每周 4.0 merge master 都一堆冲突。

@zombieJ
Copy link
Member Author

zombieJ commented Oct 1, 2019

新版 eslint-plugin-react 有 bug:jsx-eslint/eslint-plugin-react#2423
本地降低测试通过,可以合并。

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.

使用Typography.Text组件产生warning
2 participants