Conversation
[Docs]: Update README with requirements, browser support, and FAQs
- Updated block.json files to change names and categories from "core-carousel" to "carousel-kit". - Modified edit.tsx, save.tsx, and style.scss files to reflect new class names and attributes. - Adjusted editor-context.ts and editor.scss for context and styling changes. - Updated index.ts and view.ts to register and manage the new block structure. - Refactored tests to align with the new "carousel-kit" namespace and structure. - Ensured all references to "core-carousel" are replaced with "carousel-kit" across the codebase.
[Refactor]: Update plugin name from core carousel to carousel kit
Remove hardcoded loop: false in the editor viewport component to respect carousel settings.
Introduce conditional spacing using CSS gap for standard carousels and margins for looping carousels. This ensures consistent gaps when slides wrap around while avoiding extra trailing space in normal mode.
Update version in package.json and plugin header, and add v1.0.1 entries to CHANGELOG.md.
…o fix/playground
…o fix/carousel-loop-spacing
There was a problem hiding this comment.
Pull request overview
This pull request merges the develop branch into main, implementing a comprehensive rename of the plugin from "Core Carousel" to "Carousel Kit". The PR includes namespace changes, constant renames, CSS class updates, documentation updates, and bug fixes for carousel loop mode spacing.
Changes:
- Renamed plugin from "Core Carousel" to "Carousel Kit" across all files (PHP namespaces, constants, CSS classes, block names, text domains)
- Fixed carousel loop mode spacing issues by adding data-loop attribute and CSS gap handling
- Updated dependencies (@testing-library/jest-dom from ^6.6.3 to 6.9.1, axios to 1.13.5)
- Version bump from 1.0.0 to 1.0.1
Reviewed changes
Copilot reviewed 56 out of 61 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| carousel-kit.php | New main plugin file with Carousel_Kit namespace and CAROUSEL_KIT_* constants |
| core-carousel.php | Deleted old main plugin file |
| src/blocks/carousel/styles/_core.scss | Updated CSS class names and added loop mode gap handling (incomplete - has old class names) |
| src/blocks/carousel/viewport/edit.tsx | Fixed loop mode to respect options instead of hardcoding false |
| src/blocks/carousel/save.tsx | Added data-loop attribute for proper loop mode styling |
| src/blocks/carousel/edit.tsx | Added data-loop attribute in editor view |
| package.json | Version bump to 1.0.1 (name not updated - critical issue) |
| package-lock.json | Name updated but version mismatch (critical issue) |
| composer.json | Namespace updated to Carousel_Kit |
| inc/Plugin.php | Namespace and constant updates |
| inc/Traits/Singleton.php | Namespace and hook name updates |
| tests/* | Updated namespaces, constants, and test expectations |
| docs/* | Documentation updated with new naming |
| .github/workflows/release.yml | Has YAML indentation errors and old filename reference (critical issues) |
| blueprint.json | Has old repository and filename references (critical issue) |
| examples/patterns/* | Pattern files updated with new block names |
| phpunit.xml.dist, phpstan.neon.dist, phpcs.xml.dist | Configuration files updated with new filename |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| :where(.core-carousel[data-loop="true"]) .embla__container, | ||
| :where(.core-carousel[data-loop="true"]) .embla .wp-block-post-template { | ||
| gap: 0; | ||
| } | ||
|
|
||
| :where(.core-carousel[data-loop="true"]) .embla__slide, | ||
| :where(.core-carousel[data-loop="true"]) .embla .wp-block-post-template li { | ||
| margin-inline-end: var(--core-carousel-gap, 0); | ||
| } | ||
|
|
||
| /* Vertical Axis adjustments */ | ||
| :where(.core-carousel[data-axis="y"]) { | ||
| :where(.carousel-kit[data-axis="y"]) { | ||
| display: flex; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| :where(.core-carousel[data-axis="y"]) .embla { | ||
| height: var(--core-carousel-height); | ||
| :where(.carousel-kit[data-axis="y"]) .embla { | ||
| height: var(--carousel-kit-height); | ||
| } | ||
|
|
||
| :where(.core-carousel[data-axis="y"]) .embla__container { | ||
| :where(.carousel-kit[data-axis="y"]) .embla__container { | ||
| flex-direction: column; | ||
| height: 100%; | ||
| min-height: 100%; | ||
| } | ||
|
|
||
| :where(.core-carousel[data-axis="y"]) .embla__slide, | ||
| :where(.core-carousel[data-axis="y"]) .embla .wp-block-post-template li { | ||
| flex: 0 0 var(--core-carousel-slide-width, 100%); | ||
| :where(.carousel-kit[data-axis="y"]) .embla__slide, | ||
| :where(.carousel-kit[data-axis="y"]) .embla .wp-block-post-template li { | ||
| flex: 0 0 var(--carousel-kit-slide-width, 100%); | ||
| width: 100%; | ||
| max-width: 100%; | ||
| margin-inline-end: 0; | ||
| } | ||
|
|
||
| /* Vertical + Loop specific */ | ||
| :where(.core-carousel[data-axis="y"][data-loop="true"]) .embla__slide, | ||
| :where(.core-carousel[data-axis="y"][data-loop="true"]) .embla .wp-block-post-template li { | ||
| margin-block-end: var(--core-carousel-gap, 0); | ||
| } |
There was a problem hiding this comment.
The CSS selectors for loop mode still use the old class name core-carousel instead of the new carousel-kit. These selectors need to be updated to maintain consistency with the plugin rename. This affects:
.core-carousel[data-loop="true"]selectors (lines 51-52, 56-57)- CSS variable
--core-carousel-gap(lines 58, 88)
The selectors should use .carousel-kit and the variable should be --carousel-kit-gap to match the rest of the stylesheet.
package.json
Outdated
| @@ -1,6 +1,6 @@ | |||
| { | |||
| "name": "core-carousel", | |||
There was a problem hiding this comment.
The package name in package.json is still "core-carousel" but should be "carousel-kit" to match the overall plugin rename. This inconsistency could cause confusion and issues with package management tools. Note that package-lock.json already has the correct name "carousel-kit", creating a mismatch between the two files.
| "name": "core-carousel", | |
| "name": "carousel-kit", |
| - name: Create Release and Upload Asset | ||
|
|
||
| uses: softprops/action-gh-release@v1 | ||
|
|
||
| with: | ||
|
|
||
| tag_name: v${{ steps.get_version.outputs.VERSION }} | ||
|
|
||
| name: v${{ steps.get_version.outputs.VERSION }} | ||
|
|
||
| generate_release_notes: true | ||
|
|
||
| files: core-carousel.zip | ||
|
|
||
| env: | ||
|
|
||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
There was a problem hiding this comment.
The YAML indentation is incorrect starting from line 37. The step "Create Release and Upload Asset" and all its child properties have inconsistent extra indentation. In YAML, list items should be indented by 2 spaces from their parent, but lines 37-53 use excessive indentation (12 spaces for the step name instead of 6). This will cause the GitHub Actions workflow to fail with a syntax error.
| - name: Create Release and Upload Asset | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ steps.get_version.outputs.VERSION }} | |
| name: v${{ steps.get_version.outputs.VERSION }} | |
| generate_release_notes: true | |
| files: core-carousel.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create Release and Upload Asset | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ steps.get_version.outputs.VERSION }} | |
| name: v${{ steps.get_version.outputs.VERSION }} | |
| generate_release_notes: true | |
| files: core-carousel.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
.github/workflows/release.yml
Outdated
|
|
||
| generate_release_notes: true | ||
|
|
||
| files: core-carousel.zip |
There was a problem hiding this comment.
The workflow still references the old filename "core-carousel.zip" instead of "carousel-kit.zip". Based on the Makefile changes, the build process now generates "carousel-kit.zip", so this files reference will fail during the release step. The filename should be updated to "carousel-kit.zip" to match the new plugin name.
| files: core-carousel.zip | |
| files: carousel-kit.zip |
blueprint.json
Outdated
| "pluginData": { | ||
| "resource": "url", | ||
| "url": "https://cdn.statically.io/gh/rtCamp/core-carousel@dist/core-carousel.zip" | ||
| "url": "https://github.com/rtCamp/core-carousel/releases/latest/download/core-carousel.zip" |
There was a problem hiding this comment.
The blueprint.json file contains outdated references to the old plugin repository and file names:
- Line 13: URL still points to "rtCamp/core-carousel" repository instead of "rtCamp/carousel-kit"
- Line 13: ZIP filename is "core-carousel.zip" instead of "carousel-kit.zip"
These URLs need to be updated to point to the renamed repository and the correct ZIP filename, otherwise the WordPress Playground demo will fail to install the plugin.
| "url": "https://github.com/rtCamp/core-carousel/releases/latest/download/core-carousel.zip" | |
| "url": "https://github.com/rtCamp/carousel-kit/releases/latest/download/carousel-kit.zip" |
Fix: replace core-carousel with carousel-kit
Description: Merge
developintomain