feat: add Embla initialization hooks#145
Open
sunmorgn wants to merge 1 commit into
Open
Conversation
2d40494 to
1a0dd9c
Compare
Author
|
Additional local manual test after adding
|
Author
|
Additional local test using WordPress block-style classes:
This keeps the PR API compatible with normal WordPress block style workflows. |
a55530e to
1a0dd9c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds stable JavaScript hooks around rtCarousel's Embla initialization so projects can adjust Embla options, append Embla plugins, and access the initialized Embla API for methods and events without forking the plugin.
Type of change
Related issue(s)
Closes #144
What changed
rtcamp.carouselKit.emblaOptionsto filter the options passed toEmblaCarousel.rtcamp.carouselKit.emblaPluginsto filter the Embla plugin array after the built-in Autoplay plugin is configured.rtcamp.carouselKit.emblaInitso integrations can call Embla methods or subscribe to Embla events after initialization.Breaking changes
Does this introduce a breaking change? If yes, describe the impact and migration path below.
Testing
Describe how this was tested.
Test details:
npm run lint:jsnpm run lint:js:typesnpm run test:js -- --runTestsByPath src/blocks/carousel/__tests__/view.test.tsnpm run buildScreenshots / recordings
Not applicable; this change exposes developer extension hooks and does not alter saved markup or default carousel behavior.
Checklist