Skip to content

Conversation

@dardalan
Copy link
Member

@dardalan dardalan commented Aug 11, 2021

This is already opened pr on this Issue cibernox#623

Hopefully Fixes cibernox#615 🤞
but i am not sure we should make any changes on this code (https://github.com/cibernox/ember-basic-dropdown/pull/623/files#diff-5eb8bde405ea618cba05ea05b9898dc60ff96ac459a953c279fbb24f39a46f81L128-L132), cause on production code it works good, the only problem with tests, so i made a workaround for testing purpose. Any idea how to fix this issue better, very welcome.

The transitioning--in etc classes don't get reset after the first render. When the dropdown content first renders, it animates correctly, but on subsequent renders there is no animation - cause state not being reset to correct value.

Looks like it was broken here in this commit, so idea to revert back and cover with tests:
cibernox@1819c01#diff-73297f8c71645544a2a6826e5c3146aff7cb2333d9c17fe968258e5f14dc4a79R164

@dardalan dardalan force-pushed the fix/transition-animation branch from 2f3c4a7 to 65fa846 Compare August 13, 2021 15:06
parentElement = parentElement.parentElement
parentElement = parentElement.parentElement;

if (isTesting() && parentElement === null) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure exactly why but will-destroy modifier (https://github.com/cibernox/ember-basic-dropdown/blob/master/addon/templates/components/basic-dropdown-content.hbs#L30) is getting called in the template after the parent node has been removed from the DOM. Looks like it's only related to Test env.
Related Issues:
emberjs/ember.js#18795

@dardalan dardalan changed the title Fix Transition animation doesn't reset after closing/reopening Fixed state not being reset to correct value when transitioning out Aug 19, 2021
@dardalan dardalan closed this Aug 19, 2021
@dardalan dardalan reopened this Aug 23, 2021
@dardalan dardalan force-pushed the fix/transition-animation branch from 1434264 to db1268b Compare August 23, 2021 14:30
@krasnoukhov
Copy link
Member

Looks like this is still failing...

@dardalan dardalan force-pushed the fix/transition-animation branch 4 times, most recently from e8c5f37 to 06c3828 Compare August 26, 2021 13:05
@dardalan dardalan force-pushed the fix/transition-animation branch from 06c3828 to fa746c5 Compare August 26, 2021 14:56
@krasnoukhov krasnoukhov merged commit 7bd5da5 into master Aug 26, 2021
@krasnoukhov krasnoukhov deleted the fix/transition-animation branch August 26, 2021 15:27
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.

Transition animation doesn't reset after closing/reopening

5 participants