Skip to content

feat(loop): marquee mode in the editor and carousel events for extensions - #346

Merged
nk-o merged 6 commits into
masterfrom
carousel-marquee
Sep 27, 2026
Merged

nk-o merged 6 commits into
masterfrom
carousel-marquee

Conversation

@nk-o

@nk-o nk-o commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Autoplay on a Gallery Loop carousel gets a second mode in the editor, Marquee, and the carousel gets the events an extension needs to drive it. The marquee itself is Pro's and runs from Pro. Without Pro the option shows as a disabled "Marquee (Pro)", and nothing in this plugin moves a carousel continuously.

The carousel is a native scroll container, so a CSS marquee cannot keep the arrows, dots and drag working, and Pro drives the same scroll instead. It needs three things it cannot get from outside the view module, and those are what this adds:

Event What it gives an extension
vp-carousel-autoplay-take then vp-carousel-autoplay-frame The autoplay stops stepping and hands over every frame with its pause state: held (the visitor's stop, a script's hold, off screen, keyboard), pointer, keyboard. The pauses, the play and pause button and reduced motion stay here.
vp-carousel-place Places a repeating carousel on its loop at once, kept off the seam the way a step is, and writes back where the scroll came to rest.
vp-carousel-travel-start / -end Says when the module is drawing a step of its own, so a script moving the carousel keeps its hands off the snap until the step lands.

The travel events close a bug found in review. Without them, the marquee turned snapping back on in the middle of a keyboard-started step, and the carousel bounced between two slides at the loop seam.

An autoplay nobody takes behaves exactly as before, so a carousel that cannot loop still steps by its delay under Pro.

Autoplay with the Mode select showing Marquee (Pro) and a Go Pro link, without Pro

Pro's PR runs these events end to end in its e2e spec.

The carousel is a native scroll container, so a CSS marquee could
not keep the arrows, dots and drag working. The autoplay runs a
continuous move instead and shares its pauses. Scroll holds whole
pixels and is kept off the loop's ends, so the rest goes to a
translate of the slides.

The mode is Pro's: the free editor offers it as a teaser and the
list only runs one when Pro writes its attributes.
- Keyboard focus gives the carousel its snap back, so an arrow key
  steps a slide.
- A finger holds the marquee until it lifts, and any pixel the
  marquee did not scroll counts as someone else's move, so a slow
  swipe or sideways wheel is no longer scrolled back.
- Only the main button holds it: a context menu on a Mac swallows
  the release.
- A held marquee at a stop measures nothing.
- A step started from a focused control keeps its snap off until it
  lands; the keyboard hold no longer turns it back on under it.
- A key on the list gives the snap back before it scrolls, so a
  list focused by a click steps a slide too.
- Only fingers on the list hold it, and a context menu releases it.
- The wheel hint is gone: a slow wheel already moves the list off
  the marquee's pixel.
The marquee is Pro's, so its code moves there. The carousel gains the
events an extension needs to drive it without its internals: taking
the autoplay's frames with their pauses, placing the carousel on its
loop, and being told when a step of the module is under way.
@nk-o nk-o changed the title feat(loop): marquee mode for the carousel autoplay feat(loop): marquee mode in the editor and carousel events for extensions Sep 27, 2026
@nk-o
nk-o merged commit 656ff48 into master Sep 27, 2026
6 of 7 checks passed
@nk-o
nk-o deleted the carousel-marquee branch September 27, 2026 10:08
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