-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
feat(DropdownMenu): add auto-locate prop #12251
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #12251 +/- ##
==========================================
- Coverage 89.89% 89.88% -0.02%
==========================================
Files 257 257
Lines 6801 6819 +18
Branches 1647 1653 +6
==========================================
+ Hits 6114 6129 +15
- Misses 366 367 +1
- Partials 321 323 +2 ☔ View full report in Codecov by Sentry. |
修正偏移后就可以在 Popup、FloatingPanel 组件或用户自己的包含块组件中使用了。之后这个问题 #12121 也可以通过这种方式解决。 有一个问题,是否需要提供 prop 来由用户决定是否修正偏移呢?因为在正常场景下,不需要进行这一步操作。另外,根据实现逻辑,如果用户在展开下拉菜单后改变了包含块的样式,使得之前的包含块不再是包含块,也会导致定位出现偏差,尽管这种场景比较少见。 |
方便补个测试用例嘛~ |
想了几个名字,你挑挑看
|
938dd59
to
dbe6463
Compare
因为单测不太好写,拖了有点久。考虑后面类似需要调用 getComputedStyle 等 api 的场景,增加 e2e 测试。 |
嗯嗯,目前单测是有一些局限性,e2e 可以作为补充 |
resolve #10661