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: Use visible first #42394

Merged
merged 1 commit into from
May 16, 2023
Merged

fix: Use visible first #42394

merged 1 commit into from
May 16, 2023

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented May 16, 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 #42392

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Adjust Tooltip & Popover display logic. Now the first priority is to ensure that it will not be clipped by overflow: hidden, and the second is to ensure that it is displayed within the viewport as much as possible.
🇨🇳 Chinese 调整 Tooltip 和 Popover 展示逻辑,现在会优先保证不会被 overflow: hidden 裁剪,其次保证尽可能在可见屏幕范围内展示。

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

Added a visibleFirst feature to the tooltip and popover components, which makes them show the first possible placement when the preferred one is not available. Updated the @rc-component/trigger dependency to support this feature.

🔍 Walkthrough

🤖 Generated by Copilot at 7d21be3

  • Add visibleFirst property to PlacementsConfig interface and getPlacements function to control tooltip or popover placement when overflow occurs (link, link, link)
  • Enable visibleFirst feature for Tooltip component by setting it to true (link)
  • Update @rc-component/trigger dependency version to ^1.13.0 to use the new feature of visibleFirst in rc-trigger component (link)

@github-actions
Copy link
Contributor

github-actions bot commented May 16, 2023

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
./dist/antd.min.js 384.3 KB (+27 B 🔺)
./dist/antd-with-locales.min.js 443.54 KB (+23 B 🔺)

@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (75e4099) 99.99% compared to head (7d21be3) 99.99%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #42394   +/-   ##
=======================================
  Coverage   99.99%   99.99%           
=======================================
  Files         640      640           
  Lines       10838    10840    +2     
  Branches     2944     2945    +1     
=======================================
+ Hits        10837    10839    +2     
  Misses          1        1           
Impacted Files Coverage Δ
components/tooltip/index.tsx 100.00% <ø> (ø)
components/_util/placements.ts 100.00% <100.00%> (ø)

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

@zombieJ zombieJ merged commit 49549ae into master May 16, 2023
112 checks passed
@zombieJ zombieJ deleted the visibleFirst branch May 16, 2023 07:19
@MadCcc MadCcc mentioned this pull request May 22, 2023
20 tasks
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 visible area check logic
2 participants