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: Popover display empty div when title and content is null #42217

Merged
merged 4 commits into from
May 8, 2023
Merged

fix: Popover display empty div when title and content is null #42217

merged 4 commits into from
May 8, 2023

Conversation

hairgc
Copy link
Contributor

@hairgc hairgc commented May 8, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

fix #42216

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English fix: Popover display empty div when title and content is null
🇨🇳 Chinese 修复: 当title和content属性均为空值时,Popover组件展示空白气泡

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • 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

🚀 Summary

🤖 Generated by Copilot at eab7c90

Simplify Popover component logic and rendering. Remove redundant title and content props from OverlayProps and render Overlay only when it has content.

🔍 Walkthrough

🤖 Generated by Copilot at eab7c90

  • Remove unnecessary check for title and content in OverlayProps interface (link)
  • Conditionally render Overlay component in Popover component based on title or content (link)

@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2023

Prepare preview

@hairgc
Copy link
Contributor Author

hairgc commented May 8, 2023

请同步修复下4.x版本

@yoyo837
Copy link
Contributor

yoyo837 commented May 8, 2023

请同步修复下4.x版本

再给4.x-stable分支发PR即可

@codecov
Copy link

codecov bot commented May 8, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (711c9d6) 100.00% compared to head (eab7c90) 100.00%.

❗ Current head eab7c90 differs from pull request most recent head 815959c. Consider uploading reports for the commit 815959c to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #42217   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          617       617           
  Lines        10545     10544    -1     
  Branches      2883      2883           
=========================================
- Hits         10545     10544    -1     
Impacted Files Coverage Δ
components/popover/index.tsx 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@zombieJ
Copy link
Member

zombieJ commented May 8, 2023

加一个 test case~

@li-jia-nan
Copy link
Member

同步一下上游分支

@hairgc
Copy link
Contributor Author

hairgc commented May 8, 2023

加一个 test case~

已加,原测试案例写的有点问题,顺带修复了

@hairgc
Copy link
Contributor Author

hairgc commented May 8, 2023

请同步修复下4.x版本

再给4.x-stable分支发PR即可

等这个review无问题后,我这边再发起一个到4.x的PR

@li-jia-nan li-jia-nan merged commit 4271ff0 into ant-design:master May 8, 2023
50 checks passed
hairgc added a commit to hairgc/ant-design that referenced this pull request May 9, 2023
…sign#42217)

* fix: Popover display empty div when title and content is null

* test: Popover add test

* lint: remove useless block statement

---------

Co-authored-by: MaHui <mahuiyoung@cmbchina.com>
(cherry picked from commit 4271ff0)
afc163 added a commit that referenced this pull request May 10, 2023
* fix: Popover display empty div when title and content is null (#42217)

* fix: Popover display empty div when title and content is null

* test: Popover add test

* lint: remove useless block statement

---------

Co-authored-by: MaHui <mahuiyoung@cmbchina.com>
(cherry picked from commit 4271ff0)

* lint: fix Popover test lint error

* lint: fix Popover test lint error

* improvement: Popover overlay

* lint: fix Popover test lint error

* Update package.json

---------

Co-authored-by: MaHui <mahuiyoung@cmbchina.com>
Co-authored-by: afc163 <afc163@gmail.com>
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.

Popover 组件当content值为空时,弹出空白
6 participants