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

Fix: AnimateCSS merge hide() and show() animated css class when we do multiple call #3200

Merged
merged 8 commits into from
Sep 19, 2023

Conversation

bugsounet
Copy link
Contributor

@bugsounet bugsounet commented Sep 17, 2023

PR: #3113

I see this bugs:

AnimateCSS merge hide() and show() animated css class when we do multiple call
--> result it will stay en hide state

I think event listener (is animateCSS file) is not a proper solution

I correct it with like traditional code with timer

Fix too: AnimateIn on first start

… multiple call

* rewrite animateCSS fonctionality
* don't use promise and use timer (like default)
* use addAnimateCSS / removeAnimateCSS
* use hasAnimateIn / hasAnimateOut for set actual animation (internal
using)
* check if animation is used (hasAnimateXXX) and reset it if needed
before display new animation
@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2023

Codecov Report

Merging #3200 (954045b) into develop (fa7c7fc) will increase coverage by 0.00%.
Report is 3 commits behind head on develop.
The diff coverage is 0.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@           Coverage Diff            @@
##           develop    #3200   +/-   ##
========================================
  Coverage    25.28%   25.29%           
========================================
  Files           54       54           
  Lines        11892    11927   +35     
========================================
+ Hits          3007     3017   +10     
- Misses        8885     8910   +25     
Files Changed Coverage Δ
js/animateCSS.js 0.00% <0.00%> (ø)
js/electron.js 0.00% <0.00%> (ø)
js/main.js 0.00% <0.00%> (ø)
js/module.js 67.97% <0.00%> (-0.27%) ⬇️
modules/default/clock/clock.js 0.00% <0.00%> (ø)
modules/default/weather/weather.js 0.00% <0.00%> (ø)

... and 2 files with indirect coverage changes

@bugsounet
Copy link
Contributor Author

bugsounet commented Sep 17, 2023

seriously i have this in local:

Test Suites: 39 passed, 39 total
Tests:       565 passed, 565 total
Snapshots:   9 passed, 9 total
$ node -v
v20.5.1

maybe new e2e: modules_position_spec rules is :
image

I'm joking, but it's still weird
Sometimes it works, sometimes it doesn't

@rejas
Copy link
Collaborator

rejas commented Sep 17, 2023

Sometimes it works, sometimes it doesn't

yes, the tests are flaky, as was said 100 times.... What would I give if someone would find the reason for this....

@bugsounet bugsounet marked this pull request as draft September 17, 2023 09:47
@bugsounet bugsounet marked this pull request as ready for review September 17, 2023 11:49
@bugsounet
Copy link
Contributor Author

Tested with a special module (for remote using) with hide() show() function:

  • passed: force random hide/show timer 1000ms (visual testing with log following duration 10min)
  • passed: animateIn/animateOut defined in module config
  • passed: with hiddenOnStartup feature
  • passed: animation on first start (animateIn defined in module config)
  • passed: hide() and show() animateCSS options
  • passed updateDom() with animate option
  • passed: default MagicMirror animation (if animation defined)

It's ok for me ;)

@bugsounet
Copy link
Contributor Author

@rejas:

We are pushing this for v2.25

I plan to simplify the code for v2.26

Is it ok for you?

@rejas
Copy link
Collaborator

rejas commented Sep 17, 2023

@rejas:

We are pushing this for v2.25

I plan to simplify the code for v2.26

Is it ok for you?

Ok with me as long as the config API doesnt change

@bugsounet
Copy link
Contributor Author

Don't worry about this.
It will not change config API

It's difficult to have what we want, so I will not change ;)

@rejas
Copy link
Collaborator

rejas commented Sep 17, 2023

Don't worry about this. It will not change config API

It's difficult to have what we want, so I will not change ;)

so this PR is ready to merge in your opinion?

@bugsounet
Copy link
Contributor Author

Let me test until Wednesday.

I will be able to test it at home in depth on my MM² Prod (with rpi)
I'm going to put it everywhere to see the behavior !

(reality always takes precedence over a test with many modules rather than with one or two)
(especially when it's complex)

I will come back to you, once this is done

@khassel
Copy link
Collaborator

khassel commented Sep 17, 2023

What would I give if someone would find the reason for this....

me too, but it is very hard to solve a timing issue which is 99% not reproducable locally

@bugsounet
Copy link
Contributor Author

I think it's +/- related to node v20 version used by github (maybe buggy version)

Actually we don't have "any" problem with node v18 test suite

We have faculty to choose another node v20 version ?
maybe display node version used for test suite can help ?

honestly, I never see how it works.
I should look, it might help.
although you manage it very well, sometimes an extra eye can help ;)

@khassel
Copy link
Collaborator

khassel commented Sep 17, 2023

the e2e tests are also (sometimes) failing in my docker tests ... (more often with v20 but also sometimes with v18)

for me it looks like a previous test has sometimes not finished when next test is starting

feel free to look inside the e2e tests ...

@bugsounet
Copy link
Contributor Author

bugsounet commented Sep 17, 2023

Off topic

@rejas I think to that: It's not possible to save current config.js file and restore it after suite test done. (if needed)

Why ? I just lost my test config (this is the last configuration of the test suite that has taken place) and I forget to make a bak

This should be planned for v2.26, right?

@bugsounet
Copy link
Contributor Author

bugsounet commented Sep 19, 2023

@rejas:

Tested in my prod (since Sunday evening 10 p.m.) mirror without "animation collision"

It's ok for me, you can merge

Note: I have resolved conflit in ChangeLog

@rejas rejas merged commit 4eccce3 into MagicMirrorOrg:develop Sep 19, 2023
@bugsounet bugsounet deleted the animateCSS branch September 26, 2023 17:06
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.

4 participants