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: popup shift to left in the first render when set strech property to trigger #420

Closed
wants to merge 1 commit into from

Conversation

bbb169
Copy link
Contributor

@bbb169 bbb169 commented Aug 16, 2023

image
image
the value of inMotion stop the triggerAlign when first set width to popup, need set it to false

fix ant-design/ant-design#44249

@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Merging #420 (7596bf8) into master (3e019ed) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 7596bf8 differs from pull request most recent head 8741b8b. Consider uploading reports for the commit 8741b8b to get more accurate results

@@            Coverage Diff             @@
##           master     #420      +/-   ##
==========================================
+ Coverage   97.06%   97.08%   +0.01%     
==========================================
  Files          13       13              
  Lines         784      788       +4     
  Branches      229      230       +1     
==========================================
+ Hits          761      765       +4     
  Misses         23       23              
Files Changed Coverage Δ
src/index.tsx 95.38% <100.00%> (+0.09%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

src/index.tsx Outdated Show resolved Hide resolved
@zombieJ
Copy link
Member

zombieJ commented Aug 21, 2023

这边最好看看 useEffect 做 mount 的时候能否延迟 setMotion,这个 resize 不触发 motion 是故意的。

@bbb169 bbb169 force-pushed the fixShiftWhenStrech branch from 2c4b5c7 to 8741b8b Compare August 21, 2023 09:45
@bbb169
Copy link
Contributor Author

bbb169 commented Aug 21, 2023

这边最好看看 useEffect 做 mount 的时候能否延迟 setMotion,这个 resize 不触发 motion 是故意的。

这边最好看看 useEffect 做 mount 的时候能否延迟 setMotion,这个 resize 不触发 motion 是故意的。

已改

@@ -345,6 +345,13 @@ export function generateTrigger(
useLayoutEffect(
(firstMount) => {
if (!firstMount || mergedOpen) {
if (stretch) {
// delay setting makes it calculate
setTimeout(() => {
Copy link
Member

Choose a reason for hiding this comment

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

避免 setTimeout,另外还是没有 test case 👻

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hello,这个测试用例要用来测试这个bug是否出现吗,还是另外的作用呢

Copy link
Member

Choose a reason for hiding this comment

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

测试是否修复 bug

Copy link
Member

@zombieJ zombieJ Aug 23, 2023

Choose a reason for hiding this comment

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

另外,这个修复不稳定:
Kapture 2023-08-23 at 09 50 11

Copy link
Contributor Author

Choose a reason for hiding this comment

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

另外,这个修复不稳定: Kapture 2023-08-23 at 09 50 11

对的,我改了一下,在写测试用例

Copy link
Member

Choose a reason for hiding this comment

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

这边有个时序在 CSSMotion 里已经做过了,加个 钉钉 群不~~

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的,怎么加?

Copy link
Member

Choose a reason for hiding this comment

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

加这个群,然后我加你好友拉进 v5 群~

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.

Dropdown组件在第一次加载时出现左移BUG
2 participants