Collected a bunch of small fixes for 1.2.1:

  • The behavior doesn't use once(), so sliders get mounted again after every AJAX request (Views pager, exposed filters).
  • The library reads drupalSettings but doesn't depend on core/drupalSettings, so on pages where nothing else loads it the slider doesn't start. glide_external should be a dependency as well.
  • The CDN URLs have no version, so we always get the latest Glide.js. Pinning to 3.7.1.
  • focus_at is sent as a string, should be an int unless it's "center".
  • Autoplay with an empty speed ends up as 0, which Glide treats as off. Setting a default of 3000 and making the field required when autoplay is on.
  • The #attributes set in GlideStyle::render() are never rendered (the template prints them anyway), removing them.
  • The arrow buttons are missing type="button" and an aria-label.

AI disclosure: the review and the patch were done with help from Claude. I reviewed and tested everything locally before committing.

Comments

junkuncz created an issue. See original summary.

junkuncz’s picture

Issue summary: View changes
junkuncz’s picture

Issue summary: View changes
junkuncz’s picture

Issue summary: View changes

  • junkuncz committed 6101417b on 1.x
    Issue #3642869: Fix slider re-init on AJAX, missing library dependencies...

  • junkuncz committed 8e3f80c1 on 1.x
    Issue #3642869: Add missing newlines at end of files
    
junkuncz’s picture

Assigned: junkuncz » Unassigned
Issue summary: View changes
Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

junkuncz’s picture

Status: Fixed » Closed (fixed)