sudara / alonetone

A free, open source, non-commercial home for musicians and their music
https://alonetone.com
MIT License
349 stars 89 forks source link

Gsap animation redux #1108

Closed sudara closed 3 years ago

sudara commented 3 years ago

Continues #1107 Fixes #1105

This fixes various issues on CI related to javascript, capybara and percy:

Doesn't handle:

# SEVERE 2021-02-24 17:55:00 +0100: https://cdn.alonetone.com/fonts/Alright-v2-Normal-Bold-latin1-tnum.woff2 - Failed to load resource: net::ERR_FAILED
sudara commented 3 years ago

@ofsound This test you did (that I just repeated) of setting this.detailsTarget.style.marginTop = 0; was a good idea.

We know js is working, as we see the open class get added.

However, we get the same result (track doesn't open) whether using gsap or raw js, chrome or FF.

I will try another test to double check gsap is happy.

sudara commented 3 years ago

To be clear: it failed to open the track chunk in CI, succeeded locally. It's possible there's a problem with offsetHeight there?

However, the reason the specs are failing is because every track chunk is always technically visible (css-wise). The specs rely on waiting for elements to become visible to "prove" that actions have occurred. So we'll need to maintain what is happening on master, which is that that the detailsTarget (reveal) is being toggled between display none and display block.

sudara commented 3 years ago

Hmm, guess i was wrong that the tests are failing because things weren't hidden. Maybe they are failing because the offset height isn't present on CI somehow?

sudara commented 3 years ago

Wow, even with a hardcoded margin, it seems to be failing. I'm at a loss again....

sudara commented 3 years ago

@ofsound All done. 😭 Thanks for all the help debugging! 🥇