-
-
Notifications
You must be signed in to change notification settings - Fork 9k
fix(transition): optimize prop handling in VaporTransition using Proxy #14225
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
base: minor
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/compiler-vapor
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/runtime-vapor
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
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.
Pull request overview
This PR optimizes prop handling in VaporTransition components by using a Proxy pattern to maintain stable prop references while allowing reactive updates. This eliminates the need for complex prop update logic and simplifies the codebase.
Key Changes:
- Implemented Proxy-based prop forwarding in VaporTransition and VaporTransitionGroup to keep prop references stable while allowing reactive updates
- Refactored
findTransitionBlockto use a callback pattern for collecting fragments instead of a boolean flag - Made
MoveTypea public API export and properly applied it in KeepAlive's deactivation flow
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/runtime-vapor/src/components/Transition.ts | Replaced complex isMounted tracking with Proxy pattern for props; refactored findTransitionBlock with callback pattern |
| packages/runtime-vapor/src/components/TransitionGroup.ts | Added Proxy for stable cssTransitionProps reference with reactive updates via renderEffect |
| packages/runtime-vapor/src/components/KeepAlive.ts | Added MoveType import and used MoveType.LEAVE in deactivate function |
| packages/runtime-vapor/src/block.ts | Added moveType parameter to insert function to distinguish between ENTER and LEAVE transitions |
| packages/runtime-core/src/index.ts | Changed MoveType from internal to public export |
| packages/runtime-vapor/tests/hmr.spec.ts | Added onLeave callback and async wait to properly test transition behavior in KeepAlive |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ent that should be cached
No description provided.