Skip to content

Fix rail-mode carousel bugs and gate Slick assets by engine#24

Merged
jasperf merged 1 commit into
mainfrom
redesign/carousel-rail-fix
Jul 21, 2026
Merged

Fix rail-mode carousel bugs and gate Slick assets by engine#24
jasperf merged 1 commit into
mainfrom
redesign/carousel-rail-fix

Conversation

@jasperf

@jasperf jasperf commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #23, which shipped the rail engine but left the fixes below unmerged.

  • Fixes rail-mode rendering bugs in the carousel block.
  • Gates the Slick assets (slick.min.js, slick-theme.css) on the selected engine, so rail-mode carousels no longer load jQuery/Slick at all.

Verified on http://demo.imagewize.test/aviendha/ with the homepage pattern re-imported: the client rail renders as a scroll-snap rail and slick-slider is absent from the markup.

view.js crashed on rail carousels (JSON.parse on a missing
data-slick attribute), aborting Slick init for any other carousel
on the page. The homepage pattern's rail carousel also carried
stale Slick data-* attributes that save() no longer renders,
which would trigger a block validation error in the editor.

Slick assets are now skipped entirely on pages where every
carousel block uses the rail engine, instead of loading whenever
any carousel block is merely present.

Bump to 2.21.0.
@github-actions

Copy link
Copy Markdown

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@jasperf
jasperf merged commit 13eb047 into main Jul 21, 2026
2 checks passed
@jasperf
jasperf deleted the redesign/carousel-rail-fix branch July 21, 2026 07:11
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.

1 participant