ubc-web-services / galactus

A Drupal version of the UBC CLF theme
MIT License
6 stars 5 forks source link

Made the toggling of sticky class relative to unit after discovering … #58

Closed darkodevubc closed 1 year ago

darkodevubc commented 3 years ago

…that Views pagination can pin the sticknav to the top under certain conditions.

Steps to reproduce the sticky misbehaviour I was seeing:

Fresh D9 Composer require Galactus Install CLF child manually and enable sticky nav Generate some content Create a Views page (paginated, Ajax-enabled, an exposed filter of any kind, enough content in the Global header that you need to scroll down to the filter) Visit the Views page Scroll down to filter (nav is sticky) Click Apply on the filter Scroll to top of page (nav is still in sticky state)

As admin, the result is that the sticky nav is under the admin_toolbar so it looks like it’s gone. As anon, it’s stuck at the top.

Same behaviour when you scroll down and click the pager.

joelpittet commented 1 year ago

@darkodevubc Sorry for the delay, does the patch fix the problem? Introduce any edge cases? I assume you have this working in production with no complaints.

darkodevubc commented 1 year ago

I just tested this again locally and it appears that the symptom still exists in Galactus and that this patch fixes it locally. I am using this in production on postdocs.ubc.ca with no other ill effects that I have noticed.

Before screenshot (sticky gets stuck at top of window after ajax filter or pagination):

Screenshot 2023-08-29 at 12 18 01 PM

After screenshot (sticky is not stuck at the top of window after ajax filter or pagination):

Screenshot 2023-08-29 at 12 19 49 PM

darkodevubc commented 1 year ago

Would be great if either Joel or James could run through the steps to see if you can reproduce the symptom and whether the patch fixes it for you.

joelpittet commented 1 year ago

I'll do that, hopefully today

joelpittet commented 1 year ago

Thanks Darko for retesting it

occupant commented 1 year ago

@darkodevubc I'll give this a runthrough and see - sorry about the delay!

occupant commented 1 year ago

I was able to reproduce this and the supplied patch corrected the behaviour - only took.... almost exactly 2 years! Lol. Anyway, this looks good to me.

Thanks @darkodevubc ( and @joelpittet for prodding me :) )

joelpittet commented 1 year ago

Thanks, saved me from setting it up to reproduce the steps @occupant !