Skip to content

feat: Update Node.js requirements and package.json structure#791

Merged
krugazul merged 15 commits into2.1-trunkfrom
hotfix/node-version-update
Dec 3, 2025
Merged

feat: Update Node.js requirements and package.json structure#791
krugazul merged 15 commits into2.1-trunkfrom
hotfix/node-version-update

Conversation

@krugazul
Copy link
Copy Markdown
Collaborator

@krugazul krugazul commented Dec 1, 2025

Update Node.js Requirements and Package Configuration

Overview

This PR updates the Node.js version requirements for the Tour Operator plugin to ensure compatibility with modern development environments and security standards.

Changes Made

Node.js Version Requirements

  • Updated minimum Node.js version: Set to >=24.11.0 (LTS) in package.json engines field
  • Updated minimum npm version: Set to >=10.0.0 for compatibility
  • Rationale: Ensures plugin development uses current LTS Node.js with latest security patches and performance improvements

Package Configuration Updates

  • package.json structure: Reverted to previous version while maintaining the updated engines parameter
  • Dependencies: Maintained existing dependency structure for consistency
  • Build scripts: Kept original build configuration approach

Build System Configuration

  • Webpack configuration: Changed back to original naming convention (webpack.config.js)
  • Asset handling: Maintained existing asset compilation approach
  • Block compilation: Preserved existing block build pipeline

Technical Details

Node.js Compatibility

  • Minimum version: Node.js 24.11.0 (October 2024 LTS)
  • npm compatibility: npm 10.0.0+ for package management
  • Development environment: Ensures consistent tooling across team

Configuration Files

  • package.json: Contains engines specification requiring Node >=24.11.0
  • webpack.config.js: Uses original naming convention for build configuration
  • Block assets: Maintains existing compilation and output structure

Testing

Environment Testing

  • Verified Node.js 24.11.0+ compatibility
  • Confirmed npm 10.0.0+ functionality
  • Tested build process with updated requirements
  • Validated existing functionality remains intact

Build Process

  • Asset compilation works correctly
  • Block registration maintains functionality
  • Production builds generate correctly
  • Development workflow unaffected

Impact Assessment

Developer Experience

  • Positive: Modern Node.js features and improved performance
  • Positive: Enhanced security through latest LTS version
  • Neutral: Maintains existing package structure and build process

Compatibility

  • Forward compatible: Supports Node.js 24+ versions
  • Build system: Maintains existing asset compilation approach
  • WordPress integration: No changes to WordPress compatibility

Deployment Notes

Requirements

  • Development environments must use Node.js 24.11.0 or higher
  • npm version 10.0.0 or higher required for package management
  • Existing build processes continue to work as before

Migration

  • Team members need to update Node.js to version 24.11.0+
  • No changes required to existing build scripts or workflows
  • Package installation and build commands remain the same

Related Issues

This update ensures the plugin development environment uses current Node.js LTS standards while maintaining existing functionality and build processes.


Summary: Updated Node.js requirements to version 24.11.0+ while reverting package.json structure to previous version (keeping engines parameter) and restoring webpack configuration to original naming convention.

Summary by CodeRabbit

  • New Features

    • Added a utility to conditionally register WordPress blocks based on editor context, post types and template patterns.
  • Chores

    • Added Node version file and declared engine requirements; updated dependencies, dev tools and scripts.
    • Updated build asset versions and minor build config/file name changes across docs and tooling.
    • Updated ignore rules and removed cached test results.

✏️ Tip: You can customize this high-level summary in your review settings.

@krugazul krugazul self-assigned this Dec 1, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 1, 2025

Caution

Review failed

The pull request is closed.

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: String must contain at most 250 character(s) at "tone_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

This pull request adds Node.js version management (.nvmrc), a conditional WordPress block registration utility, dependency and script updates in package.json, refreshes build asset hashes, adjusts various config filenames from .webpack.config.cjs to webpack.config.js, updates ignore/gitattributes entries, and removes the PHPUnit result cache.

Changes

Cohort / File(s) Summary
Version & environment files
.nvmrc, .gitignore
Adds .nvmrc specifying Node 24.11.1; updates .gitignore with playwright-report/* and vendor/bin/.phpunit.result.cache (duplicate entry present).
Package and tooling
package.json
Adds engines (node, npm); updates dependencies and devDependencies (notably @wordpress/blocks, eslint, prettier, stylelint); adds webpack-cli; renames scripts to colon-based names (build-potbuild:pot, build-mopobuild:mopo, translate-USbuild:translate-US).
Conditional block registration utility
src/utils/conditional-block-registration.js, src/utils/index.js
New module exposing createConditionalRegistration, registerForPostTypes, registerForTemplates, and registerForPostTypesAndTemplates; re-exported from src/utils/index.js. Uses wp.data selectors, timeout + subscription retry logic and duplicate-registration guards.
Build assets & bundles
build/blocks/icons/index.asset.php, build/blocks/sticky-menu/index.asset.php, build/blocks/sticky-menu/index.js
Updated asset version hashes; adjusted internal webpack module id in sticky-menu bundle (2842 → 560).
Config filename and ignore sync
.distignore, .eslintrc, .gitattributes, .prettierignore, .github/labeler.yml, README.md, docs/wordpress-packages.md
Switched references from .webpack.config.cjs to webpack.config.js across documentation and tooling config; updated ESLint/Prettier/gitattributes/labeler mappings accordingly.
Generated/test cache
vendor/bin/.phpunit.result.cache
Deleted PHPUnit result cache file contents.
Minor formatting
webpack.config.js
Added trailing newline; no logic change.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Files warranting extra attention:
    • src/utils/conditional-block-registration.js — verify matching logic, subscription/unsubscribe correctness and edge-case timeouts
    • package.json — validate dependency upgrades (eslint major bump) and renamed scripts for CI compatibility
    • .gitignore — duplicate vendor/bin/.phpunit.result.cache entry and change from exact to glob for playwright entry

Possibly related PRs

Suggested labels

[Type] Enhancement, area:ci, lang:javascript, lang:md, status:needs-review, meta:needs-changelog

Poem

🐰 Node set to twenty-four, I hop with glee,
A register waits to know when blocks should be,
Hashes refreshed and scripts renamed with care,
Ignores updated, caches cleared from there,
I nibble changes — tidy, small, and merry! 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: updating Node.js version requirements via .nvmrc and package.json engines field, plus package.json structural updates including dependency versions and script renames.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a00ea0a and 8ab0272.

📒 Files selected for processing (7)
  • .distignore (1 hunks)
  • .eslintrc (1 hunks)
  • .gitattributes (1 hunks)
  • .github/labeler.yml (1 hunks)
  • .prettierignore (1 hunks)
  • README.md (1 hunks)
  • docs/wordpress-packages.md (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 12

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b6c9761 and 15565c6.

⛔ Files ignored due to path filters (6)
  • build/1905d950e626f7f3d788.svg is excluded by !**/*.svg
  • build/47097bc0b1de7b74cdeb.svg is excluded by !**/*.svg
  • build/7b35f3170485a266aa9c.svg is excluded by !**/*.svg
  • build/b6ab55697168aa31a937.svg is excluded by !**/*.svg
  • build/fb641d61abaeb706e423.svg is excluded by !**/*.svg
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (82)
  • .gitignore (1 hunks)
  • .nvmrc (1 hunks)
  • .webpack.assets.config.js (1 hunks)
  • .webpack.config.cjs (0 hunks)
  • build/admin-rtl.css (0 hunks)
  • build/admin-script.asset.php (1 hunks)
  • build/admin.asset.php (1 hunks)
  • build/admin.css (1 hunks)
  • build/blocks/icons/index.asset.php (1 hunks)
  • build/blocks/sticky-menu/index.asset.php (1 hunks)
  • build/blocks/sticky-menu/index.js (1 hunks)
  • build/custom.asset.php (1 hunks)
  • build/general.asset.php (1 hunks)
  • build/linked-cover.asset.php (1 hunks)
  • build/maps.asset.php (1 hunks)
  • build/metabox-structure.asset.php (1 hunks)
  • build/metaboxes-rtl.css (0 hunks)
  • build/metaboxes.asset.php (1 hunks)
  • build/metaboxes.css (1 hunks)
  • build/modals.asset.php (1 hunks)
  • build/scporder.asset.php (1 hunks)
  • build/slider-query.asset.php (1 hunks)
  • build/slotfills.asset.php (1 hunks)
  • build/style-rtl.css (0 hunks)
  • build/style.asset.php (1 hunks)
  • build/style.css (1 hunks)
  • package.json (4 hunks)
  • src/blocks/accommodation-related-accommodation/index.js (1 hunks)
  • src/blocks/accommodation-related-destination/index.js (1 hunks)
  • src/blocks/accommodation-related-tour/index.js (1 hunks)
  • src/blocks/accommodation-type/index.js (1 hunks)
  • src/blocks/additional-info/index.js (1 hunks)
  • src/blocks/banking/index.js (1 hunks)
  • src/blocks/best-time-to-visit/index.js (1 hunks)
  • src/blocks/booking-validity/index.js (1 hunks)
  • src/blocks/checkin-time/index.js (1 hunks)
  • src/blocks/checkout-time/index.js (1 hunks)
  • src/blocks/climate/index.js (1 hunks)
  • src/blocks/cuisine/index.js (1 hunks)
  • src/blocks/departs-from/index.js (1 hunks)
  • src/blocks/destination-to-accommodation/index.js (1 hunks)
  • src/blocks/destination-to-tour/index.js (1 hunks)
  • src/blocks/dress/index.js (1 hunks)
  • src/blocks/duration/index.js (1 hunks)
  • src/blocks/electricity/index.js (1 hunks)
  • src/blocks/ends-in/index.js (1 hunks)
  • src/blocks/facilities/index.js (1 hunks)
  • src/blocks/facts-country-wrapper/index.js (1 hunks)
  • src/blocks/facts-regions-wrapper/index.js (1 hunks)
  • src/blocks/google-map/index.js (1 hunks)
  • src/blocks/group-size/index.js (1 hunks)
  • src/blocks/health/index.js (1 hunks)
  • src/blocks/included/index.js (1 hunks)
  • src/blocks/itinerary/index.js (1 hunks)
  • src/blocks/minimum-child-age/index.js (1 hunks)
  • src/blocks/not-included/index.js (1 hunks)
  • src/blocks/number-of-rooms/index.js (1 hunks)
  • src/blocks/price-include-exclude/index.js (1 hunks)
  • src/blocks/price/index.js (1 hunks)
  • src/blocks/rating/index.js (1 hunks)
  • src/blocks/regions/index.js (1 hunks)
  • src/blocks/related-regions/index.js (1 hunks)
  • src/blocks/review-related-accommodation/index.js (1 hunks)
  • src/blocks/review-related-destination/index.js (1 hunks)
  • src/blocks/review-related-tour/index.js (1 hunks)
  • src/blocks/safety/index.js (1 hunks)
  • src/blocks/single-supplement-wrapper/index.js (1 hunks)
  • src/blocks/special-interests/index.js (1 hunks)
  • src/blocks/spoken-languages/index.js (1 hunks)
  • src/blocks/suggested-visitor-types/index.js (1 hunks)
  • src/blocks/tagline/index.js (1 hunks)
  • src/blocks/tour-related-accommodation/index.js (1 hunks)
  • src/blocks/tour-related-destination/index.js (1 hunks)
  • src/blocks/tour-related-tour/index.js (1 hunks)
  • src/blocks/transport/index.js (1 hunks)
  • src/blocks/travel-styles/index.js (1 hunks)
  • src/blocks/units/index.js (1 hunks)
  • src/blocks/visa/index.js (1 hunks)
  • src/blocks/wetu-map/index.js (1 hunks)
  • src/utils/conditional-block-registration.js (1 hunks)
  • src/utils/index.js (1 hunks)
  • vendor/bin/.phpunit.result.cache (1 hunks)
💤 Files with no reviewable changes (4)
  • build/metaboxes-rtl.css
  • build/admin-rtl.css
  • .webpack.config.cjs
  • build/style-rtl.css
🧰 Additional context used
📓 Path-based instructions (20)
**/*.{css,scss,less,jsx,tsx,js,ts}

📄 CodeRabbit inference engine (.github/instructions/patterns.instructions.md)

Use design tokens via theme.json; avoid inline styles when possible

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/utils/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • build/metaboxes.css
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • build/blocks/sticky-menu/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • build/admin.css
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • src/blocks/facts-country-wrapper/index.js
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/utils/conditional-block-registration.js
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • src/blocks/related-regions/index.js
  • src/blocks/price/index.js
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
  • build/style.css
**/*.{css,scss,less,js,jsx,ts,tsx,vue}

📄 CodeRabbit inference engine (.github/instructions/performance.instructions.md)

Minimise DOM depth; prefer CSS utilities/presets over custom CSS

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/utils/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • build/metaboxes.css
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • build/blocks/sticky-menu/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • build/admin.css
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • src/blocks/facts-country-wrapper/index.js
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/utils/conditional-block-registration.js
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • src/blocks/related-regions/index.js
  • src/blocks/price/index.js
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
  • build/style.css
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/instructions/performance.instructions.md)

Defer non-critical JavaScript; avoid synchronous blocking

Use semicolons to terminate statements in JavaScript block code

Ensure all generated code follows ESLint rules and WordPress Coding Standards before deployment

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/utils/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • build/blocks/sticky-menu/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • src/blocks/facts-country-wrapper/index.js
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/utils/conditional-block-registration.js
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • src/blocks/related-regions/index.js
  • src/blocks/price/index.js
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
**/*.{css,scss,less,js,jsx,ts,tsx,vue,md}

📄 CodeRabbit inference engine (.github/instructions/performance.instructions.md)

Avoid large images in patterns; recommend responsive sizes and lazy loading

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/utils/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • build/metaboxes.css
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • build/blocks/sticky-menu/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • build/admin.css
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • src/blocks/facts-country-wrapper/index.js
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/utils/conditional-block-registration.js
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • src/blocks/related-regions/index.js
  • src/blocks/price/index.js
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
  • build/style.css
**/*.{js,jsx,ts,tsx,css,scss}

📄 CodeRabbit inference engine (.github/instructions/review.instructions.md)

No inline CSS; use theme.json tokens only

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/utils/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • build/metaboxes.css
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • build/blocks/sticky-menu/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • build/admin.css
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • src/blocks/facts-country-wrapper/index.js
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/utils/conditional-block-registration.js
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • src/blocks/related-regions/index.js
  • src/blocks/price/index.js
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
  • build/style.css
**/*.{json,php,js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/instructions/review.instructions.md)

Woo patterns respect constraints

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/utils/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • build/slotfills.asset.php
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • build/maps.asset.php
  • build/blocks/sticky-menu/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • build/metabox-structure.asset.php
  • src/blocks/facts-country-wrapper/index.js
  • build/blocks/sticky-menu/index.asset.php
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/utils/conditional-block-registration.js
  • build/scporder.asset.php
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • build/blocks/icons/index.asset.php
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • build/linked-cover.asset.php
  • build/general.asset.php
  • build/metaboxes.asset.php
  • src/blocks/related-regions/index.js
  • build/slider-query.asset.php
  • src/blocks/price/index.js
  • package.json
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
  • build/modals.asset.php
  • build/custom.asset.php
  • build/style.asset.php
  • build/admin.asset.php
  • build/admin-script.asset.php
**/*.{php,js,ts,jsx,tsx,vue}

📄 CodeRabbit inference engine (.github/instructions/reviews.instructions.md)

Verify input is properly escaped and sanitized, security capabilities/nonce checks are in place

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/utils/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • build/slotfills.asset.php
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • build/maps.asset.php
  • build/blocks/sticky-menu/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • build/metabox-structure.asset.php
  • src/blocks/facts-country-wrapper/index.js
  • build/blocks/sticky-menu/index.asset.php
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/utils/conditional-block-registration.js
  • build/scporder.asset.php
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • build/blocks/icons/index.asset.php
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • build/linked-cover.asset.php
  • build/general.asset.php
  • build/metaboxes.asset.php
  • src/blocks/related-regions/index.js
  • build/slider-query.asset.php
  • src/blocks/price/index.js
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
  • build/modals.asset.php
  • build/custom.asset.php
  • build/style.asset.php
  • build/admin.asset.php
  • build/admin-script.asset.php
**/*.{js,ts,jsx,tsx,css,scss,sass}

📄 CodeRabbit inference engine (.github/instructions/reviews.instructions.md)

Avoid heavy re-renders, minimize CSS/JS payload, and implement lazy-loading where possible

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/utils/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • build/metaboxes.css
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • build/blocks/sticky-menu/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • build/admin.css
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • src/blocks/facts-country-wrapper/index.js
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/utils/conditional-block-registration.js
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • src/blocks/related-regions/index.js
  • src/blocks/price/index.js
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
  • build/style.css
**/*.{js,ts,jsx,tsx,php,py,java,go,rb}

📄 CodeRabbit inference engine (.github/instructions/reviews.instructions.md)

Verify CI pipeline is passing and no TODO comments are left in code before release

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/utils/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • build/slotfills.asset.php
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • build/maps.asset.php
  • build/blocks/sticky-menu/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • build/metabox-structure.asset.php
  • src/blocks/facts-country-wrapper/index.js
  • build/blocks/sticky-menu/index.asset.php
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/utils/conditional-block-registration.js
  • build/scporder.asset.php
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • build/blocks/icons/index.asset.php
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • build/linked-cover.asset.php
  • build/general.asset.php
  • build/metaboxes.asset.php
  • src/blocks/related-regions/index.js
  • build/slider-query.asset.php
  • src/blocks/price/index.js
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
  • build/modals.asset.php
  • build/custom.asset.php
  • build/style.asset.php
  • build/admin.asset.php
  • build/admin-script.asset.php
**/*.{php,js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (GEMINI.md)

Follow WordPress Coding Standards including proper namespacing, security practices (sanitization/escaping), and code organization

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/utils/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • build/slotfills.asset.php
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • build/maps.asset.php
  • build/blocks/sticky-menu/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • build/metabox-structure.asset.php
  • src/blocks/facts-country-wrapper/index.js
  • build/blocks/sticky-menu/index.asset.php
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/utils/conditional-block-registration.js
  • build/scporder.asset.php
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • build/blocks/icons/index.asset.php
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • build/linked-cover.asset.php
  • build/general.asset.php
  • build/metaboxes.asset.php
  • src/blocks/related-regions/index.js
  • build/slider-query.asset.php
  • src/blocks/price/index.js
  • package.json
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
  • build/modals.asset.php
  • build/custom.asset.php
  • build/style.asset.php
  • build/admin.asset.php
  • build/admin-script.asset.php
**/*.{js,jsx,ts,tsx,php}

📄 CodeRabbit inference engine (GEMINI.md)

Implement accessibility features following WCAG 2.2 AA standards in all block components and patterns

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/utils/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • build/slotfills.asset.php
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • build/maps.asset.php
  • build/blocks/sticky-menu/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • build/metabox-structure.asset.php
  • src/blocks/facts-country-wrapper/index.js
  • build/blocks/sticky-menu/index.asset.php
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/utils/conditional-block-registration.js
  • build/scporder.asset.php
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • build/blocks/icons/index.asset.php
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • build/linked-cover.asset.php
  • build/general.asset.php
  • build/metaboxes.asset.php
  • src/blocks/related-regions/index.js
  • build/slider-query.asset.php
  • src/blocks/price/index.js
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
  • build/modals.asset.php
  • build/custom.asset.php
  • build/style.asset.php
  • build/admin.asset.php
  • build/admin-script.asset.php
**/*.{php,js,jsx,ts,tsx}

📄 CodeRabbit inference engine (GEMINI.md)

Validate generated code against WordPress standards, test thoroughly, check security implications, and review for proper sanitization/escaping

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/utils/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • build/slotfills.asset.php
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • build/maps.asset.php
  • build/blocks/sticky-menu/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • build/metabox-structure.asset.php
  • src/blocks/facts-country-wrapper/index.js
  • build/blocks/sticky-menu/index.asset.php
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/utils/conditional-block-registration.js
  • build/scporder.asset.php
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • build/blocks/icons/index.asset.php
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • build/linked-cover.asset.php
  • build/general.asset.php
  • build/metaboxes.asset.php
  • src/blocks/related-regions/index.js
  • build/slider-query.asset.php
  • src/blocks/price/index.js
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
  • build/modals.asset.php
  • build/custom.asset.php
  • build/style.asset.php
  • build/admin.asset.php
  • build/admin-script.asset.php
**/*.{js,jsx,ts,tsx,php,scss,css}

📄 CodeRabbit inference engine (GEMINI.md)

Use camelCase for variable and function names, kebab-case for CSS classes, and snake_case for PHP variable names per WordPress Coding Standards

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/utils/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • build/metaboxes.css
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • build/slotfills.asset.php
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • build/maps.asset.php
  • build/blocks/sticky-menu/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • build/admin.css
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • build/metabox-structure.asset.php
  • src/blocks/facts-country-wrapper/index.js
  • build/blocks/sticky-menu/index.asset.php
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/utils/conditional-block-registration.js
  • build/scporder.asset.php
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • build/blocks/icons/index.asset.php
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • build/linked-cover.asset.php
  • build/general.asset.php
  • build/metaboxes.asset.php
  • src/blocks/related-regions/index.js
  • build/slider-query.asset.php
  • src/blocks/price/index.js
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
  • build/style.css
  • build/modals.asset.php
  • build/custom.asset.php
  • build/style.asset.php
  • build/admin.asset.php
  • build/admin-script.asset.php
**/*.{js,jsx,ts,tsx,scss,css}

📄 CodeRabbit inference engine (GEMINI.md)

For performance optimization, implement code splitting, lazy loading, and minimize CSS/JavaScript bundle sizes in block components

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/utils/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • build/metaboxes.css
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • build/blocks/sticky-menu/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • build/admin.css
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • src/blocks/facts-country-wrapper/index.js
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/utils/conditional-block-registration.js
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • src/blocks/related-regions/index.js
  • src/blocks/price/index.js
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
  • build/style.css
src/blocks/**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Block API v3 standards when developing blocks

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • src/blocks/facts-country-wrapper/index.js
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • src/blocks/related-regions/index.js
  • src/blocks/price/index.js
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
{src/blocks/**/*.{js,jsx,ts,tsx},src/**/*.php,inc/**/*.php}

📄 CodeRabbit inference engine (AGENTS.md)

Apply WCAG 2.2 AA accessibility standards to all blocks and UI components

Files:

  • src/blocks/regions/index.js
  • src/blocks/tour-related-destination/index.js
  • src/blocks/rating/index.js
  • src/blocks/visa/index.js
  • src/blocks/climate/index.js
  • src/blocks/tour-related-tour/index.js
  • src/blocks/review-related-accommodation/index.js
  • src/blocks/electricity/index.js
  • src/blocks/special-interests/index.js
  • src/blocks/booking-validity/index.js
  • src/blocks/spoken-languages/index.js
  • src/blocks/accommodation-related-accommodation/index.js
  • src/blocks/facilities/index.js
  • src/blocks/accommodation-type/index.js
  • src/blocks/tagline/index.js
  • src/blocks/review-related-destination/index.js
  • src/blocks/transport/index.js
  • src/blocks/departs-from/index.js
  • src/blocks/minimum-child-age/index.js
  • src/blocks/safety/index.js
  • src/blocks/health/index.js
  • src/blocks/group-size/index.js
  • src/blocks/review-related-tour/index.js
  • src/blocks/duration/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/accommodation-related-tour/index.js
  • src/blocks/ends-in/index.js
  • src/blocks/destination-to-accommodation/index.js
  • src/blocks/single-supplement-wrapper/index.js
  • src/blocks/banking/index.js
  • src/blocks/dress/index.js
  • src/blocks/included/index.js
  • src/blocks/google-map/index.js
  • src/blocks/units/index.js
  • src/blocks/destination-to-tour/index.js
  • src/blocks/checkin-time/index.js
  • src/blocks/facts-country-wrapper/index.js
  • src/blocks/not-included/index.js
  • src/blocks/wetu-map/index.js
  • src/blocks/price-include-exclude/index.js
  • src/blocks/accommodation-related-destination/index.js
  • src/blocks/checkout-time/index.js
  • src/blocks/best-time-to-visit/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/number-of-rooms/index.js
  • src/blocks/facts-regions-wrapper/index.js
  • src/blocks/itinerary/index.js
  • src/blocks/suggested-visitor-types/index.js
  • src/blocks/related-regions/index.js
  • src/blocks/price/index.js
  • src/blocks/tour-related-accommodation/index.js
  • src/blocks/travel-styles/index.js
**/*.{css,scss,less,jsx,tsx}

📄 CodeRabbit inference engine (.github/instructions/patterns.instructions.md)

Provide mobile-first responsive behaviour in block patterns

Files:

  • build/metaboxes.css
  • build/admin.css
  • build/style.css
**/*.php

📄 CodeRabbit inference engine (.github/instructions/performance.instructions.md)

Use wp_enqueue_block_style and wp_register_style with dependencies for registering styles

**/*.php: Escape on output using functions like esc_html, esc_attr, etc.
Sanitize on input; validate types and ranges
Check capabilities; use nonces for state-changing requests
Harden REST endpoints: permissions callbacks; minimal data exposure

Follow WordPress Coding Standards (WPCS) for all WordPress code

Files:

  • build/slotfills.asset.php
  • build/maps.asset.php
  • build/metabox-structure.asset.php
  • build/blocks/sticky-menu/index.asset.php
  • build/scporder.asset.php
  • build/blocks/icons/index.asset.php
  • build/linked-cover.asset.php
  • build/general.asset.php
  • build/metaboxes.asset.php
  • build/slider-query.asset.php
  • build/modals.asset.php
  • build/custom.asset.php
  • build/style.asset.php
  • build/admin.asset.php
  • build/admin-script.asset.php
**/*.{html,htm,jsx,tsx,vue,php}

📄 CodeRabbit inference engine (.github/instructions/reviews.instructions.md)

Ensure keyboard navigation paths are accessible, semantic HTML is used, alt text is provided for images, and color contrast meets accessibility standards

Files:

  • build/slotfills.asset.php
  • build/maps.asset.php
  • build/metabox-structure.asset.php
  • build/blocks/sticky-menu/index.asset.php
  • build/scporder.asset.php
  • build/blocks/icons/index.asset.php
  • build/linked-cover.asset.php
  • build/general.asset.php
  • build/metaboxes.asset.php
  • build/slider-query.asset.php
  • build/modals.asset.php
  • build/custom.asset.php
  • build/style.asset.php
  • build/admin.asset.php
  • build/admin-script.asset.php
**/blocks/**/*.php

📄 CodeRabbit inference engine (CLAUDE.md)

PHP render callbacks must be properly documented with descriptions of attributes and return values

Files:

  • build/blocks/sticky-menu/index.asset.php
  • build/blocks/icons/index.asset.php
🧬 Code graph analysis (3)
.webpack.assets.config.js (1)
includes/classes/legacy/class-maps.php (1)
  • assets (76-121)
build/blocks/sticky-menu/index.js (4)
build/blocks/sticky-menu/sticky-menu-editor-extension.js (4)
  • t (1-1)
  • r (1-1)
  • a (1-1)
  • l (1-1)
build/blocks/accommodation-related-accommodation/index.js (3)
  • e (1-1)
  • n (1-1)
  • s (1-1)
build/blocks/cuisine/index.js (3)
  • r (1-1)
  • a (1-1)
  • s (1-1)
build/blocks/transport/index.js (2)
  • r (1-1)
  • i (1-1)
src/utils/conditional-block-registration.js (1)
src/js/blocks/slotfills.js (1)
  • postType (61-61)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Summary

Comment on lines +73 to +76
playwright-report/*
vendor/bin/.phpunit.result.cache

vendor/bin/.phpunit.result.cache
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove duplicate and redundant entries.

There are issues with this section:

  1. vendor/bin/.phpunit.result.cache is duplicated on lines 74 and 76.
  2. playwright-report/* on line 73 is redundant since /playwright-report/ already exists on line 64.

Apply this diff to clean up:

 test-results/*
-playwright-report/*
-vendor/bin/.phpunit.result.cache
-
 vendor/bin/.phpunit.result.cache

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In .gitignore around lines 73 to 76, remove the duplicate and redundant entries:
delete the duplicated vendor/bin/.phpunit.result.cache line and remove the
playwright-report/* entry because /playwright-report/ is already present
earlier; ensure only one vendor/bin/.phpunit.result.cache remains (if needed)
and no duplicate or redundant patterns are left in that section.

Comment on lines +14 to +34
// Get the package.json version for the asset files
const packageJson = require( './package.json' );
const version = packageJson.version || '1.0.0';

// Generate .asset.php for each JS entry point
for ( const [entryName, entrypoint] of compilation.entrypoints ) {
// Only generate asset.php for entries that produce JS files
if ( assets[ entryName + '.js' ] ) {
// Collect dependencies (this is a simplified version)
const dependencies = [];

// Add common WordPress dependencies based on file type
if ( entryName.includes( 'admin' ) ) {
dependencies.push( 'wp-element', 'wp-components', 'wp-i18n' );
}
if ( entryName.includes( 'block' ) || entryName.includes( 'editor' ) ) {
dependencies.push( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components' );
}

// Default dependencies for all JS files
dependencies.push( 'wp-polyfill' );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix duplicate dependencies and cache package.json read.

Several issues with the dependency generation logic:

  1. Duplicate dependencies: If an entry name contains both admin and block/editor, dependencies like wp-element and wp-components will be added twice.
  2. Package.json loaded on every compilation: Move require('./package.json') outside the hook for better performance.

Apply this diff:

+// Cache package.json read
+const packageJson = require( './package.json' );
+
 // Custom plugin to generate .asset.php files like wp-scripts
 class AssetPhpPlugin {
 	apply( compiler ) {
 		compiler.hooks.compilation.tap( 'AssetPhpPlugin', ( compilation ) => {
 			compilation.hooks.processAssets.tap(
 				{
 					name: 'AssetPhpPlugin',
 					stage: compilation.constructor.PROCESS_ASSETS_STAGE_ADDITIONAL,
 				},
 				( assets ) => {
-					// Get the package.json version for the asset files
-					const packageJson = require( './package.json' );
 					const version = packageJson.version || '1.0.0';

 					// Generate .asset.php for each JS entry point
 					for ( const [entryName, entrypoint] of compilation.entrypoints ) {
 						// Only generate asset.php for entries that produce JS files
 						if ( assets[ entryName + '.js' ] ) {
-							// Collect dependencies (this is a simplified version)
-							const dependencies = [];
+							// Collect dependencies using Set to avoid duplicates
+							const dependencies = new Set();
 							
 							// Add common WordPress dependencies based on file type
 							if ( entryName.includes( 'admin' ) ) {
-								dependencies.push( 'wp-element', 'wp-components', 'wp-i18n' );
+								[ 'wp-element', 'wp-components', 'wp-i18n' ].forEach( d => dependencies.add( d ) );
 							}
 							if ( entryName.includes( 'block' ) || entryName.includes( 'editor' ) ) {
-								dependencies.push( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components' );
+								[ 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components' ].forEach( d => dependencies.add( d ) );
 							}
 							
 							// Default dependencies for all JS files
-							dependencies.push( 'wp-polyfill' );
+							dependencies.add( 'wp-polyfill' );

 							// Generate the PHP content in WordPress format
-							const assetContent = `<?php return array('dependencies' => array(${dependencies.map(dep => `'${dep}'`).join(', ')}), 'version' => '${version}');`;
+							const depsArray = Array.from( dependencies );
+							const assetContent = `<?php return array('dependencies' => array(${depsArray.map(dep => `'${dep}'`).join(', ')}), 'version' => '${version}');`;

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In .webpack.assets.config.js around lines 14 to 34, the code currently requires
./package.json inside the compilation hook and pushes duplicate dependencies
when an entry name matches multiple conditions; move the package.json require to
the module top-level (once) and read version with a fallback there, and change
dependency accumulation to dedupe before writing (e.g., use a Set or filter
duplicates) so entries that match both 'admin' and 'block'/'editor' do not
include repeated wp-element/wp-components entries.

Comment on lines +78 to +99
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: [ '@babel/preset-env' ],
},
},
},
{
test: /\.s?css$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
'postcss-loader',
'sass-loader',
],
},
],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if postcss config exists
echo "=== Checking for PostCSS config ==="
find . -maxdepth 2 -type f \( -name "postcss.config.*" \)

# Check if any JS files use JSX syntax or React
echo -e "\n=== Checking for React/JSX usage in source files ==="
if [ -d "src" ]; then
  rg "import.*from ['\"]react" src/ --type js 2>/dev/null | head -10 || true
  rg "import.*from ['\"]@wordpress/element" src/ --type js 2>/dev/null | head -10 || true
  echo -e "\n=== Checking for JSX syntax patterns ==="
  rg "<[A-Z][a-zA-Z0-9]*[^>]*>" src/ --type js 2>/dev/null | head -10 || true
fi

# Also check in root and other likely locations
echo -e "\n=== Checking webpack config file ==="
ls -la .webpack.assets.config.js 2>/dev/null || echo "File not found at root"

# Check package.json for postcss dependency
echo -e "\n=== Checking for postcss in package.json ==="
if [ -f "package.json" ]; then
  rg "postcss" package.json || echo "No postcss found in package.json"
fi

Repository: lightspeedwp/tour-operator

Length of output: 1869


Add postcss.config.js and @babel/preset-react to fix build failures.

The current webpack configuration will fail on build:

  • postcss-loader is configured but postcss.config.js does not exist, and postcss is missing from package.json. This will cause PostCSS processing to fail.
  • JSX is used extensively in React components (e.g., src/blocks/sticky-menu/, src/blocks/modal-button/, src/blocks/icons/) and in @wordpress/element hooks, but @babel/preset-react is not in the babel-loader presets. JSX will not transpile correctly without it.

Add @babel/preset-react to the presets array, create postcss.config.js, and add postcss to package.json dependencies.

🤖 Prompt for AI Agents
In .webpack.assets.config.js around lines 78 to 99 the webpack rules use
postcss-loader but there is no postcss config or dependency and the babel-loader
presets omit JSX support; add '@babel/preset-react' to the presets array in this
file so JSX is transpiled, create a top-level postcss.config.js (exporting the
needed plugins like autoprefixer or an empty plugins array) and add 'postcss' to
package.json dependencies (and install it) so postcss-loader has the runtime;
after these changes run the build to verify loaders and presets are applied.

Comment on lines +107 to +112
resolve: {
alias: {
'@utils': path.resolve( __dirname, 'src/js/utils' ),
},
},
}; No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Add newline at end of file.

The resolve configuration with @utils alias is useful. However, the file is missing a trailing newline which is a common convention for text files.

 	resolve: {
 		alias: {
 			'@utils': path.resolve( __dirname, 'src/js/utils' ),
 		},
 	},
 };
+
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
resolve: {
alias: {
'@utils': path.resolve( __dirname, 'src/js/utils' ),
},
},
};
resolve: {
alias: {
'@utils': path.resolve( __dirname, 'src/js/utils' ),
},
},
};
🤖 Prompt for AI Agents
In .webpack.assets.config.js around lines 107 to 112 the file ends immediately
after the resolve block and is missing a trailing newline; add a single newline
character at the end of the file (ensure the file ends with a blank
line/linefeed) and save so the file terminates with a newline.

@@ -1 +1 @@
!function(){"use strict";var t,e={2842:function(){var t=window.wp.blocks,e=window.wp.blockEditor,o=window.wp.i18n,r=window.wp.data,i=window.wp.element,n=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"lsx-tour-operator/sticky-menu","version":"1.0.0","title":"Sticky Menu","category":"lsx-tour-operator","icon":"menu","description":"A sticky navigation menu that links to sections on the page","supports":{"html":false,"anchor":true,"align":["wide","full"],"color":{"background":true},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"textAlign":true,"lineHeight":true}},"attributes":{"position":{"type":"string","default":"top"},"menuItems":{"type":"array","default":[]}},"textdomain":"tour-operator","editorScript":["file:./index.js","file:./sticky-menu-editor-extension.js"],"style":"file:./style-index.css","viewScript":"file:./view.js"}'),a=window.ReactJSXRuntime,s=t=>{const{attributes:{customActiveBackgroundColor:r,customActiveTextColor:i,customHoverBackgroundColor:n,customHoverTextColor:s},setAttributes:l,clientId:c}=t,d=(0,e.__experimentalUseMultipleOriginColorsAndGradients)();return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(e.InspectorControls,{group:"color",children:(0,a.jsx)(e.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,o.__)("Active Background Color","tour-operator"),colorValue:r,onColorChange:t=>{l({customActiveBackgroundColor:t})}},{label:(0,o.__)("Active Text Color","tour-operator"),colorValue:i,onColorChange:t=>{l({customActiveTextColor:t})}},{label:(0,o.__)("Hover Background Color","tour-operator"),colorValue:n,onColorChange:t=>{l({customHoverBackgroundColor:t})}},{label:(0,o.__)("Hover Text Color","tour-operator"),colorValue:s,onColorChange:t=>{l({customHoverTextColor:t})}}],panelId:c,hasColorsOrGradients:!1,disableCustomColors:!1,__experimentalIsRenderedInSidebar:!0,...d})})})};(0,t.registerBlockType)(n.name,{...n,edit:function({attributes:t,setAttributes:n,clientId:l}){const{backgroundColor:c,textColor:d,menuItems:u=[],customActiveBackgroundColor:p,customActiveTextColor:m,customHoverBackgroundColor:g,customHoverTextColor:h}=t,v=(0,e.useBlockProps)({style:{"--active-bg-color":p||void 0,"--active-text-color":m||void 0,"--hover-bg-color":g||void 0,"--hover-text-color":h||void 0}}),x={paddingTop:v.style?.paddingTop,paddingRight:v.style?.paddingRight,paddingBottom:v.style?.paddingBottom,paddingLeft:v.style?.paddingLeft},b={...v.style,paddingTop:void 0,paddingRight:void 0,paddingBottom:void 0,paddingLeft:void 0},f=(0,r.useSelect)(t=>t(e.store).getBlocks(),[]);return(0,i.useEffect)(()=>{const t=setTimeout(()=>{const t=e=>{let o=[];return e.forEach(e=>{if("core/group"===e.name&&"section"===e.attributes.tagName&&e.attributes.addToStickyMenu&&e.attributes.anchor&&""!==e.attributes.anchor.trim()){const t=e.attributes.anchor,r=e.attributes.metadata?.name||t;o.push({id:t,title:r})}e.innerBlocks&&e.innerBlocks.length>0&&(o=o.concat(t(e.innerBlocks)))}),o},e=t(f);u.map(t=>`${t.id}:${t.title}`).sort().join("|")!==e.map(t=>`${t.id}:${t.title}`).sort().join("|")&&n({menuItems:e})},100);return()=>clearTimeout(t)},[f,u,n]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s,{attributes:t,setAttributes:n,clientId:l}),(0,a.jsx)("div",{...v,style:b,children:(0,a.jsx)("nav",{className:"lsx-to-sticky-menu-nav","aria-label":(0,o.__)("Page section navigation","tour-operator"),children:u.length>0?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("ul",{className:"lsx-to-sticky-menu-list","aria-label":(0,o.__)("Page sections","tour-operator"),children:u.map(t=>(0,a.jsx)("li",{className:"lsx-to-sticky-menu-item",children:(0,a.jsx)("a",{className:"lsx-to-sticky-menu-button",href:`#${t.id}`,"aria-current":"false","aria-label":(0,o.__)("Navigate to %s section","tour-operator").replace("%s",t.title),style:x,children:t.title})},t.id))})}):(0,a.jsxs)("div",{className:"lsx-to-sticky-menu-placeholder",children:[(0,a.jsx)("p",{children:(0,o.__)('Add section groups with "Add to Sticky Menu" enabled to populate this menu.',"tour-operator")}),(0,a.jsxs)("details",{style:{fontSize:"11px",color:"#666",marginTop:"8px"},children:[(0,a.jsx)("summary",{children:(0,o.__)("How to add menu items","tour-operator")}),(0,a.jsxs)("ol",{style:{marginLeft:"16px",lineHeight:"1.4"},children:[(0,a.jsx)("li",{children:(0,o.__)('Add a Group block and set HTML element to "section"',"tour-operator")}),(0,a.jsx)("li",{children:(0,o.__)("Set an HTML Anchor in Block Settings → Advanced","tour-operator")}),(0,a.jsx)("li",{children:(0,o.__)("Name the block in the List View or toolbar","tour-operator")}),(0,a.jsx)("li",{children:(0,o.__)('Enable "Add to Sticky Menu" in the block sidebar',"tour-operator")}),(0,a.jsx)("li",{children:(0,o.__)("The menu will automatically populate with the block name and anchor","tour-operator")})]})]})]})})})]})},save:function({attributes:t}){const{backgroundColor:r,textColor:i,menuItems:n=[],customActiveBackgroundColor:s,customActiveTextColor:l,customHoverBackgroundColor:c,customHoverTextColor:d}=t,u=e.useBlockProps.save({style:{"--active-bg-color":s||void 0,"--active-text-color":l||void 0,"--hover-bg-color":c||void 0,"--hover-text-color":d||void 0}}),p={paddingTop:u.style?.paddingTop,paddingRight:u.style?.paddingRight,paddingBottom:u.style?.paddingBottom,paddingLeft:u.style?.paddingLeft},m={...u.style,paddingTop:void 0,paddingRight:void 0,paddingBottom:void 0,paddingLeft:void 0};return(0,a.jsx)("div",{...u,style:m,children:(0,a.jsx)("nav",{className:"lsx-to-sticky-menu-nav","aria-label":(0,o.__)("Page section navigation","tour-operator"),children:n.length>0&&(0,a.jsx)("ul",{className:"lsx-to-sticky-menu-list","aria-label":(0,o.__)("Page sections","tour-operator"),children:n.map(t=>(0,a.jsx)("li",{className:"lsx-to-sticky-menu-item","data-section-id":t.id,children:(0,a.jsx)("a",{className:"lsx-to-sticky-menu-button",href:`#${t.id}`,"data-section-id":t.id,"aria-current":"false",style:p,children:t.title})},t.id))})})})}})}},o={};function r(t){var i=o[t];if(void 0!==i)return i.exports;var n=o[t]={exports:{}};return e[t](n,n.exports,r),n.exports}r.m=e,t=[],r.O=function(e,o,i,n){if(!o){var a=1/0;for(d=0;d<t.length;d++){o=t[d][0],i=t[d][1],n=t[d][2];for(var s=!0,l=0;l<o.length;l++)(!1&n||a>=n)&&Object.keys(r.O).every(function(t){return r.O[t](o[l])})?o.splice(l--,1):(s=!1,n<a&&(a=n));if(s){t.splice(d--,1);var c=i();void 0!==c&&(e=c)}}return e}n=n||0;for(var d=t.length;d>0&&t[d-1][2]>n;d--)t[d]=t[d-1];t[d]=[o,i,n]},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){var t={5738:0,4830:0};r.O.j=function(e){return 0===t[e]};var e=function(e,o){var i,n,a=o[0],s=o[1],l=o[2],c=0;if(a.some(function(e){return 0!==t[e]})){for(i in s)r.o(s,i)&&(r.m[i]=s[i]);if(l)var d=l(r)}for(e&&e(o);c<a.length;c++)n=a[c],r.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return r.O(d)},o=self.webpackChunktour_operator=self.webpackChunktour_operator||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))}();var i=r.O(void 0,[4830],function(){return r(2842)});i=r.O(i)}(); No newline at end of file
!function(){"use strict";var t,e={560:function(){var t=window.wp.blocks,e=window.wp.blockEditor,o=window.wp.i18n,r=window.wp.data,i=window.wp.element,n=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"lsx-tour-operator/sticky-menu","version":"1.0.0","title":"Sticky Menu","category":"lsx-tour-operator","icon":"menu","description":"A sticky navigation menu that links to sections on the page","supports":{"html":false,"anchor":true,"align":["wide","full"],"color":{"background":true},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"textAlign":true,"lineHeight":true}},"attributes":{"position":{"type":"string","default":"top"},"menuItems":{"type":"array","default":[]}},"textdomain":"tour-operator","editorScript":["file:./index.js","file:./sticky-menu-editor-extension.js"],"style":"file:./style-index.css","viewScript":"file:./view.js"}'),a=window.ReactJSXRuntime,s=t=>{const{attributes:{customActiveBackgroundColor:r,customActiveTextColor:i,customHoverBackgroundColor:n,customHoverTextColor:s},setAttributes:l,clientId:c}=t,d=(0,e.__experimentalUseMultipleOriginColorsAndGradients)();return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(e.InspectorControls,{group:"color",children:(0,a.jsx)(e.__experimentalColorGradientSettingsDropdown,{settings:[{label:(0,o.__)("Active Background Color","tour-operator"),colorValue:r,onColorChange:t=>{l({customActiveBackgroundColor:t})}},{label:(0,o.__)("Active Text Color","tour-operator"),colorValue:i,onColorChange:t=>{l({customActiveTextColor:t})}},{label:(0,o.__)("Hover Background Color","tour-operator"),colorValue:n,onColorChange:t=>{l({customHoverBackgroundColor:t})}},{label:(0,o.__)("Hover Text Color","tour-operator"),colorValue:s,onColorChange:t=>{l({customHoverTextColor:t})}}],panelId:c,hasColorsOrGradients:!1,disableCustomColors:!1,__experimentalIsRenderedInSidebar:!0,...d})})})};(0,t.registerBlockType)(n.name,{...n,edit:function({attributes:t,setAttributes:n,clientId:l}){const{backgroundColor:c,textColor:d,menuItems:u=[],customActiveBackgroundColor:p,customActiveTextColor:m,customHoverBackgroundColor:g,customHoverTextColor:h}=t,v=(0,e.useBlockProps)({style:{"--active-bg-color":p||void 0,"--active-text-color":m||void 0,"--hover-bg-color":g||void 0,"--hover-text-color":h||void 0}}),x={paddingTop:v.style?.paddingTop,paddingRight:v.style?.paddingRight,paddingBottom:v.style?.paddingBottom,paddingLeft:v.style?.paddingLeft},b={...v.style,paddingTop:void 0,paddingRight:void 0,paddingBottom:void 0,paddingLeft:void 0},f=(0,r.useSelect)(t=>t(e.store).getBlocks(),[]);return(0,i.useEffect)(()=>{const t=setTimeout(()=>{const t=e=>{let o=[];return e.forEach(e=>{if("core/group"===e.name&&"section"===e.attributes.tagName&&e.attributes.addToStickyMenu&&e.attributes.anchor&&""!==e.attributes.anchor.trim()){const t=e.attributes.anchor,r=e.attributes.metadata?.name||t;o.push({id:t,title:r})}e.innerBlocks&&e.innerBlocks.length>0&&(o=o.concat(t(e.innerBlocks)))}),o},e=t(f);u.map(t=>`${t.id}:${t.title}`).sort().join("|")!==e.map(t=>`${t.id}:${t.title}`).sort().join("|")&&n({menuItems:e})},100);return()=>clearTimeout(t)},[f,u,n]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s,{attributes:t,setAttributes:n,clientId:l}),(0,a.jsx)("div",{...v,style:b,children:(0,a.jsx)("nav",{className:"lsx-to-sticky-menu-nav","aria-label":(0,o.__)("Page section navigation","tour-operator"),children:u.length>0?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("ul",{className:"lsx-to-sticky-menu-list","aria-label":(0,o.__)("Page sections","tour-operator"),children:u.map(t=>(0,a.jsx)("li",{className:"lsx-to-sticky-menu-item",children:(0,a.jsx)("a",{className:"lsx-to-sticky-menu-button",href:`#${t.id}`,"aria-current":"false","aria-label":(0,o.__)("Navigate to %s section","tour-operator").replace("%s",t.title),style:x,children:t.title})},t.id))})}):(0,a.jsxs)("div",{className:"lsx-to-sticky-menu-placeholder",children:[(0,a.jsx)("p",{children:(0,o.__)('Add section groups with "Add to Sticky Menu" enabled to populate this menu.',"tour-operator")}),(0,a.jsxs)("details",{style:{fontSize:"11px",color:"#666",marginTop:"8px"},children:[(0,a.jsx)("summary",{children:(0,o.__)("How to add menu items","tour-operator")}),(0,a.jsxs)("ol",{style:{marginLeft:"16px",lineHeight:"1.4"},children:[(0,a.jsx)("li",{children:(0,o.__)('Add a Group block and set HTML element to "section"',"tour-operator")}),(0,a.jsx)("li",{children:(0,o.__)("Set an HTML Anchor in Block Settings → Advanced","tour-operator")}),(0,a.jsx)("li",{children:(0,o.__)("Name the block in the List View or toolbar","tour-operator")}),(0,a.jsx)("li",{children:(0,o.__)('Enable "Add to Sticky Menu" in the block sidebar',"tour-operator")}),(0,a.jsx)("li",{children:(0,o.__)("The menu will automatically populate with the block name and anchor","tour-operator")})]})]})]})})})]})},save:function({attributes:t}){const{backgroundColor:r,textColor:i,menuItems:n=[],customActiveBackgroundColor:s,customActiveTextColor:l,customHoverBackgroundColor:c,customHoverTextColor:d}=t,u=e.useBlockProps.save({style:{"--active-bg-color":s||void 0,"--active-text-color":l||void 0,"--hover-bg-color":c||void 0,"--hover-text-color":d||void 0}}),p={paddingTop:u.style?.paddingTop,paddingRight:u.style?.paddingRight,paddingBottom:u.style?.paddingBottom,paddingLeft:u.style?.paddingLeft},m={...u.style,paddingTop:void 0,paddingRight:void 0,paddingBottom:void 0,paddingLeft:void 0};return(0,a.jsx)("div",{...u,style:m,children:(0,a.jsx)("nav",{className:"lsx-to-sticky-menu-nav","aria-label":(0,o.__)("Page section navigation","tour-operator"),children:n.length>0&&(0,a.jsx)("ul",{className:"lsx-to-sticky-menu-list","aria-label":(0,o.__)("Page sections","tour-operator"),children:n.map(t=>(0,a.jsx)("li",{className:"lsx-to-sticky-menu-item","data-section-id":t.id,children:(0,a.jsx)("a",{className:"lsx-to-sticky-menu-button",href:`#${t.id}`,"data-section-id":t.id,"aria-current":"false",style:p,children:t.title})},t.id))})})})}})}},o={};function r(t){var i=o[t];if(void 0!==i)return i.exports;var n=o[t]={exports:{}};return e[t](n,n.exports,r),n.exports}r.m=e,t=[],r.O=function(e,o,i,n){if(!o){var a=1/0;for(d=0;d<t.length;d++){o=t[d][0],i=t[d][1],n=t[d][2];for(var s=!0,l=0;l<o.length;l++)(!1&n||a>=n)&&Object.keys(r.O).every(function(t){return r.O[t](o[l])})?o.splice(l--,1):(s=!1,n<a&&(a=n));if(s){t.splice(d--,1);var c=i();void 0!==c&&(e=c)}}return e}n=n||0;for(var d=t.length;d>0&&t[d-1][2]>n;d--)t[d]=t[d-1];t[d]=[o,i,n]},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){var t={5738:0,4830:0};r.O.j=function(e){return 0===t[e]};var e=function(e,o){var i,n,a=o[0],s=o[1],l=o[2],c=0;if(a.some(function(e){return 0!==t[e]})){for(i in s)r.o(s,i)&&(r.m[i]=s[i]);if(l)var d=l(r)}for(e&&e(o);c<a.length;c++)n=a[c],r.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return r.O(d)},o=self.webpackChunktour_operator=self.webpackChunktour_operator||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))}();var i=r.O(void 0,[4830],function(){return r(560)});i=r.O(i)}(); No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Sticky menu bundle looks functionally unchanged; consider reducing inline styles at the source

The bundled block code keeps a good semantic and accessible structure (nav with labelled lists and descriptive link labels), and per the PR summary this is effectively just webpack/module wiring with no behavioural changes.

Upstream, the source for this bundle uses several repeated inline style objects (e.g. font size, colour, margins for helper text and placeholders). When you next touch the source block code, consider moving those into classes backed by theme.json design tokens rather than inline styles to better align with your design system.

🤖 Prompt for AI Agents
In build/blocks/sticky-menu/index.js around line 1, the bundle contains repeated
inline style objects used for placeholder/helper text (fontSize, color, margin,
padding, etc.); update the original source block (not the generated bundle) to
replace these inline style objects with semantic class names, add corresponding
CSS rules that reference theme.json design tokens (spacing, typography, color)
and remove the inline style usage, then rebuild the block bundle so the
generated file no longer contains those inline style literals.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
package.json (1)

71-71: ⚠️ Cross-platform compatibility issue with rm -R persists.

The rm -R command in the build:mopo script is not available on Windows and will break on that platform. This issue was previously flagged and remains unresolved.

Consider using a cross-platform alternative such as:

-    "build:mopo": "rm -R languages/tour-operator-en_EN.mo && cp languages/tour-operator.pot languages/tour-operator-en_EN.po && wp i18n make-mo languages",
+    "build:mopo": "rimraf languages/tour-operator-en_EN.mo && cp languages/tour-operator.pot languages/tour-operator-en_EN.po && wp i18n make-mo languages",

Add rimraf as a devDependency and use it in place of rm -R to support Windows, macOS, and Linux development environments.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 15565c6 and 9bdde62.

📒 Files selected for processing (1)
  • package.json (4 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{json,php,js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/instructions/review.instructions.md)

Woo patterns respect constraints

Files:

  • package.json
**/*.{php,js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (GEMINI.md)

Follow WordPress Coding Standards including proper namespacing, security practices (sanitization/escaping), and code organization

Files:

  • package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Summary
🔇 Additional comments (3)
package.json (3)

33-35: Verify @babel/preset-react version pinning is intentional.

The version of @babel/preset-react has been changed from ^7.28.5 (caret) to 7.28.5 (pinned). This locks the preset to a specific version, preventing patch and minor updates. Ensure this doesn't prevent bug fixes or security updates in future maintenance.


66-69: Verify the new modular build pipeline works end-to-end.

The build system has been restructured into modular build:blocks and build:assets steps. Ensure:

  • Both commands execute successfully in sequence on Node.js 24.11.0
  • The .webpack.assets.config.js config correctly outputs .asset.php files as referenced in PR objectives
  • Error handling is appropriate if either build step fails
  • Local testing confirms npm run build produces all expected outputs (blocks and assets)

The PR objectives mention local testing was completed, but verify this on a clean checkout.


46-46: webpack-cli@6.0.1 is compatible with the build pipeline.

The replacement of webpack-remove-empty-scripts with webpack-cli@6.0.1 is properly configured. The new .webpack.assets.config.js file correctly implements webpack hooks to generate .asset.php files, and all loaders (babel-loader@10.0.0, css-loader@7.1.2, sass-loader@16.0.6) are compatible with webpack 5.x, which is bundled with webpack-cli@6.0.1. The build:assets command will function as intended.

@github-project-automation github-project-automation bot moved this to Needs Triage in Tour Operator Dec 2, 2025
@krugazul krugazul added the release:patch Backwards‑compatible bug fixes requiring a PATCH version bump label Dec 2, 2025
@krugazul krugazul moved this from Needs Triage to 🏗️ In Progress in Tour Operator Dec 2, 2025
@krugazul krugazul added this to the v2.1.0 milestone Dec 2, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
build/blocks/banner-cover/block.json (1)

28-28: [Addressed by src file review]

This is the compiled build output corresponding to src/blocks/banner-cover/block.json. The same post-meta key consistency and migration concerns apply; see the review comment on the source file.

package.json (1)

64-64: Address cross-platform compatibility for build:mopo script.

The rm -R command is POSIX-only and will fail on Windows. Replace with a cross-platform alternative such as rimraf.

Add rimraf to devDependencies and update the script:

-    "build:mopo": "rm -R languages/tour-operator-en_EN.mo && cp languages/tour-operator.pot languages/tour-operator-en_EN.po && wp i18n make-mo languages",
+    "build:mopo": "rimraf languages/tour-operator-en_EN.mo && cp languages/tour-operator.pot languages/tour-operator-en_EN.po && wp i18n make-mo languages",

Then ensure rimraf is added to the devDependencies section.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4c7e2aa and 09e23bc.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • build/blocks/banner-cover/block.json (1 hunks)
  • package.json (3 hunks)
  • src/blocks/banner-cover/block.json (1 hunks)
  • webpack.config.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (16)
**/*.{css,scss,less,jsx,tsx,js,ts}

📄 CodeRabbit inference engine (.github/instructions/patterns.instructions.md)

Use design tokens via theme.json; avoid inline styles when possible

Files:

  • webpack.config.js
**/*.{css,scss,less,js,jsx,ts,tsx,vue}

📄 CodeRabbit inference engine (.github/instructions/performance.instructions.md)

Minimise DOM depth; prefer CSS utilities/presets over custom CSS

Files:

  • webpack.config.js
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/instructions/performance.instructions.md)

Defer non-critical JavaScript; avoid synchronous blocking

Use semicolons to terminate statements in JavaScript block code

Ensure all generated code follows ESLint rules and WordPress Coding Standards before deployment

Files:

  • webpack.config.js
**/*.{css,scss,less,js,jsx,ts,tsx,vue,md}

📄 CodeRabbit inference engine (.github/instructions/performance.instructions.md)

Avoid large images in patterns; recommend responsive sizes and lazy loading

Files:

  • webpack.config.js
**/*.{js,jsx,ts,tsx,css,scss}

📄 CodeRabbit inference engine (.github/instructions/review.instructions.md)

No inline CSS; use theme.json tokens only

Files:

  • webpack.config.js
**/*.{json,php,js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/instructions/review.instructions.md)

Woo patterns respect constraints

Files:

  • webpack.config.js
  • build/blocks/banner-cover/block.json
  • src/blocks/banner-cover/block.json
  • package.json
**/*.{php,js,ts,jsx,tsx,vue}

📄 CodeRabbit inference engine (.github/instructions/reviews.instructions.md)

Verify input is properly escaped and sanitized, security capabilities/nonce checks are in place

Files:

  • webpack.config.js
**/*.{js,ts,jsx,tsx,css,scss,sass}

📄 CodeRabbit inference engine (.github/instructions/reviews.instructions.md)

Avoid heavy re-renders, minimize CSS/JS payload, and implement lazy-loading where possible

Files:

  • webpack.config.js
**/*.{js,ts,jsx,tsx,php,py,java,go,rb}

