Skip to content

<transition> API changes #105

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

Merged
merged 3 commits into from
Jan 6, 2020
Merged

<transition> API changes #105

merged 3 commits into from
Jan 6, 2020

Conversation

yyx990803
Copy link
Member

@yyx990803 yyx990803 commented Nov 29, 2019

  • Transition class name adjustments [Rendered]

    • Rename the v-enter transition class to v-enter-from
    • Rename the v-leave transition class to v-leave-from
  • Using <transition> as component's root will no longer trigger transitions when the component is toggled from the outside. [Rendered]

@yyx990803 yyx990803 changed the title transition changes <transition> API changes Nov 29, 2019
@yyx990803 yyx990803 added 3.x This RFC only targets 3.0 and above breaking change This RFC contains breaking changes or deprecations of old API. core labels Nov 29, 2019
@CyberAP
Copy link
Contributor

CyberAP commented Dec 3, 2019

What would be the best way to refactor such code regarding we can no longer use v-if?

<TransitionExpand v-if="user">
  <UserInfo :user="user" />
</TransitionExpand>

user is a required prop and <UserInfo> component is not valid until it receives user.

If we refactor it like this we would get an error:

<TransitionExpand :visible="Boolean(user)">
  <UserInfo :user="user" /> <!-- UserInfo is rendered despite not being visible -->
</TransitionExpand>

Should we write v-if for slot contents as well now? Would that trigger a transition?

<TransitionExpand :visible="Boolean(user)">
  <UserInfo v-if="user" :user="user" />
</TransitionExpand>

@robertmoura
Copy link

You'd probably just do it the normal way:

<TransitionExpand>
    <UserInfo :user="user" v-if="user" />
</TransitionExpand>

@yyx990803
Copy link
Member Author

This RFC is now in final comments stage. An RFC in final comments stage means that:

The core team has reviewed the feedback and reached consensus about the general direction of the RFC and believe that this RFC is a worthwhile addition to the framework.
Final comments stage does not mean the RFC's design details are final - we may still tweak the details as we implement it and discover new technical insights or constraints. It may even be further adjusted based on user feedback after it lands in an alpha/beta release.
If no major objections with solid supporting arguments have been presented after a week, the RFC will be merged and become an active RFC.

@yyx990803 yyx990803 added the final comments This RFC is in final comments period label Dec 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x This RFC only targets 3.0 and above breaking change This RFC contains breaking changes or deprecations of old API. core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants