- Issue created by @mherchel
- @mherchel opened merge request.
- πΊπΈUnited States mherchel Gainesville, FL, US
This is ready for review:
A bunch of notes:
- The original author was using GSAP only to manage the stickiness of the schedule filters. This is way overkill.
- I refactored the GSAP out, and replaced it with Intersection Observer, which is a native API. My guess is this wasn't widely available when this JS was written.
- Removing the GSAP saves 100k of JS
- Functionality should be the same, but without the weird bug in the video above.
Will add testing instructions to the IS.
- πͺπΈSpain fjgarlin
The changes look good to me. I'm testing this locally.
-
fjgarlin β
committed ff2ca77f on 1.0.x authored by
mherchel β
Issue #3536333 by mherchel, fjgarlin: Schedule's days/filter toolbar is...
-
fjgarlin β
committed ff2ca77f on 1.0.x authored by
mherchel β
- πͺπΈSpain fjgarlin
fjgarlin β changed the visibility of the branch 1.0.x to hidden.
- πͺπΈSpain fjgarlin
See what happens with the filters when the height of the screen is small.
WARNING, contains flashing images: https://www.drupal.org/files/issues/2025-07-17/Screen%20Recording%202025... β
I merged the previous MR, but I won't deploy it yet, so you can just work on a new branch only for the fixes.
- πΊπΈUnited States mherchel Gainesville, FL, US
Whoa! Good catch. Should be easily resolvable. Will look in a bit. :)
- πΊπΈUnited States mherchel Gainesville, FL, US
mherchel β changed the visibility of the branch 3536333-schedules-daysfilter-toolbar to hidden.
- @mherchel opened merge request.
- πΊπΈUnited States mherchel Gainesville, FL, US
Fixed!
The cause was that Intersection Observer was looking to see if the navbar (which includes the filters) was intersecting the viewport, and if so, stickying it. This cause the navbar to not intersect, which leads to an infinite loop and flickering.
For short viewports, the navbar was intersecting the bottom of the viewport, which I did not take into account.
To fix, I passed in an option to extend the bottom intersection point by 10000px, which is an arbitrary large number that will never be reached.
-
fjgarlin β
committed 154acead on 1.0.x authored by
mherchel β
Issue #3536333 by mherchel, fjgarlin: Schedule's days/filter toolbar is...
-
fjgarlin β
committed 154acead on 1.0.x authored by
mherchel β
- πͺπΈSpain fjgarlin
Merged. I've gone through all the testing above locally, where I could reproduce the initial issue, and it is now fixed and there is no flickering.
Thanks!
-
fjgarlin β
committed 154acead on icon-background authored by
mherchel β
Issue #3536333 by mherchel, fjgarlin: Schedule's days/filter toolbar is...
-
fjgarlin β
committed 154acead on icon-background authored by
mherchel β