📄 CodeRabbit inference engine (.github/instructions/reviews.instructions.md)

Verify CI pipeline is passing and no TODO comments are left in code before release

Files:

  • webpack.config.js
**/*.{php,js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (GEMINI.md)

Follow WordPress Coding Standards including proper namespacing, security practices (sanitization/escaping), and code organization

Files:

  • webpack.config.js
  • build/blocks/banner-cover/block.json
  • src/blocks/banner-cover/block.json
  • package.json
**/*.{js,jsx,ts,tsx,php}

📄 CodeRabbit inference engine (GEMINI.md)

Implement accessibility features following WCAG 2.2 AA standards in all block components and patterns

Files:

  • webpack.config.js
**/*.{php,js,jsx,ts,tsx}

📄 CodeRabbit inference engine (GEMINI.md)

Validate generated code against WordPress standards, test thoroughly, check security implications, and review for proper sanitization/escaping

Files:

  • webpack.config.js
**/*.{js,jsx,ts,tsx,php,scss,css}

📄 CodeRabbit inference engine (GEMINI.md)

Use camelCase for variable and function names, kebab-case for CSS classes, and snake_case for PHP variable names per WordPress Coding Standards

Files:

  • webpack.config.js
**/*.{js,jsx,ts,tsx,scss,css}

📄 CodeRabbit inference engine (GEMINI.md)

For performance optimization, implement code splitting, lazy loading, and minimize CSS/JavaScript bundle sizes in block components

Files:

  • webpack.config.js
**/block.json

