-
-
Notifications
You must be signed in to change notification settings - Fork 116
fix(Image): Image mask fade enter blur transition does not work #492
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
Open
zenggpzqbx
wants to merge
4
commits into
react-component:master
Choose a base branch
from
zenggpzqbx:fix_image_preview_ani
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+94
−93
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d3b489a
fix(Image): Image mask fade enter blur transition does not work
zenggpzqbx d98a9ed
fix(Image): Image mask fade enter blur transition does not work
zenggpzqbx 7150f88
fix(Image): Image mask fade enter blur transition does not work
zenggpzqbx 7ef9fcc
fix(Image): Image mask fade enter blur transition does not work
zenggpzqbx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: react-component/image
Length of output: 1595
🏁 Script executed:
# Check the test file context to understand what's being tested head -50 tests/controlled.test.tsxRepository: react-component/image
Length of output: 1358
🏁 Script executed:
Repository: react-component/image
Length of output: 611
🏁 Script executed:
Repository: react-component/image
Length of output: 313
🏁 Script executed:
Repository: react-component/image
Length of output: 47
🏁 Script executed:
Repository: react-component/image
Length of output: 530
🏁 Script executed:
Repository: react-component/image
Length of output: 1281
🏁 Script executed:
Repository: react-component/image
Length of output: 348
🏁 Script executed:
Repository: react-component/image
Length of output: 259
🏁 Script executed:
Repository: react-component/image
Length of output: 1702
🏁 Script executed:
Repository: react-component/image
Length of output: 730
🏁 Script executed:
Repository: react-component/image
Length of output: 676
🏁 Script executed:
Repository: react-component/image
Length of output: 566
🏁 Script executed:
Repository: react-component/image
Length of output: 2687
🏁 Script executed:
Repository: react-component/image
Length of output: 601
🏁 Script executed:
Repository: react-component/image
Length of output: 136
🏁 Script executed:
Repository: react-component/image
Length of output: 47
🏁 Script executed:
Repository: react-component/image
Length of output: 1505
🏁 Script executed:
Repository: react-component/image
Length of output: 47
🏁 Script executed:
Repository: react-component/image
Length of output: 47
🏁 Script executed:
Repository: react-component/image
Length of output: 344
🏁 Script executed:
Repository: react-component/image
Length of output: 285
🏁 Script executed:
Repository: react-component/image
Length of output: 47
🏁 Script executed:
Repository: react-component/image
Length of output: 784
🏁 Script executed:
Repository: react-component/image
Length of output: 655
🏁 Script executed:
# Check if Portal component from @rc-component/portal unmounts when open={false} web_search @rc-component/portal open property behavior unmountRepository: react-component/image
Length of output: 115
🏁 Script executed:
Repository: react-component/image
Length of output: 310
🏁 Script executed:
Repository: react-component/image
Length of output: 47
🏁 Script executed:
Repository: react-component/image
Length of output: 3137
🏁 Script executed:
Repository: react-component/image
Length of output: 421
🏁 Script executed:
Repository: react-component/image
Length of output: 530
🏁 Script executed:
Repository: react-component/image
Length of output: 1132
🏁 Script executed:
Repository: react-component/image
Length of output: 1926
🏁 Script executed:
Repository: react-component/image
Length of output: 47
🏁 Script executed:
Repository: react-component/image
Length of output: 1436
🏁 Script executed:
Repository: react-component/image
Length of output: 1179
🏁 Script executed:
Repository: react-component/image
Length of output: 372
🌐 Web query:
@rc-component/portal open property behavior documentation💡 Result:
Summary — @rc-component/portal "open" prop
Source: package README/API. [1]
补充缺失的清理逻辑以正确卸载 Portal
useLayoutEffect中缺少当open变为false时重置portalRender的逻辑。当前代码只在open为true时设置portalRender = true,但从未重置为false,导致 Portal 及其内容永久保留在 DOM 中。这会在重复打开/关闭预览的场景中造成内存泄漏。应在
useLayoutEffect中添加else分支重置状态,或在onVisibleChanged回调中当nextVisible === false时调用setPortalRender(false)。测试断言从toBeFalsy()改为toBeTruthy()反映的是当前的错误行为,而非预期行为。🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你的这个问题在逻辑上没有错误,我实际测试过,若添加setPortalRender(false),动画会有问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.