feat: Add slide template picker and templates for carousel block#83
Open
deepaklalwani97 wants to merge 4 commits intodevelopfrom
Open
feat: Add slide template picker and templates for carousel block#83deepaklalwani97 wants to merge 4 commits intodevelopfrom
deepaklalwani97 wants to merge 4 commits intodevelopfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a two-step “first-run” setup experience for the Carousel block (slide count → template selection) and introduces a template registry that can be extended via a WordPress filter hook.
Changes:
- Added a slide template registry (
getSlideTemplates) with default templates (Blank, Image, Hero, Image + Caption, Query Loop) and a filter hook for extensibility. - Added a Template Picker UI component and editor styling for the picker.
- Updated Carousel block setup flow in
edit.tsxto support the two-step onboarding and initialize inner blocks based on the selected template.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/blocks/carousel/templates.ts |
Introduces default slide templates and exposes getSlideTemplates() via a filter hook. |
src/blocks/carousel/edit.tsx |
Implements the two-step setup flow and applies selected templates when initializing inner blocks. |
src/blocks/carousel/components/TemplatePicker.tsx |
Adds the template selection UI used during initial block setup. |
src/blocks/carousel/editor.scss |
Adds editor-only styling for the template picker grid and items. |
src/blocks/carousel/__tests__/templates.test.ts |
Adds unit coverage for template registry behavior and default template shapes. |
package.json |
Adds @wordpress/hooks as a direct dependency for the new filter-based extension point. |
package-lock.json |
Locks the updated @wordpress/hooks dependency version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
theMasudRana
requested changes
Mar 17, 2026
… feature/79-slide-templates
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 a two-step setup flow to the Carousel block: users first pick a slide count, then choose a slide template (Blank, Image, Hero, Image + Caption, or Query Loop). Templates are extensible via the rtcamp.carouselKit.slideTemplates WordPress filter hook.
Type of change
Related issue(s)
Closes #79
What changed
Testing
Describe how this was tested.
Test details:
core/imageand acore/paragraphblock.Screenshots / recordings
Screen.Recording.2026-03-12.at.2.58.29.PM.mov
If applicable, add screenshots or short recordings.
Checklist