📄 CodeRabbit inference engine (CLAUDE.md)

**/block.json: Gutenberg blocks must include complete block.json with proper metadata configuration
Block JSON files should include all required metadata fields and follow WordPress block editor specifications

Files:

  • build/blocks/banner-cover/block.json
  • src/blocks/banner-cover/block.json
**/*block.json

📄 CodeRabbit inference engine (GEMINI.md)

**/*block.json: Use theme.json tokens for colors, typography, spacing, and other design tokens in Gutenberg block styling
Generate Gutenberg blocks using complete working code including block.json metadata, Edit component, Save/render component, and styles
Configure block patterns and block metadata in block.json with proper selectors, keywords, categories, and rendering attributes

Files:

  • build/blocks/banner-cover/block.json
  • src/blocks/banner-cover/block.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Summary
🔇 Additional comments (4)
webpack.config.js (1)

5-5: Verify webpack-remove-empty-scripts is properly handled per PR objectives.

The code still imports webpack-remove-empty-scripts, but the PR objectives state this plugin is "removed" and "replaced by webpack-cli". Clarify whether:

  • This dependency remains intentional and the PR description needs updating, or
  • This import should be removed as part of the refactoring.

Check if webpack-remove-empty-scripts is still listed in package.json devDependencies and confirm whether the import on Line 5 should be retained or removed.

src/blocks/banner-cover/block.json (1)

25-25: Verify post-meta key alignment and data migration strategy.

The metadata binding key changed from "banner_image" to "banner". Ensure that:

  • Posts are saved with the new post-meta key "banner" (not the old "banner_image").
  • A migration strategy exists for existing posts to prevent data loss or broken banner images.
package.json (2)

33-33: Verify @babel/preset-react caret notation.

The PR objectives mention "removed caret from @babel/preset-react", but line 33 shows the caret is still present: "@babel/preset-react": "^7.28.5". Confirm whether:

  • This should be "@babel/preset-react": "7.28.5" (caret removed), or
  • The PR description is inaccurate and the caret should remain.

21-24: Node.js 24.11.0 constraint acknowledged.

The engines field specifies Node.js >=24.11.0, which is stricter than the project's dependency requirements. Per the previous review discussion, you have confirmed intent to use the latest Node.js version. This is acceptable provided:

  • Your CI/build pipeline validates compatibility, and
  • Migration documentation clearly instructs developers to upgrade to Node.js >=24.11.0.

Ensure migration notes in your PR description or CONTRIBUTING guide reflect this requirement.

"prettier": "3.7.3",
"stylelint": "16.26.1",
"webpack-cli": "6.0.1",
"webpack-remove-empty-scripts": "^1.1.1"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Check webpack.config.js for webpack-remove-empty-scripts import/usage
fd -e js -e ts -e mjs | grep -E "(webpack\.config|webpack)" | head -20

Repository: lightspeedwp/tour-operator

Length of output: 87


🏁 Script executed:

# Search for webpack-remove-empty-scripts usage across the codebase
rg "webpack-remove-empty-scripts" -A 3 -B 3

Repository: lightspeedwp/tour-operator

Length of output: 1592


🏁 Script executed:

# Check package.json to see the exact devDependencies
cat -n package.json | sed -n '45,55p'

Repository: lightspeedwp/tour-operator

Length of output: 522


Resolve webpack-remove-empty-scripts inconsistency.

The package webpack-remove-empty-scripts remains in devDependencies (line 50) and is actively imported in webpack.config.js (line 5). If PR objectives stated this package was "removed (replaced by webpack-cli)", the code does not reflect that removal. Clarify whether:

  • The dependency should be removed entirely (along with the webpack.config.js import), or
  • The PR description should be updated to reflect that the package remains in use.
🤖 Prompt for AI Agents
In package.json at line 50 and webpack.config.js around line 5, the
devDependency "webpack-remove-empty-scripts" is present but the PR claims it was
removed; decide which path to take and make consistent: if you intend to remove
the package, delete the "webpack-remove-empty-scripts" entry from
devDependencies in package.json and remove its import/usage from
webpack.config.js (and update any build scripts referencing it); otherwise, keep
the package in package.json and update the PR description to state that the
package remains in use (and ensure webpack.config.js import stays), so the
dependency listing and PR message match.

@github-project-automation github-project-automation bot moved this from 🏗️ In Progress to Needs Triage in Tour Operator Dec 3, 2025
@krugazul krugazul added the area:infrastructure Infrastructure label Dec 3, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (2)
src/utils/conditional-block-registration.js (2)

19-25: Share registration state across handler invocations to avoid duplicated work.

Because registered and checking are declared inside conditionallyRegister, each call gets fresh flags and can schedule its own timeout/subscription. If the returned handler is ever invoked more than once, you can end up doing redundant work or accidentally re-registering.

