You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a gravity prop to <transition-group> to prevent unintuitive "jumping" before -move transitions in lists whose items stack to the right or bottom. The prop would change the point on the ClientRect used to measure how far the item has moved. This is most salient when the child element changes in size.
I'm not opposed to that. I wonder, though, if that might be confused for transform-origin. Perhaps something more specific like position-origin or position-anchor?
Some other ideas:
keep gravity, but use up, down, left and right instead of top, bottom, left, and right to imply motion and not measurement
Or focus on behavior and call it something like stable-point
I would say something along the lines of origin for the prop instead of gravity would make more sense given the possible values
I made a PR for Vue 2 before which added an origin prop for <transition-group> but for a different use case. See vuejs/vue#8424 and vuejs/vue#9430. I saw Evan marked that PR as a todo for v2.7 (it has been a long time so I’m not sure if it’s still the plan). Maybe we need more input for prop names for both use cases.
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.
Summary
Add a
gravityprop to<transition-group>to prevent unintuitive "jumping" before-movetransitions in lists whose items stack to the right or bottom. The prop would change the point on the ClientRect used to measure how far the item has moved. This is most salient when the child element changes in size.Links