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

refactor(staggered-fade-and-slide): use Vue native staggered transition #1578

Merged
merged 11 commits into from
Aug 19, 2024

Conversation

victorcg88
Copy link
Contributor

@victorcg88 victorcg88 commented Jul 29, 2024

Motivation and context

Refactor the StaggeredFadeAndSlide component to use the native Vue3 TransitionGroup component instead of our custom StaggeringTransitionGroup

  • Dependencies. If any, specify:
  • Open issue. If applicable, link: EMP-4314

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that causes existing functionality to not work as expected)
  • Change requires a documentation update

What is the destination branch of this PR?

How has this been tested?

Tests performed according to testing guidelines:

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review on my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@victorcg88 victorcg88 changed the title feat(x-installer): update to vue3 and adapt x-installer (#1572) refactor(staggered-fade-and-slide): use Vue native staggered transition Jul 29, 2024
@victorcg88 victorcg88 force-pushed the refactor/native-staggered-fade-and-slide branch from bba940d to 1628cf6 Compare July 29, 2024 14:42
@victorcg88 victorcg88 marked this pull request as ready for review July 29, 2024 14:45
@victorcg88 victorcg88 requested a review from a team as a code owner July 29, 2024 14:45
@victorcg88 victorcg88 force-pushed the refactor/native-staggered-fade-and-slide branch 2 times, most recently from 2af30e6 to efc42f5 Compare August 5, 2024 14:16
@victorcg88 victorcg88 force-pushed the refactor/native-staggered-fade-and-slide branch from 30adf70 to bfc4ed5 Compare August 6, 2024 14:13
@victorcg88 victorcg88 force-pushed the refactor/native-staggered-fade-and-slide branch from ffbdb1e to ef9d1ce Compare August 15, 2024 10:30
Copy link
Contributor

@diegopf diegopf left a comment

Choose a reason for hiding this comment

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

I love the new implementation, looks so clean! The performance boost is also really nice. I've been testing and I don't see a major issue

Comment on lines +3 to +4
@enter="onEnter"
@afterEnter="onAfterEnter"
Copy link
Contributor

Choose a reason for hiding this comment

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

I see webstorm complaining about the event handler types. I think there's no other way but to type the argument as Element and then do a type assertion for HTMElement. https://vuejs.org/guide/typescript/composition-api#typing-event-handlers

/**
* The name of the animation.
* Finds the index of the element in the parent children subset of new elements entering the DOM.
* This is achived by filtering out the elements that are already animated,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* This is achived by filtering out the elements that are already animated,
* This is achieved by filtering out the elements that are already animated,

setup: function () {
setup(props) {
/** The duration of the transition in ms. */
const transitionDuration = 250;
Copy link
Contributor

Choose a reason for hiding this comment

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

would make sense to configure this via prop? 🤔 We would use v-bind in the scss to have the same value

@diegopf diegopf merged commit 79e136f into vue3-update-rc Aug 19, 2024
0 of 2 checks passed
@diegopf diegopf deleted the refactor/native-staggered-fade-and-slide branch August 19, 2024 12:54
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.

3 participants