Consider hoisting the flags into the createConditionalRegistration closure so all invocations of the returned handler share a single piece of state:

 export function createConditionalRegistration(config) {
     const {
         postTypes = [],
         templateSlugs = [],
         registerFunction,
         timeout = 100,
     } = config;
+
+    // Track registration state per conditional registration instance,
+    // not per invocation of the returned handler.
+    let registered = false;
+    let checking = false;
 
     if (!registerFunction || typeof registerFunction !== 'function') {
         throw new Error('registerFunction is required and must be a function');
     }
 
     return function conditionallyRegister() {
-        const { select } = wp.data;
-        let registered = false;
-        let checking = false;
+        const { select } = wp.data;
@@
-        const checkAndRegister = () => {
+        const checkAndRegister = () => {
             if (registered || checking) {
                 return registered;
             }

This keeps behaviour deterministic even if the handler is called multiple times in different places.

Also applies to: 31-35, 82-104


41-45: Align selector usage with defensive optional chaining on methods.

At present, getCurrentPostType/getEditedPostSlug are assumed to exist if select('core/editor') resolves, which can throw if those methods are missing. To make this more robust and consistent with src/js/blocks/slotfills.js, consider:

-        const shouldRegister = () => {
-            try {
-                const postType = select('core/editor')?.getCurrentPostType();
-                const postSlug = select('core/editor')?.getEditedPostSlug();
+        const shouldRegister = () => {
+            try {
+                const editorSelect = select('core/editor');
+                const postType = editorSelect?.getCurrentPostType?.();
+                const postSlug = editorSelect?.getEditedPostSlug?.();

This guards both the store and the selector methods themselves, avoiding surprises if the editor API changes.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 09e23bc and a00ea0a.

📒 Files selected for processing (1)
  • src/utils/conditional-block-registration.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (14)
**/*.{css,scss,less,jsx,tsx,js,ts}

📄 CodeRabbit inference engine (.github/instructions/patterns.instructions.md)

Use design tokens via theme.json; avoid inline styles when possible

Files:

  • src/utils/conditional-block-registration.js
**/*.{css,scss,less,js,jsx,ts,tsx,vue}

📄 CodeRabbit inference engine (.github/instructions/performance.instructions.md)

Minimise DOM depth; prefer CSS utilities/presets over custom CSS

Files:

  • src/utils/conditional-block-registration.js
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/instructions/performance.instructions.md)

Defer non-critical JavaScript; avoid synchronous blocking

Use semicolons to terminate statements in JavaScript block code

Ensure all generated code follows ESLint rules and WordPress Coding Standards before deployment

Files:

  • src/utils/conditional-block-registration.js
**/*.{css,scss,less,js,jsx,ts,tsx,vue,md}

📄 CodeRabbit inference engine (.github/instructions/performance.instructions.md)

Avoid large images in patterns; recommend responsive sizes and lazy loading

Files:

  • src/utils/conditional-block-registration.js
**/*.{js,jsx,ts,tsx,css,scss}

📄 CodeRabbit inference engine (.github/instructions/review.instructions.md)

No inline CSS; use theme.json tokens only

Files:

  • src/utils/conditional-block-registration.js
**/*.{json,php,js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/instructions/review.instructions.md)

Woo patterns respect constraints

Files:

  • src/utils/conditional-block-registration.js
**/*.{php,js,ts,jsx,tsx,vue}

📄 CodeRabbit inference engine (.github/instructions/reviews.instructions.md)

Verify input is properly escaped and sanitized, security capabilities/nonce checks are in place

Files:

  • src/utils/conditional-block-registration.js
**/*.{js,ts,jsx,tsx,css,scss,sass}

📄 CodeRabbit inference engine (.github/instructions/reviews.instructions.md)

Avoid heavy re-renders, minimize CSS/JS payload, and implement lazy-loading where possible

Files:

  • src/utils/conditional-block-registration.js
**/*.{js,ts,jsx,tsx,php,py,java,go,rb}

📄 CodeRabbit inference engine (.github/instructions/reviews.instructions.md)

Verify CI pipeline is passing and no TODO comments are left in code before release

Files:

  • src/utils/conditional-block-registration.js
**/*.{php,js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (GEMINI.md)

Follow WordPress Coding Standards including proper namespacing, security practices (sanitization/escaping), and code organization

Files:

  • src/utils/conditional-block-registration.js
**/*.{js,jsx,ts,tsx,php}

📄 CodeRabbit inference engine (GEMINI.md)

Implement accessibility features following WCAG 2.2 AA standards in all block components and patterns

Files:

  • src/utils/conditional-block-registration.js
**/*.{php,js,jsx,ts,tsx}

📄 CodeRabbit inference engine (GEMINI.md)

Validate generated code against WordPress standards, test thoroughly, check security implications, and review for proper sanitization/escaping

Files:

  • src/utils/conditional-block-registration.js
**/*.{js,jsx,ts,tsx,php,scss,css}

📄 CodeRabbit inference engine (GEMINI.md)

Use camelCase for variable and function names, kebab-case for CSS classes, and snake_case for PHP variable names per WordPress Coding Standards

Files:

  • src/utils/conditional-block-registration.js
**/*.{js,jsx,ts,tsx,scss,css}

📄 CodeRabbit inference engine (GEMINI.md)

For performance optimization, implement code splitting, lazy loading, and minimize CSS/JavaScript bundle sizes in block components

Files:

  • src/utils/conditional-block-registration.js
🧬 Code graph analysis (1)
src/utils/conditional-block-registration.js (1)
src/js/blocks/slotfills.js (1)
  • postType (61-61)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Summary
🔇 Additional comments (1)
src/utils/conditional-block-registration.js (1)

106-156: Conditional registration flow and cleanup look solid overall.

The combination of checkAndRegister, bounded retries, MAX_WAIT, and the cleanup helper gives a sensible lifecycle for the subscription, and the three helper exports are thin, readable wrappers around createConditionalRegistration. Aside from the smaller refinements noted elsewhere, the overall structure and control flow look good to ship.

Also applies to: 169-211

Comment on lines +12 to +15
* @param {string[]} config.postTypes - Array of post types that support the block
* @param {string[]} config.templateSlugs - Array of template slug patterns to match
* @param {Function} config.registerFunction - Function to call when conditions are met
* @param {number} [config.timeout=100] - Initial timeout before checking registration
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Update JSDoc types to reflect support for RegExp template patterns.

The implementation allows templateSlugs entries to be either string or RegExp, but the JSDoc only documents string[]. That can confuse consumers (and type-aware tooling).

Consider updating the annotations to match behaviour, for example:

- * @param {string[]} config.templateSlugs - Array of template slug patterns to match
+ * @param {(string|RegExp)[]} config.templateSlugs - Array of template slug patterns to match
@@
- * @param {string[]} templateSlugs - Array of template slug patterns
+ * @param {(string|RegExp)[]} templateSlugs - Array of template slug patterns
@@
- * @param {string[]} templateSlugs - Array of template slug patterns
+ * @param {(string|RegExp)[]} templateSlugs - Array of template slug patterns

This keeps the documentation honest and clearer for future maintainers.

Also applies to: 180-185, 197-200

🤖 Prompt for AI Agents
In src/utils/conditional-block-registration.js around lines 12-15 (also update
similar blocks at 180-185 and 197-200), the JSDoc for config.templateSlugs
currently documents string[] but the implementation accepts string or RegExp;
update the JSDoc types to reflect this (e.g. (string|RegExp)[] or
Array<string|RegExp>) and adjust any param descriptions to mention RegExp
support so type-aware tools and maintainers see the correct contract.

Comment on lines +114 to +137
// Maximum retries and wait time constants
const MAX_RETRIES = 50;
const MAX_WAIT = 30000; // 30 seconds

const cleanup = () => {
if (!unsubscribed) {
unsubscribed = true;
if (unsubscribe) {
unsubscribe();
}
if (timeoutId) {
clearTimeout(timeoutId);
timeoutId = null;
}
}
};

// Set up maximum wait timeout
timeoutId = setTimeout(() => {
console.warn(`Block registration timeout after ${MAX_WAIT}ms, unsubscribing`);
cleanup();
}, MAX_WAIT);

const unsubscribe = wp.data.subscribe(() => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Make cleanup resilient to future changes in unsubscribe timing.

cleanup closes over unsubscribe, which is declared afterwards. It’s safe today because cleanup only runs asynchronously, but this creates a subtle temporal coupling.

You can make this more robust by declaring unsubscribe before cleanup and assigning it later:

-                let unsubscribed = false;
-                let retryCount = 0;
-                let timeoutId = null;
+                let unsubscribed = false;
+                let retryCount = 0;
+                let timeoutId = null;
+                let unsubscribe;
@@
-                const cleanup = () => {
+                const cleanup = () => {
                     if (!unsubscribed) {
                         unsubscribed = true;
-                        if (unsubscribe) {
-                            unsubscribe();
-                        }
+                        if (typeof unsubscribe === 'function') {
+                            unsubscribe();
+                        }
@@
-                const unsubscribe = wp.data.subscribe(() => {
+                unsubscribe = wp.data.subscribe(() => {

This avoids any potential temporal-dead-zone footguns if the subscription semantics change in future.

Also applies to: 145-153

🤖 Prompt for AI Agents
In src/utils/conditional-block-registration.js around lines 114 to 137 (and
likewise lines 145–153), the cleanup function closes over unsubscribe which is
declared later causing a temporal coupling; fix by declaring let unsubscribe =
null (or undefined) before defining cleanup, then assign the actual unsubscribe
function returned by wp.data.subscribe afterwards, and ensure cleanup checks
unsubscribe truthiness before calling it and sets unsubscribe = null after
calling to avoid double calls.

@krugazul krugazul merged commit 79c71fc into 2.1-trunk Dec 3, 2025
2 of 3 checks passed
@krugazul krugazul deleted the hotfix/node-version-update branch December 3, 2025 06:04
@github-project-automation github-project-automation bot moved this from Needs Triage to ✅ Done in Tour Operator Dec 3, 2025
@github-actions github-actions bot added lang:php PHP code area:ci Build and CI pipelines area:dependencies Composer/npm dependency work lang:md Markdown content/docs lang:javascript status:needs-review Awaiting code review meta:needs-changelog Requires a changelog entry before merge labels Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Build and CI pipelines area:dependencies Composer/npm dependency work area:infrastructure Infrastructure lang:javascript lang:md Markdown content/docs lang:php PHP code meta:needs-changelog Requires a changelog entry before merge release:patch Backwards‑compatible bug fixes requiring a PATCH version bump status:needs-review Awaiting code review

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants