Skip to content

Enhance destination blocks with comprehensive metadata, icons integration, and conditional registration#697

Merged
krugazul merged 5 commits into2.1-trunkfrom
refactor/691-destination-blocks-meta-icons
Nov 12, 2025
Merged

Enhance destination blocks with comprehensive metadata, icons integration, and conditional registration#697
krugazul merged 5 commits into2.1-trunkfrom
refactor/691-destination-blocks-meta-icons

Conversation

@tibiii
Copy link
Copy Markdown
Contributor

@tibiii tibiii commented Nov 11, 2025


pr: '#691'
blocks:

  • additional-info
  • banking
  • climate
  • cuisine
  • dress
  • electricity
  • health
  • transport
    post_types:
  • destination
    author: '@tibibuzdu'
    labels: ['enhancement', 'blocks', 'frontend']

Summary

This PR implements GitHub issue #691 by enhancing destination-related blocks with comprehensive Block API v3 metadata standardization, centralized icon integration, and conditional registration logic. The changes focus on destination-specific blocks (additional-info, banking, climate, cuisine, dress, electricity, health, transport) while ensuring consistent user experience and proper Block Editor integration.

The conditional registration logic was extracted into a reusable utility module for better developer experience and easier maintainability across the codebase.

Key Changes

Block API v3 Compliance: Enhanced metadata with comprehensive descriptions, keywords, and examples
Icon System Integration: Replaced hardcoded icons with centralized lsx-tour-operator/icons system
Conditional Registration: Implemented destination-context awareness for appropriate block visibility
Enhanced Block Metadata: Added detailed descriptions, keywords, and comprehensive example configurations
Improved User Experience: Applied consistent formatting and proper localization throughout
Code Standardization: Refactored registration logic with better error handling and readiness checks
Reusable Utilities: Created shared conditional registration system for better maintainability

Files Modified

Scope

✅ PHP

  • No PHP backend changes required for this enhancement

✅ JS/Blocks

  • Block API v3 metadata compliance for all destination blocks
  • Comprehensive block.json updates with descriptions and keywords
  • Conditional registration for destination contexts
  • Icon system integration replacing hardcoded paths
  • Enhanced example configurations for editor previews
  • Proper localization with text domains
  • Reusable conditional registration utility

✅ Styles

  • Integrated with centralized icon system
  • Maintains visual consistency across blocks
  • Supports theme customization through Block Editor

⏳ Tests

  • Block registration tests (future enhancement)
  • Conditional display validation (future enhancement)

✅ Docs

  • Enhanced block descriptions for user guidance
  • Comprehensive examples in block.json files
  • Improved keywords for block discovery
  • Utility documentation with JSDoc comments

Technical Implementation

Enhanced Block Metadata Structure

{
  "apiVersion": 3,
  "description": "Display additional information content for destinations.",
  "keywords": ["additional", "information", "general", "details"],
  "example": {
    "attributes": {
      "metadata": { "name": "Additional Information" }
    },
    "innerBlocks": [/* Comprehensive example data */]
  }
}

Conditional Registration System

// Import and use the reusable utility
import { registerForPostTypesAndTemplates } from '@utils/conditional-block-registration.js';

// Register block conditionally for destination context
const conditionalRegister = registerForPostTypesAndTemplates(
  ['destination'], // Post types
  ['destination'], // Template patterns
  registerAdditionalInfoVariation // Registration function
);

wp.domReady(conditionalRegister);

Centralized Utility Functions

// Utility provides multiple registration patterns:
// - registerForPostTypes: Simple post type-based registration
// - registerForTemplates: Template pattern-based registration  
// - registerForPostTypesAndTemplates: Combined approach
// - createConditionalRegistration: Full configuration control

Block Variation Structure

wp.blocks.registerBlockVariation('core/group', {
  name: 'lsx-tour-operator/additional-info',
  title: __('Additional Information', 'tour-operator'),
  description: __('Display additional information content for destinations.', 'tour-operator'),
  icon: 'info-outline',
  category: 'lsx-tour-operator',
  keywords: [
    __('additional', 'tour-operator'),
    __('information', 'tour-operator'),
    __('general', 'tour-operator'),
    __('details', 'tour-operator'),
  ],
  // ... enhanced attributes and innerBlocks configuration
});

Testing Notes

  • All destination blocks now register conditionally based on destination post type context
  • Icon system integration maintains visual consistency
  • Enhanced descriptions improve block discoverability
  • Block metadata follows WordPress Block API v3 standards
  • Localization properly implemented throughout all blocks
  • Conditional registration utility provides reusable pattern for future blocks
  • Examples provide clear usage guidance for content creators
  • Build process updated with webpack alias for easier utility imports

Related Issues

Closes #691

Summary by CodeRabbit

  • New Features

    • Enhanced Additional Info, Banking, Climate, Cuisine, Dress, Electricity, Health, and Transport blocks with richer metadata (descriptions, icons, keywords, examples)
    • Added conditional registration to show blocks only in relevant destination contexts
    • Integrated centralized icon system for consistent visual presentation
    • Implemented comprehensive example configurations for better editor previews
    • Created reusable conditional registration utility system for better maintainability
  • Refactor

    • Improved block registration logic with readiness checks and error handling
    • Standardized block metadata following Block API v3 specifications
    • Enhanced localization support throughout all destination blocks
    • Extracted conditional registration logic into reusable utility module
  • Documentation

    • Comprehensive JSDoc documentation for the new conditional registration utility
    • Enhanced block descriptions and examples for improved user experience
    • Clear implementation patterns for future block development

Summary by CodeRabbit

Release Notes

  • New Features

    • Added comprehensive metadata and visual examples for eight destination-related blocks (Additional Information, Banking, Climate, Cuisine, Dress, Electricity, Health, Transport).
    • Introduced multilingual support for all block variations and content labels.
  • Documentation

    • Enhanced block descriptions, keywords, and editor icons for improved discoverability.
    • Added example block layouts demonstrating typical block usage within the editor.

…itional registration for destination specific posts/pages

- Updated additional-info, banking, climate, cuisine, dress, electricity, health and transport blocks to include proper descriptions and editor previews
- Added support for translations using the __() function for block titles and content.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 11, 2025

Warning

CodeRabbit GitHub Action detected

The repository is using both CodeRabbit Pro and CodeRabbit Open Source (via GitHub Actions), which is not recommended as it may lead to duplicate comments and extra noise. Please remove the CodeRabbit GitHub Action.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'commands', 'linked_issues', 'plugin_context'
⚙️ 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 PR enhances eight destination-related blocks (additional-info, banking, climate, cuisine, dress, electricity, health, transport) by adding comprehensive block.json metadata (textdomain, description, icon, keywords, examples) and converting static block variations into internationalized, conditionally-registered variations with expanded innerBlocks and isActive predicates.

Changes

Cohort / File(s) Summary
Block manifests enrichment
src/blocks/additional-info/block.json, src/blocks/banking/block.json, src/blocks/climate/block.json, src/blocks/cuisine/block.json, src/blocks/dress/block.json, src/blocks/electricity/block.json, src/blocks/health/block.json, src/blocks/transport/block.json
Added metadata fields to each block.json: textdomain ("tour-operator"), description, icon, and keywords array. Added example structures demonstrating nested innerBlocks (group containing heading and paragraph). No functional changes to block registration.
Block variation registration refactoring
src/blocks/additional-info/index.js, src/blocks/banking/index.js, src/blocks/climate/index.js, src/blocks/cuisine/index.js, src/blocks/dress/index.js, src/blocks/electricity/index.js, src/blocks/health/index.js, src/blocks/transport/index.js
Converted static variations into dynamic, i18n-enabled registration functions. Added __() translations for title, description, keywords, and button labels. Introduced isActive predicate comparing className attributes. Expanded innerBlocks with nested group structures. Implemented conditional registration via registerForPostTypesAndTemplates for destination post type gating. Added example configurations.

Sequence Diagram(s)

sequenceDiagram
    participant Editor as Block Editor
    participant Init as DOM Ready
    participant Reg as registerForPostTypesAndTemplates
    participant WP as wp.blocks
    
    Init->>Reg: Initialize block variation registration
    activate Reg
    Note over Reg: Check post type/template filters
    Reg->>WP: Register variation if destination post type matches
    deactivate Reg
    activate WP
    WP->>Editor: Variation available in inserter
    deactivate WP
    
    Editor->>Editor: User inserts block
    activate Editor
    Note over Editor: isActive predicate evaluates className
    Editor->>Editor: Render with translated labels & nested blocks
    deactivate Editor
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • High homogeneity: Identical registration pattern repeated across 8 blocks reduces cognitive load; validating one block pattern applies to all others
  • Moderate file count: 16 files (8 block.json + 8 index.js) require review, but changes within each file are predictable
  • Areas requiring attention:
    • Verify isActive className comparisons are semantically consistent across all variations
    • Confirm all translated strings use correct text domain ("tour-operator")
    • Ensure registerForPostTypesAndTemplates post type selectors ("destination") are correct and consistent
    • Validate that all innerBlocks structures maintain proper nesting and layout constraints
    • Check that example configurations in block.json match runtime variation structure

Possibly related PRs

Suggested labels

comp:block-variations, comp:block-json, comp:block-editor, comp:block-inserter, comp:block-supports

Suggested reviewers

  • krugazul

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description is comprehensive with summary, key changes, scope, technical implementation, and testing notes. However, it does not follow the specified template structure with required sections like AC, Test Notes, Risk & Rollback checklists. Consider formatting the description to match the repository template structure, including explicit checklist items, risk level assessment, and rollback plan.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main objective: enhancing destination blocks with metadata, icon integration, and conditional registration.
Linked Issues check ✅ Passed The PR implements all coding requirements from issue #691: Block API v3 metadata compliance, comprehensive block.json updates, conditional registration, icon system integration, localization, and reusable utility creation across all eight destination blocks.
Out of Scope Changes check ✅ Passed All code changes directly address issue #691 requirements: metadata enhancements, conditional registration implementation, and utility creation for destination blocks. No out-of-scope changes detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/691-destination-blocks-meta-icons

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.

@github-actions github-actions bot added lang:php PHP code area:ci Build and CI pipelines lang:css Stylesheets lang:javascript area:block-editor status:needs-review Awaiting code review labels Nov 11, 2025
@tibiii tibiii self-assigned this Nov 11, 2025
@github-actions github-actions bot added the meta:needs-changelog Requires a changelog entry before merge label Nov 11, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Tour Operator Nov 11, 2025
@tibiii tibiii added this to the v2.1.0 milestone Nov 11, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 11, 2025

Image description CodeRabbit


Uplevel your code reviews with CodeRabbit Pro

CodeRabbit Pro

If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

@tibiii tibiii moved this from Needs Triage to 🔎 In Review in Tour Operator Nov 11, 2025
@github-actions github-actions bot added status:needs-review Awaiting code review and removed status:needs-review Awaiting code review labels Nov 11, 2025
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between ec7c129 and 7bc2f40 commits.
Files selected (10)
  • src/blocks/additional-info/index.js (1)
  • src/blocks/banking/index.js (1)
  • src/blocks/climate/index.js (1)
  • src/blocks/cuisine/index.js (1)
  • src/blocks/dress/index.js (1)
  • src/blocks/electricity/index.js (1)
  • src/blocks/health/index.js (4)
  • src/blocks/transport/index.js (5)
  • src/js/conditional-block-registration.js (1)
  • webpack.config.js (1)
Files ignored due to filter (16)
  • build/blocks/additional-info/block.json
  • build/blocks/banking/block.json
  • build/blocks/climate/block.json
  • build/blocks/cuisine/block.json
  • build/blocks/dress/block.json
  • build/blocks/electricity/block.json
  • build/blocks/health/block.json
  • build/blocks/transport/block.json
  • src/blocks/additional-info/block.json
  • src/blocks/banking/block.json
  • src/blocks/climate/block.json
  • src/blocks/cuisine/block.json
  • src/blocks/dress/block.json
  • src/blocks/electricity/block.json
  • src/blocks/health/block.json
  • src/blocks/transport/block.json
Files not summarized due to errors (10)
  • src/blocks/additional-info/index.js (diff tokens exceeds limit)
  • src/blocks/banking/index.js (diff tokens exceeds limit)
  • src/blocks/climate/index.js (diff tokens exceeds limit)
  • src/blocks/cuisine/index.js (diff tokens exceeds limit)
  • src/blocks/dress/index.js (diff tokens exceeds limit)
  • src/blocks/electricity/index.js (diff tokens exceeds limit)
  • src/js/conditional-block-registration.js (diff tokens exceeds limit)
  • src/blocks/transport/index.js (nothing obtained from openai)
  • webpack.config.js (nothing obtained from openai)
  • src/blocks/health/index.js (nothing obtained from openai)
Files not reviewed due to errors (9)
  • src/blocks/electricity/index.js (no response)
  • src/blocks/banking/index.js (no response)
  • src/blocks/additional-info/index.js (no response)
  • src/blocks/health/index.js (no response)
  • src/blocks/dress/index.js (no response)
  • src/blocks/cuisine/index.js (no response)
  • src/js/conditional-block-registration.js (no response)
  • webpack.config.js (no response)
  • src/blocks/transport/index.js (no response)
Files skipped from review due to trivial changes (1)
  • src/blocks/climate/index.js (diff too large)
Review comments generated (0)
  • Review: 0
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

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: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
src/blocks/transport/index.js (3)

1-178: Add comprehensive JSDoc comments and @SInCE tags.

The file lacks JSDoc documentation required by the coding guidelines. All functions require JSDoc comments with @SInCE tags.

Apply this pattern:

+/**
+ * Transport block variation registration.
+ *
+ * Registers a conditional block variation for displaying transport information.
+ * Only available in destination post type and template contexts.
+ *
+ * @since 2.1.0
+ */
+
 import { __ } from '@wordpress/i18n';
 import { registerForPostTypesAndTemplates } from '@utils/conditional-block-registration.js';

 wp.domReady(() => {
+    /**
+     * Registers the Transport block variation.
+     *
+     * Creates a variation of core/group block with transport metadata bindings.
+     *
+     * @since 2.1.0
+     */
     const registerTransportVariation = () => {

As per coding guidelines.


66-81: Fix attribute structure: content must be sibling of metadata, not nested within it.

Line 78 places content inside the metadata object, which is incorrect. The content attribute should be a sibling of metadata for the paragraph block.

Apply this fix:

 [
     'core/paragraph',
     {
         metadata: {
             bindings: {
                 content: {
                     source: 'lsx/post-meta',
                     args: {
                         key: 'transport',
                     },
                 },
             },
-            content: '',
         },
+        content: '',
     },
 ],

90-96: Inconsistent backgroundColor between innerBlocks and example.

The button in the main innerBlocks (lines 90-96) lacks backgroundColor: 'primary', but the example (lines 157-161) includes it. This creates inconsistency.

Add backgroundColor to the main innerBlocks for consistency:

 [
     'core/button',
     {
+        backgroundColor: 'primary',
         width: 100,
         text: __('View More', 'tour-operator'),
     },
 ],

Also applies to: 154-163

🧹 Nitpick comments (5)
src/blocks/dress/block.json (1)

10-10: Consider a more intuitive icon for dress/clothing context.

The "admin-customizer" icon may not be immediately recognisable as dress-related. Consider alternatives such as "admin-appearance" or "admin-users" for better semantic alignment with clothing/attire.

src/blocks/electricity/block.json (1)

10-10: Consider a more semantic icon for electricity context.

The "admin-plugins" icon doesn't clearly relate to electricity or power. Consider more intuitive alternatives such as "lightbulb" or "admin-tools" for better semantic alignment.

src/blocks/additional-info/index.js (1)

53-53: Consider using template literals for HTML strings.

The string concatenation with + operator works but template literals provide better readability and are more idiomatic in modern JavaScript.

-content: '<strong>' + __('General', 'tour-operator') + '</strong>',
+content: `<strong>${__('General', 'tour-operator')}</strong>`,

Apply the same pattern on line 127.

Also applies to: 127-127

src/blocks/cuisine/index.js (1)

53-53: Consider using template literals for HTML strings.

Template literals provide better readability than string concatenation.

-content: '<strong>' + __('Cuisine', 'tour-operator') + '</strong>',
+content: `<strong>${__('Cuisine', 'tour-operator')}</strong>`,

Apply the same pattern on line 129.

Also applies to: 129-129

src/blocks/transport/index.js (1)

53-53: Consider using template literals for HTML strings.

Template literals are more readable than string concatenation.

-content: '<strong>' + __('Transport', 'tour-operator') + '</strong>',
+content: `<strong>${__('Transport', 'tour-operator')}</strong>`,

Apply the same pattern on line 128.

Also applies to: 128-128

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ec7c129 and 7bc2f40.

⛔ Files ignored due to path filters (175)
  • build/admin-rtl.css is excluded by !build/**
  • build/admin-script.asset.php is excluded by !build/**
  • build/admin-script.js is excluded by !build/**
  • build/admin.asset.php is excluded by !build/**
  • build/admin.css is excluded by !build/**
  • build/blocks/accommodation-related-accommodation/index.asset.php is excluded by !build/**
  • build/blocks/accommodation-related-accommodation/index.js is excluded by !build/**
  • build/blocks/accommodation-related-destination/index.asset.php is excluded by !build/**
  • build/blocks/accommodation-related-destination/index.js is excluded by !build/**
  • build/blocks/accommodation-related-tour/index.asset.php is excluded by !build/**
  • build/blocks/accommodation-related-tour/index.js is excluded by !build/**
  • build/blocks/accommodation-type/index.asset.php is excluded by !build/**
  • build/blocks/accommodation-type/index.js is excluded by !build/**
  • build/blocks/additional-info/block.json is excluded by !build/**
  • build/blocks/additional-info/index.asset.php is excluded by !build/**
  • build/blocks/additional-info/index.js is excluded by !build/**
  • build/blocks/banking/block.json is excluded by !build/**
  • build/blocks/banking/index.asset.php is excluded by !build/**
  • build/blocks/banking/index.js is excluded by !build/**
  • build/blocks/banner-cover/index.asset.php is excluded by !build/**
  • build/blocks/banner-cover/index.js is excluded by !build/**
  • build/blocks/best-time-to-visit/index.asset.php is excluded by !build/**
  • build/blocks/best-time-to-visit/index.js is excluded by !build/**
  • build/blocks/booking-validity/index.asset.php is excluded by !build/**
  • build/blocks/booking-validity/index.js is excluded by !build/**
  • build/blocks/checkin-time/index.asset.php is excluded by !build/**
  • build/blocks/checkin-time/index.js is excluded by !build/**
  • build/blocks/checkout-time/index.asset.php is excluded by !build/**
  • build/blocks/checkout-time/index.js is excluded by !build/**
  • build/blocks/climate/block.json is excluded by !build/**
  • build/blocks/climate/index.asset.php is excluded by !build/**
  • build/blocks/climate/index.js is excluded by !build/**
  • build/blocks/cuisine/block.json is excluded by !build/**
  • build/blocks/cuisine/index.asset.php is excluded by !build/**
  • build/blocks/cuisine/index.js is excluded by !build/**
  • build/blocks/day-by-day/index.asset.php is excluded by !build/**
  • build/blocks/day-by-day/index.js is excluded by !build/**
  • build/blocks/departs-from/index.asset.php is excluded by !build/**
  • build/blocks/departs-from/index.js is excluded by !build/**
  • build/blocks/destination-to-accommodation/index.asset.php is excluded by !build/**
  • build/blocks/destination-to-accommodation/index.js is excluded by !build/**
  • build/blocks/dress/block.json is excluded by !build/**
  • build/blocks/dress/index.asset.php is excluded by !build/**
  • build/blocks/dress/index.js is excluded by !build/**
  • build/blocks/duration/index.asset.php is excluded by !build/**
  • build/blocks/duration/index.js is excluded by !build/**
  • build/blocks/electricity/block.json is excluded by !build/**
  • build/blocks/electricity/index.asset.php is excluded by !build/**
  • build/blocks/electricity/index.js is excluded by !build/**
  • build/blocks/ends-in/index.asset.php is excluded by !build/**
  • build/blocks/ends-in/index.js is excluded by !build/**
  • build/blocks/facilities/index.asset.php is excluded by !build/**
  • build/blocks/facilities/index.js is excluded by !build/**
  • build/blocks/facts-country-wrapper/index.asset.php is excluded by !build/**
  • build/blocks/facts-country-wrapper/index.js is excluded by !build/**
  • build/blocks/facts-regions-wrapper/index.asset.php is excluded by !build/**
  • build/blocks/facts-regions-wrapper/index.js is excluded by !build/**
  • build/blocks/featured-accommodation/index.asset.php is excluded by !build/**
  • build/blocks/featured-accommodation/index.js is excluded by !build/**
  • build/blocks/featured-destinations/index.asset.php is excluded by !build/**
  • build/blocks/featured-destinations/index.js is excluded by !build/**
  • build/blocks/featured-tours/index.asset.php is excluded by !build/**
  • build/blocks/featured-tours/index.js is excluded by !build/**
  • build/blocks/gallery/index.asset.php is excluded by !build/**
  • build/blocks/gallery/index.js is excluded by !build/**
  • build/blocks/google-map/index.asset.php is excluded by !build/**
  • build/blocks/google-map/index.js is excluded by !build/**
  • build/blocks/group-size/index.asset.php is excluded by !build/**
  • build/blocks/group-size/index.js is excluded by !build/**
  • build/blocks/health/block.json is excluded by !build/**
  • build/blocks/health/index.asset.php is excluded by !build/**
  • build/blocks/health/index.js is excluded by !build/**
  • build/blocks/icons/index.asset.php is excluded by !build/**
  • build/blocks/icons/index.js is excluded by !build/**
  • build/blocks/icons/style-index-rtl.css is excluded by !build/**
  • build/blocks/icons/style-index.css is excluded by !build/**
  • build/blocks/included/index.asset.php is excluded by !build/**
  • build/blocks/included/index.js is excluded by !build/**
  • build/blocks/itinerary/index.asset.php is excluded by !build/**
  • build/blocks/itinerary/index.js is excluded by !build/**
  • build/blocks/lsx-destination-to-tour/index.asset.php is excluded by !build/**
  • build/blocks/lsx-destination-to-tour/index.js is excluded by !build/**
  • build/blocks/minimum-child-age/index.asset.php is excluded by !build/**
  • build/blocks/minimum-child-age/index.js is excluded by !build/**
  • build/blocks/modal-button/index.asset.php is excluded by !build/**
  • build/blocks/modal-button/index.js is excluded by !build/**
  • build/blocks/more-link/index.asset.php is excluded by !build/**
  • build/blocks/more-link/index.js is excluded by !build/**
  • build/blocks/not-included/index.asset.php is excluded by !build/**
  • build/blocks/not-included/index.js is excluded by !build/**
  • build/blocks/number-of-rooms/index.asset.php is excluded by !build/**
  • build/blocks/number-of-rooms/index.js is excluded by !build/**
  • build/blocks/permalink-button/index.asset.php is excluded by !build/**
  • build/blocks/permalink-button/index.js is excluded by !build/**
  • build/blocks/price-include-exclude/index.asset.php is excluded by !build/**
  • build/blocks/price-include-exclude/index.js is excluded by !build/**
  • build/blocks/price/index.asset.php is excluded by !build/**
  • build/blocks/price/index.js is excluded by !build/**
  • build/blocks/rating/index.asset.php is excluded by !build/**
  • build/blocks/rating/index.js is excluded by !build/**
  • build/blocks/regions/index.asset.php is excluded by !build/**
  • build/blocks/regions/index.js is excluded by !build/**
  • build/blocks/related-regions/index.asset.php is excluded by !build/**
  • build/blocks/related-regions/index.js is excluded by !build/**
  • build/blocks/review-related-accommodation/index.asset.php is excluded by !build/**
  • build/blocks/review-related-accommodation/index.js is excluded by !build/**
  • build/blocks/review-related-destination/index.asset.php is excluded by !build/**
  • build/blocks/review-related-destination/index.js is excluded by !build/**
  • build/blocks/review-related-tour/index.asset.php is excluded by !build/**
  • build/blocks/review-related-tour/index.js is excluded by !build/**
  • build/blocks/safety/index.asset.php is excluded by !build/**
  • build/blocks/safety/index.js is excluded by !build/**
  • build/blocks/single-supplement-wrapper/index.asset.php is excluded by !build/**
  • build/blocks/single-supplement-wrapper/index.js is excluded by !build/**
  • build/blocks/special-interests/index.asset.php is excluded by !build/**
  • build/blocks/special-interests/index.js is excluded by !build/**
  • build/blocks/spoken-languages/index.asset.php is excluded by !build/**
  • build/blocks/spoken-languages/index.js is excluded by !build/**
  • build/blocks/sticky-menu/index.asset.php is excluded by !build/**
  • build/blocks/sticky-menu/index.js is excluded by !build/**
  • build/blocks/sticky-menu/sticky-menu-editor-extension.asset.php is excluded by !build/**
  • build/blocks/sticky-menu/sticky-menu-editor-extension.js is excluded by !build/**
  • build/blocks/sticky-menu/style-index-rtl.css is excluded by !build/**
  • build/blocks/sticky-menu/style-index.css is excluded by !build/**
  • build/blocks/sticky-menu/view.asset.php is excluded by !build/**
  • build/blocks/sticky-menu/view.js is excluded by !build/**
  • build/blocks/suggested-visitor-types/index.asset.php is excluded by !build/**
  • build/blocks/suggested-visitor-types/index.js is excluded by !build/**
  • build/blocks/tagline/index.asset.php is excluded by !build/**
  • build/blocks/tagline/index.js is excluded by !build/**
  • build/blocks/tour-related-accommodation/index.asset.php is excluded by !build/**
  • build/blocks/tour-related-accommodation/index.js is excluded by !build/**
  • build/blocks/tour-related-destination/index.asset.php is excluded by !build/**
  • build/blocks/tour-related-destination/index.js is excluded by !build/**
  • build/blocks/tour-related-tour/index.asset.php is excluded by !build/**
  • build/blocks/tour-related-tour/index.js is excluded by !build/**
  • build/blocks/transport/block.json is excluded by !build/**
  • build/blocks/transport/index.asset.php is excluded by !build/**
  • build/blocks/transport/index.js is excluded by !build/**
  • build/blocks/travel-styles/index.asset.php is excluded by !build/**
  • build/blocks/travel-styles/index.js is excluded by !build/**
  • build/blocks/unit-rooms/index.asset.php is excluded by !build/**
  • build/blocks/unit-rooms/index.js is excluded by !build/**
  • build/blocks/units/index.asset.php is excluded by !build/**
  • build/blocks/units/index.js is excluded by !build/**
  • build/blocks/videos/index.asset.php is excluded by !build/**
  • build/blocks/videos/index.js is excluded by !build/**
  • build/blocks/visa/index.asset.php is excluded by !build/**
  • build/blocks/visa/index.js is excluded by !build/**
  • build/blocks/wetu-map/index.asset.php is excluded by !build/**
  • build/blocks/wetu-map/index.js is excluded by !build/**
  • build/custom.asset.php is excluded by !build/**
  • build/custom.js is excluded by !build/**
  • build/general.asset.php is excluded by !build/**
  • build/general.js is excluded by !build/**
  • build/linked-cover.asset.php is excluded by !build/**
  • build/linked-cover.js is excluded by !build/**
  • build/maps.asset.php is excluded by !build/**
  • build/maps.js is excluded by !build/**
  • build/metabox-structure.asset.php is excluded by !build/**
  • build/metabox-structure.js is excluded by !build/**
  • build/metaboxes-rtl.css is excluded by !build/**
  • build/metaboxes.asset.php is excluded by !build/**
  • build/metaboxes.css is excluded by !build/**
  • build/modals.asset.php is excluded by !build/**
  • build/modals.js is excluded by !build/**
  • build/scporder.asset.php is excluded by !build/**
  • build/scporder.js is excluded by !build/**
  • build/slider-query.asset.php is excluded by !build/**
  • build/slider-query.js is excluded by !build/**
  • build/slotfills.asset.php is excluded by !build/**
  • build/slotfills.js is excluded by !build/**
  • build/style-rtl.css is excluded by !build/**
  • build/style.asset.php is excluded by !build/**
  • build/style.css is excluded by !build/**
📒 Files selected for processing (18)
  • src/blocks/additional-info/block.json (1 hunks)
  • src/blocks/additional-info/index.js (1 hunks)
  • src/blocks/banking/block.json (1 hunks)
  • src/blocks/banking/index.js (1 hunks)
  • src/blocks/climate/block.json (1 hunks)
  • src/blocks/climate/index.js (1 hunks)
  • src/blocks/cuisine/block.json (1 hunks)
  • src/blocks/cuisine/index.js (1 hunks)
  • src/blocks/dress/block.json (1 hunks)
  • src/blocks/dress/index.js (1 hunks)
  • src/blocks/electricity/block.json (1 hunks)
  • src/blocks/electricity/index.js (1 hunks)
  • src/blocks/health/block.json (1 hunks)
  • src/blocks/health/index.js (4 hunks)
  • src/blocks/transport/block.json (1 hunks)
  • src/blocks/transport/index.js (5 hunks)
  • src/js/conditional-block-registration.js (1 hunks)
  • webpack.config.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (14)
src/**/*.{js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use @wordpress/eslint-plugin for JavaScript linting

Files:

  • src/blocks/climate/index.js
  • src/blocks/electricity/index.js
  • src/js/conditional-block-registration.js
  • src/blocks/health/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/dress/index.js
  • src/blocks/banking/index.js
  • src/blocks/cuisine/index.js
src/**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{js,jsx,ts,tsx}: Use useBlockProps() in block edit/save components when applicable
Use the text domain tour-operator for JS i18n calls

Files:

  • src/blocks/climate/index.js
  • src/blocks/electricity/index.js
  • src/js/conditional-block-registration.js
  • src/blocks/health/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/dress/index.js
  • src/blocks/banking/index.js
  • src/blocks/cuisine/index.js
{assets,src}/**/*

📄 CodeRabbit inference engine (.github/instructions/block-theme-structure.instructions.md)

Keep SCSS/JS/images source assets in assets/ or src/

Files:

  • src/blocks/climate/index.js
  • src/blocks/electricity/index.js
  • src/blocks/dress/block.json
  • src/js/conditional-block-registration.js
  • src/blocks/electricity/block.json
  • src/blocks/transport/block.json
  • src/blocks/health/block.json
  • src/blocks/health/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/banking/block.json
  • src/blocks/climate/block.json
  • src/blocks/dress/index.js
  • src/blocks/banking/index.js
  • src/blocks/additional-info/block.json
  • src/blocks/cuisine/index.js
  • src/blocks/cuisine/block.json
**/*.{js,ts}

📄 CodeRabbit inference engine (.github/instructions/javascript-react.instructions.md)

**/*.{js,ts}: Use const or let instead of var for variable declarations
Use default parameters for function arguments where appropriate
Use @wordpress/api-fetch (optionally with addQueryArgs) for REST API requests
Register blocks via registerBlockType using block metadata (imported from block.json), and localize title/description/keywords
Use wp.media for media selection in custom components/utilities when needed
Create and register custom data stores with @wordpress/data (createReduxStore + register), and structure actions/selectors clearly
Initialize frontend interactivity after DOMContentLoaded and implement ARIA attributes for toggles (aria-controls, aria-expanded)
Handle AJAX form submissions with fetch, proper loading states, and user notices; restore UI state in finally
Implement accessibility utilities like focus trapping and polite screen reader announcements for dynamic content

Files:

  • src/blocks/climate/index.js
  • src/blocks/electricity/index.js
  • src/js/conditional-block-registration.js
  • src/blocks/health/index.js
  • webpack.config.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/dress/index.js
  • src/blocks/banking/index.js
  • src/blocks/cuisine/index.js
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.github/instructions/javascript-react.instructions.md)

**/*.{js,ts,jsx,tsx}: Prefer arrow functions for callbacks and inline handlers
Use object/array destructuring for cleaner code
Use template literals for string interpolation
Use async/await for promise handling with try/catch for errors
Use WordPress i18n APIs (__/_n/sprintf) with a consistent textdomain for all user-facing strings; include translator comments where needed
Use @wordpress/data dispatch/select for interacting with WP data stores (e.g., core/notices, core/editor)

Files:

  • src/blocks/climate/index.js
  • src/blocks/electricity/index.js
  • src/js/conditional-block-registration.js
  • src/blocks/health/index.js
  • webpack.config.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/dress/index.js
  • src/blocks/banking/index.js
  • src/blocks/cuisine/index.js
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/instructions/js-ts.instructions.md)

**/*.{ts,tsx,js,jsx}: Debounce user inputs to prevent excessive processing
Avoid blocking the UI thread (prefer async/non-blocking operations)

Files:

  • src/blocks/climate/index.js
  • src/blocks/electricity/index.js
  • src/js/conditional-block-registration.js
  • src/blocks/health/index.js
  • webpack.config.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/dress/index.js
  • src/blocks/banking/index.js
  • src/blocks/cuisine/index.js
**/*.{js,mjs,ts,tsx}

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

Defer non-critical JavaScript and avoid synchronous blocking operations

Files:

  • src/blocks/climate/index.js
  • src/blocks/electricity/index.js
  • src/js/conditional-block-registration.js
  • src/blocks/health/index.js
  • webpack.config.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/dress/index.js
  • src/blocks/banking/index.js
  • src/blocks/cuisine/index.js
**/*.{php,js,jsx,ts,tsx}

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

Internationalize user‑facing strings using WordPress i18n APIs

Files:

  • src/blocks/climate/index.js
  • src/blocks/electricity/index.js
  • src/js/conditional-block-registration.js
  • src/blocks/health/index.js
  • webpack.config.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/dress/index.js
  • src/blocks/banking/index.js
  • src/blocks/cuisine/index.js
**/*.{css,js,jsx,ts,tsx}

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

Minimize CSS/JS payload size

Files:

  • src/blocks/climate/index.js
  • src/blocks/electricity/index.js
  • src/js/conditional-block-registration.js
  • src/blocks/health/index.js
  • webpack.config.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/dress/index.js
  • src/blocks/banking/index.js
  • src/blocks/cuisine/index.js
**/*.{js,jsx,ts,tsx}

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

Lazy-load code and resources where possible

Files:

  • src/blocks/climate/index.js
  • src/blocks/electricity/index.js
  • src/js/conditional-block-registration.js
  • src/blocks/health/index.js
  • webpack.config.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/dress/index.js
  • src/blocks/banking/index.js
  • src/blocks/cuisine/index.js
**/*.{js,ts,tsx,jsx}

⚙️ CodeRabbit configuration file

**/*.{js,ts,tsx,jsx}: Perform a detailed review of the provided code with following key aspects in mind:

  • Review the code to ensure it is well-structured and adheres to best practices.
  • Verify compliance with WordPress coding standards and @wordpress/eslint-plugin rules.
  • Ensure the code is well-documented with proper JSDoc comments.
  • Check for security vulnerabilities and confirm the code is secure.
  • Optimize the code for performance, removing any unnecessary elements.
  • Validate JSDoc comments for accuracy, currency, and adherence to WordPress coding standards.
  • Ensure each line comment concludes with a period.
  • Confirm every JSDoc comment includes a @SInCE tag indicating the next version of the plugin to include the code.
  • Guarantee compatibility with the latest version of WordPress, avoiding deprecated functions or features.
  • Follow WordPress JavaScript coding standards and use WordPress script localization.
  • Use WordPress script dependencies and enqueue properly.
  • Ensure React/JSX best practices for blocks and modern JavaScript/TypeScript patterns.
  • Implement proper error handling and loading states.
  • Use WordPress components and design system where applicable.
  • For Tour Operator: Focus on tour booking interfaces, search functionality, and tour display components.

Files:

  • src/blocks/climate/index.js
  • src/blocks/electricity/index.js
  • src/js/conditional-block-registration.js
  • src/blocks/health/index.js
  • webpack.config.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/dress/index.js
  • src/blocks/banking/index.js
  • src/blocks/cuisine/index.js
src/blocks/**/*.{js,jsx,ts,tsx}

⚙️ CodeRabbit configuration file

src/blocks/**/*.{js,jsx,ts,tsx}: - Follow WordPress JavaScript coding standards and @wordpress/scripts configuration.

  • Use WordPress components from @wordpress/components and design system.
  • Implement proper React/JSX patterns for WordPress blocks.
  • Ensure proper WordPress script dependencies and localization.
  • Use WordPress data store patterns with @wordpress/data.
  • Implement proper error boundaries and loading states.
  • Follow modern JavaScript/TypeScript patterns with proper typing.
  • Ensure accessibility in interactive block components.
  • Use WordPress block editor APIs correctly (useBlockProps, InspectorControls, etc.).
  • Implement proper block validation and save/edit functionality.

Files:

  • src/blocks/climate/index.js
  • src/blocks/electricity/index.js
  • src/blocks/health/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/dress/index.js
  • src/blocks/banking/index.js
  • src/blocks/cuisine/index.js
src/**/block.json

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/block.json: Prefer block.json with server-side registration for blocks (avoid ad‑hoc registration)
Use the block namespace lsx-to in block names

Files:

  • src/blocks/dress/block.json
  • src/blocks/electricity/block.json
  • src/blocks/transport/block.json
  • src/blocks/health/block.json
  • src/blocks/banking/block.json
  • src/blocks/climate/block.json
  • src/blocks/additional-info/block.json
  • src/blocks/cuisine/block.json
**/block.json

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

**/block.json: Provide meaningful block titles, descriptions, and keywords in block.json
Include editor-specific accessibility guidance in block descriptions (block.json)
Include accessibility considerations in block registration (e.g., supports, attributes)

**/block.json: In block.json, include required fields: name, title, description, category, keywords, and supports
Ensure accessible metadata in block.json: use clear, descriptive title and description
Provide reasonable default values for attributes in block.json
Use usesInnerBlocks in block.json only when the block actually contains InnerBlocks
Define block variations in block.json to provide common starting points
Ensure i18n and RTL safety for user-facing strings in block.json (including variations)

Files:

  • src/blocks/dress/block.json
  • src/blocks/electricity/block.json
  • src/blocks/transport/block.json
  • src/blocks/health/block.json
  • src/blocks/banking/block.json
  • src/blocks/climate/block.json
  • src/blocks/additional-info/block.json
  • src/blocks/cuisine/block.json
🧬 Code graph analysis (8)
src/blocks/climate/index.js (2)
src/blocks/dress/index.js (1)
  • conditionalRegister (184-188)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/electricity/index.js (1)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/health/index.js (1)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/additional-info/index.js (1)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/transport/index.js (1)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/dress/index.js (2)
src/blocks/climate/index.js (1)
  • conditionalRegister (185-189)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/banking/index.js (1)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/cuisine/index.js (1)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
⏰ 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). (2)
  • GitHub Check: review
  • GitHub Check: Summary
🔇 Additional comments (17)
src/blocks/cuisine/block.json (1)

4-44: LGTM! Comprehensive metadata additions.

The block.json enhancements are well-structured with appropriate textdomain, description, icon, keywords, and example. The example payload properly demonstrates the block's nested structure with a group containing a heading and paragraph.

src/blocks/banking/block.json (1)

4-43: LGTM! Metadata additions follow established pattern.

The banking block metadata is comprehensive and consistent with the broader PR pattern. The textdomain, description, icon, keywords, and example are all appropriate and well-structured.

webpack.config.js (1)

31-35: LGTM! Alias simplifies utility imports.

The @utils alias properly maps to src/js/ and enables clean imports throughout the codebase. This supports the conditional registration pattern used across multiple blocks in this PR.

src/blocks/dress/block.json (1)

4-43: Metadata additions are comprehensive and well-structured.

The textdomain, description, keywords, and example payload are all appropriate and follow the established pattern across the PR.

src/blocks/health/block.json (1)

4-43: LGTM! Well-chosen metadata for health block.

The health block enhancements are comprehensive with appropriate textdomain, description, icon ("heart"), keywords, and example structure. All additions align with WordPress standards and the PR pattern.

src/blocks/additional-info/block.json (1)

4-43: LGTM! Clear and semantic metadata additions.

The additional-info block metadata is comprehensive with appropriate textdomain, description, icon ("info-outline"), keywords, and example structure. All additions follow WordPress standards.

src/blocks/electricity/block.json (1)

4-44: Comprehensive metadata with good example content.

The textdomain, description, keywords, and example payload (with specific voltage/plug information) are well-structured and follow the established PR pattern.

src/blocks/climate/index.js (5)

1-3: LGTM! Proper i18n and utility imports.

The imports correctly use @wordpress/i18n for internationalisation and the new @utils alias for the conditional registration utility, aligning with the project's patterns.


33-44: LGTM! Robust variation attributes and isActive predicate.

The isActive predicate correctly compares metadata.className for variation activation, and the attributes properly define the metadata and layout structure.


45-113: LGTM! Well-structured innerBlocks with metadata bindings.

The innerBlocks structure properly uses nested groups with constrained layouts, implements metadata bindings to the 'climate' post meta field, and includes internationalised content. The button configuration is appropriate for the destination context.


117-180: LGTM! Comprehensive example payload for editor preview.

The example provides a complete demonstration with nested groups, placeholder content, and properly structured attributes, enhancing the block inserter experience.


185-191: LGTM! Proper conditional registration implementation.

The conditional registration correctly uses registerForPostTypesAndTemplates with destination post type and template slugs, ensuring the block variation only appears in the appropriate context.

src/blocks/climate/block.json (1)

4-43: LGTM! Comprehensive block metadata additions.

The additions follow Block API v3 standards properly:

  • Correct textdomain matching the coding guidelines
  • Descriptive metadata (description, icon, keywords)
  • Well-structured example with nested innerBlocks for editor preview
src/blocks/additional-info/index.js (1)

169-175: Conditional registration implemented correctly.

The use of registerForPostTypesAndTemplates properly restricts the block variation to destination contexts.

src/blocks/cuisine/index.js (1)

172-178: Conditional registration implemented correctly.

The block variation is properly restricted to destination contexts using the conditional registration utility.

src/blocks/transport/index.js (1)

171-177: Conditional registration implemented correctly.

The variation is properly restricted to destination contexts.

src/blocks/transport/block.json (1)

4-43: LGTM! Comprehensive block metadata additions.

The additions follow Block API v3 standards with proper textdomain, descriptive metadata, and a well-structured example for editor preview.

@github-project-automation github-project-automation bot moved this from 🔎 In Review to Needs Triage in Tour Operator Nov 11, 2025
@tibiii tibiii requested a review from Copilot November 11, 2025 16:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances destination-related blocks with comprehensive Block API v3 metadata, centralized icon integration, and conditional registration logic. The key implementation creates a reusable conditional registration utility and applies it to 8 destination blocks (additional-info, banking, climate, cuisine, dress, electricity, health, transport).

Reviewed Changes

Copilot reviewed 192 out of 193 changed files in this pull request and generated 26 comments.

Show a summary per file
File Description
webpack.config.js Adds @utils webpack alias for importing the conditional registration utility
src/js/conditional-block-registration.js NEW - Reusable conditional registration utility with comprehensive JSDoc documentation
src/blocks/*/index.js (8 blocks) Enhanced with i18n, conditional registration, localized keywords, and improved example configurations
src/blocks/*/block.json (8 blocks) Enhanced with API v3 metadata, textdomain, descriptions, keywords, and example configurations
build/* files Compiled build artifacts (expected changes)

@github-actions github-actions bot added status:needs-review Awaiting code review and removed status:needs-review Awaiting code review labels Nov 11, 2025
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 7bc2f40 and 61adb79 commits.
Files selected (3)
  • src/blocks/climate/index.js (1)
  • src/blocks/cuisine/index.js (1)
  • src/blocks/transport/index.js (4)
Files not summarized due to errors (3)
  • src/blocks/climate/index.js (diff tokens exceeds limit)
  • src/blocks/cuisine/index.js (diff tokens exceeds limit)
  • src/blocks/transport/index.js (diff tokens exceeds limit)
Files not reviewed due to errors (2)
  • src/blocks/transport/index.js (no response)
  • src/blocks/cuisine/index.js (no response)
Files skipped from review due to trivial changes (1)
  • src/blocks/climate/index.js (diff too large)
Review comments generated (0)
  • Review: 0
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 192 out of 193 changed files in this pull request and generated 8 comments.

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 (4)
src/blocks/climate/index.js (2)

4-6: Add JSDoc comments for the registration function.

The coding guidelines require JSDoc comments with a @SInCE tag for all functions. This was previously flagged and remains unaddressed.


12-25: Replace inline SVG with centralized icon system or dashicon.

This inline SVG icon conflicts with the PR objectives which explicitly require using the centralized icons system. The past review comprehensively documented this issue, noting that block.json already defines "icon": "cloud". This remains unaddressed.

src/blocks/transport/index.js (1)

20-27: Fix isActive predicate logic mismatch.

The isActive function compares metadata.className (line 21), but the variation only defines metadata.name (line 25), not metadata.className. This will cause the isActive check to fail.

Apply this diff to fix the predicate:

 isActive: (blockAttributes, variationAttributes) => {
-    return blockAttributes.metadata?.className === variationAttributes.metadata?.className;
+    return blockAttributes.metadata?.name === variationAttributes.metadata?.name;
 },
src/blocks/cuisine/index.js (1)

67-80: Empty content attribute for metadata-bound paragraph.

The paragraph block with metadata bindings lacks a content attribute fallback. Whilst the binding to post meta key 'cuisine' will populate the content, consider adding a default/placeholder content value for clarity and to handle cases where the binding may not resolve.

🧹 Nitpick comments (2)
src/blocks/climate/index.js (1)

66-66: Consider using template literals for string interpolation.

Whilst the string concatenation works correctly, the coding guidelines prefer template literals for cleaner code. Consider updating to:

-content: '<strong>' + __('Climate', 'tour-operator') + '</strong>',
+content: `<strong>${__('Climate', 'tour-operator')}</strong>`,

This also applies to line 141 in the example configuration.

src/blocks/transport/index.js (1)

4-177: Consider adding error handling for registration robustness.

The registration code lacks error handling. Wrapping the registration logic in a try-catch block would improve robustness and provide better debugging information if registration fails.

Consider this pattern:

 wp.domReady(() => {
+    try {
         // Register variation function
         const registerTransportVariation = () => {
             // ... existing code ...
         };
 
         // Initialize conditional registration
         const conditionalRegister = registerForPostTypesAndTemplates(
             ['destination'],
             ['destination'],
             registerTransportVariation
         );
 
         conditionalRegister();
+    } catch (error) {
+        // eslint-disable-next-line no-console
+        console.error('Failed to register Transport block variation:', error);
+    }
 });
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7bc2f40 and 61adb79.

⛔ Files ignored due to path filters (6)
  • build/blocks/climate/index.asset.php is excluded by !build/**
  • build/blocks/climate/index.js is excluded by !build/**
  • build/blocks/cuisine/index.asset.php is excluded by !build/**
  • build/blocks/cuisine/index.js is excluded by !build/**
  • build/blocks/transport/index.asset.php is excluded by !build/**
  • build/blocks/transport/index.js is excluded by !build/**
📒 Files selected for processing (3)
  • src/blocks/climate/index.js (1 hunks)
  • src/blocks/cuisine/index.js (1 hunks)
  • src/blocks/transport/index.js (4 hunks)
🧰 Additional context used
📓 Path-based instructions (12)
src/**/*.{js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use @wordpress/eslint-plugin for JavaScript linting

Files:

  • src/blocks/cuisine/index.js
  • src/blocks/climate/index.js
  • src/blocks/transport/index.js
src/**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{js,jsx,ts,tsx}: Use useBlockProps() in block edit/save components when applicable
Use the text domain tour-operator for JS i18n calls

Files:

  • src/blocks/cuisine/index.js
  • src/blocks/climate/index.js
  • src/blocks/transport/index.js
{assets,src}/**/*

📄 CodeRabbit inference engine (.github/instructions/block-theme-structure.instructions.md)

Keep SCSS/JS/images source assets in assets/ or src/

Files:

  • src/blocks/cuisine/index.js
  • src/blocks/climate/index.js
  • src/blocks/transport/index.js
**/*.{js,ts}

📄 CodeRabbit inference engine (.github/instructions/javascript-react.instructions.md)

**/*.{js,ts}: Use const or let instead of var for variable declarations
Use default parameters for function arguments where appropriate
Use @wordpress/api-fetch (optionally with addQueryArgs) for REST API requests
Register blocks via registerBlockType using block metadata (imported from block.json), and localize title/description/keywords
Use wp.media for media selection in custom components/utilities when needed
Create and register custom data stores with @wordpress/data (createReduxStore + register), and structure actions/selectors clearly
Initialize frontend interactivity after DOMContentLoaded and implement ARIA attributes for toggles (aria-controls, aria-expanded)
Handle AJAX form submissions with fetch, proper loading states, and user notices; restore UI state in finally
Implement accessibility utilities like focus trapping and polite screen reader announcements for dynamic content

Files:

  • src/blocks/cuisine/index.js
  • src/blocks/climate/index.js
  • src/blocks/transport/index.js
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.github/instructions/javascript-react.instructions.md)

**/*.{js,ts,jsx,tsx}: Prefer arrow functions for callbacks and inline handlers
Use object/array destructuring for cleaner code
Use template literals for string interpolation
Use async/await for promise handling with try/catch for errors
Use WordPress i18n APIs (__/_n/sprintf) with a consistent textdomain for all user-facing strings; include translator comments where needed
Use @wordpress/data dispatch/select for interacting with WP data stores (e.g., core/notices, core/editor)

Files:

  • src/blocks/cuisine/index.js
  • src/blocks/climate/index.js
  • src/blocks/transport/index.js
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/instructions/js-ts.instructions.md)

**/*.{ts,tsx,js,jsx}: Debounce user inputs to prevent excessive processing
Avoid blocking the UI thread (prefer async/non-blocking operations)

Files:

  • src/blocks/cuisine/index.js
  • src/blocks/climate/index.js
  • src/blocks/transport/index.js
**/*.{js,mjs,ts,tsx}

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

Defer non-critical JavaScript and avoid synchronous blocking operations

Files:

  • src/blocks/cuisine/index.js
  • src/blocks/climate/index.js
  • src/blocks/transport/index.js
**/*.{php,js,jsx,ts,tsx}

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

Internationalize user‑facing strings using WordPress i18n APIs

Files:

  • src/blocks/cuisine/index.js
  • src/blocks/climate/index.js
  • src/blocks/transport/index.js
**/*.{css,js,jsx,ts,tsx}

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

Minimize CSS/JS payload size

Files:

  • src/blocks/cuisine/index.js
  • src/blocks/climate/index.js
  • src/blocks/transport/index.js
**/*.{js,jsx,ts,tsx}

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

Lazy-load code and resources where possible

Files:

  • src/blocks/cuisine/index.js
  • src/blocks/climate/index.js
  • src/blocks/transport/index.js
**/*.{js,ts,tsx,jsx}

⚙️ CodeRabbit configuration file

**/*.{js,ts,tsx,jsx}: Perform a detailed review of the provided code with following key aspects in mind:

  • Review the code to ensure it is well-structured and adheres to best practices.
  • Verify compliance with WordPress coding standards and @wordpress/eslint-plugin rules.
  • Ensure the code is well-documented with proper JSDoc comments.
  • Check for security vulnerabilities and confirm the code is secure.
  • Optimize the code for performance, removing any unnecessary elements.
  • Validate JSDoc comments for accuracy, currency, and adherence to WordPress coding standards.
  • Ensure each line comment concludes with a period.
  • Confirm every JSDoc comment includes a @SInCE tag indicating the next version of the plugin to include the code.
  • Guarantee compatibility with the latest version of WordPress, avoiding deprecated functions or features.
  • Follow WordPress JavaScript coding standards and use WordPress script localization.
  • Use WordPress script dependencies and enqueue properly.
  • Ensure React/JSX best practices for blocks and modern JavaScript/TypeScript patterns.
  • Implement proper error handling and loading states.
  • Use WordPress components and design system where applicable.
  • For Tour Operator: Focus on tour booking interfaces, search functionality, and tour display components.

Files:

  • src/blocks/cuisine/index.js
  • src/blocks/climate/index.js
  • src/blocks/transport/index.js
src/blocks/**/*.{js,jsx,ts,tsx}

⚙️ CodeRabbit configuration file

src/blocks/**/*.{js,jsx,ts,tsx}: - Follow WordPress JavaScript coding standards and @wordpress/scripts configuration.

  • Use WordPress components from @wordpress/components and design system.
  • Implement proper React/JSX patterns for WordPress blocks.
  • Ensure proper WordPress script dependencies and localization.
  • Use WordPress data store patterns with @wordpress/data.
  • Implement proper error boundaries and loading states.
  • Follow modern JavaScript/TypeScript patterns with proper typing.
  • Ensure accessibility in interactive block components.
  • Use WordPress block editor APIs correctly (useBlockProps, InspectorControls, etc.).
  • Implement proper block validation and save/edit functionality.

Files:

  • src/blocks/cuisine/index.js
  • src/blocks/climate/index.js
  • src/blocks/transport/index.js
🧬 Code graph analysis (3)
src/blocks/cuisine/index.js (3)
src/blocks/climate/index.js (1)
  • conditionalRegister (184-188)
src/blocks/transport/index.js (1)
  • conditionalRegister (170-174)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/climate/index.js (4)
src/blocks/cuisine/index.js (1)
  • conditionalRegister (171-175)
src/blocks/transport/index.js (1)
  • conditionalRegister (170-174)
src/blocks/dress/index.js (1)
  • conditionalRegister (184-188)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/transport/index.js (3)
src/blocks/climate/index.js (1)
  • conditionalRegister (184-188)
src/blocks/cuisine/index.js (1)
  • conditionalRegister (171-175)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
⏰ 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). (2)
  • GitHub Check: review
  • GitHub Check: Summary
🔇 Additional comments (5)
src/blocks/climate/index.js (4)

1-2: LGTM: Imports are correct.

The imports properly follow WordPress standards, using the i18n API and the centralized conditional registration utility consistent with other destination blocks in this PR.


27-35: LGTM: Keywords and activation logic are well implemented.

The keywords are comprehensive and properly internationalized, improving block discoverability. The isActive predicate correctly uses optional chaining to match block variations by metadata className, which is a valid approach.


79-93: LGTM: Metadata bindings correctly configured.

The paragraph block correctly uses the bindings API to connect to the 'climate' post meta field. The absence of a content attribute is intentional and expected, as content will be populated dynamically from post meta. Whilst a previous review suggested adding a comment explaining this pattern, it follows standard WordPress bindings API conventions.


183-191: LGTM: Conditional registration correctly implemented.

The conditional registration setup correctly restricts the climate block variation to the 'destination' post type, following the exact pattern used in other destination blocks (cuisine, transport, dress). This fulfills the PR objective to implement conditional registration for destination-context awareness.

src/blocks/cuisine/index.js (1)

12-12: Verificação necessária: Integração de ícones em bloco picker vs. utilização dentro de blocos.

Análise do código revela que TODOS os blocos de variação no repositório usam strings de dashicon (exemplo: 'food', 'airplane', 'admin-site-alt3') para a propriedade icon no registrador de variações. Este padrão é consistente em todo o código base, incluindo wetu-map, visa, accommodation-related-tour e travel-styles.

O sistema de ícones centralizado (src/blocks/icons/) contém componentes React (exemplo: arrowDownIcon, bestMonthsToTravelIcon) que parecem destinados para renderização dentro de blocos, não para ícones do seletor de blocos. Os objetivos do PR mencionam "integração de sistema de ícones centralizado", mas é incerto se isto se aplica a ícones do seletor (que requerem strings) ou a ícones renderizados dentro de componentes de blocos.

Recomenda-se clarificar os objetivos do PR: se a alteração aplica-se apenas a ícones renderizados dentro de blocos, o código atual está correto. Se aplica-se a ícones do seletor de blocos, verificar se um ícone apropriado existe no sistema centralizado (actualmente não existe um ícone 'food' ou 'cuisine').

@github-actions github-actions bot added status:needs-review Awaiting code review and removed status:needs-review Awaiting code review area:ci Build and CI pipelines labels Nov 12, 2025
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 61adb79 and cbb2a42 commits.
Files selected (8)
  • src/blocks/additional-info/index.js (1)
  • src/blocks/banking/index.js (1)
  • src/blocks/climate/index.js (1)
  • src/blocks/cuisine/index.js (1)
  • src/blocks/dress/index.js (1)
  • src/blocks/electricity/index.js (1)
  • src/blocks/health/index.js (1)
  • src/blocks/transport/index.js (1)
Files not summarized due to errors (8)
  • src/blocks/additional-info/index.js (diff tokens exceeds limit)
  • src/blocks/banking/index.js (diff tokens exceeds limit)
  • src/blocks/climate/index.js (diff tokens exceeds limit)
  • src/blocks/cuisine/index.js (diff tokens exceeds limit)
  • src/blocks/dress/index.js (diff tokens exceeds limit)
  • src/blocks/electricity/index.js (diff tokens exceeds limit)
  • src/blocks/health/index.js (diff tokens exceeds limit)
  • src/blocks/transport/index.js (diff tokens exceeds limit)
Files not reviewed due to errors (7)
  • src/blocks/cuisine/index.js (no response)
  • src/blocks/health/index.js (no response)
  • src/blocks/electricity/index.js (no response)
  • src/blocks/additional-info/index.js (no response)
  • src/blocks/banking/index.js (no response)
  • src/blocks/dress/index.js (no response)
  • src/blocks/transport/index.js (no response)
Files skipped from review due to trivial changes (1)
  • src/blocks/climate/index.js (diff too large)
Review comments generated (0)
  • Review: 0
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

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: 6

♻️ Duplicate comments (19)
src/blocks/cuisine/index.js (2)

1-178: Add comprehensive JSDoc comments and @SInCE tags.

The file lacks JSDoc documentation required by the coding guidelines. All functions should have JSDoc comments including @SInCE tags indicating version 2.1.0.


53-53: String concatenation in translatable content can cause issues for translators.

The __() function should wrap the entire HTML string including the <strong> tags to provide proper context for translation.

Also applies to: 128-128

src/blocks/transport/index.js (4)

20-22: Consider using metadata.name for variation matching.

Whilst the current isActive predicate comparing className is functional (since className is defined on line 27), using metadata.name would be more semantically consistent with WordPress block variation patterns and align with the metadata-driven approach used throughout the variation definition.

Apply this diff to use metadata-based matching:

 isActive: (blockAttributes, variationAttributes) => {
-    return blockAttributes.className === variationAttributes.className;
+    return blockAttributes.metadata?.name === variationAttributes.metadata?.name;
 },

5-6: Add JSDoc documentation for the function.

The registerTransportVariation function lacks JSDoc documentation. According to coding guidelines, all functions must include proper JSDoc comments with a @since tag indicating the next version of the plugin (e.g., @since 2.1.0).

Apply this diff to add proper documentation:

+/**
+ * Registers the Transport block variation for destination post types.
+ *
+ * Creates a core/group variation with transport-specific attributes,
+ * innerBlocks structure, and metadata bindings for destination contexts.
+ *
+ * @since 2.1.0
+ */
 const registerTransportVariation = () => {

As per coding guidelines.


12-12: Replace hardcoded icon with custom SVG icon.

The transport block uses the hardcoded Dashicon string 'car', whilst other destination blocks (e.g., climate, ends-in) use custom SVG icons that align with the design system (20x20 viewBox, currentColor for fill/stroke). The PR objectives explicitly state to "integrate a centralized icon system" and "replace inline/hardcoded icons".

Replace the hardcoded string with a custom SVG icon following the pattern used by other blocks:

-icon: 'car',
+icon: (
+    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width="20" height="20">
+        <path fill="currentColor" d="M15 8h-1V6c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v2H5c-1.1 0-2 .9-2 2v5h2c0 1.1.9 2 2 2s2-.9 2-2h2c0 1.1.9 2 2 2s2-.9 2-2h2v-5c0-1.1-.9-2-2-2zM8 6h4v2H8V6zm-1 9c-.6 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.4 1-1 1zm6 0c-.6 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.4 1-1 1z"/>
+    </svg>
+),

53-53: Wrap entire HTML string in translation function.

Both lines 53 and 127 use string concatenation with __(), placing HTML tags outside the translation function. This prevents translators from seeing the full context and may cause translation issues. The entire HTML string, including tags, should be wrapped in __() to provide proper context for translators.

Apply these diffs to fix both occurrences:

Line 53:

-content: '<strong>' + __('Transport', 'tour-operator') + '</strong>',
+content: __('<strong>Transport</strong>', 'tour-operator'),

Line 127:

-content: '<strong>' + __('Transport', 'tour-operator') + '</strong>',
+content: __('<strong>Transport</strong>', 'tour-operator'),

Also applies to: 127-127

src/blocks/additional-info/index.js (3)

4-176: Add comprehensive JSDoc documentation.

The file lacks JSDoc comments required by the coding guidelines. Add a file-level JSDoc block describing the module and include @SInCE tags for all functions.

As per coding guidelines.

Apply this pattern:

+/**
+ * Additional Information block variation registration.
+ *
+ * Registers a conditional block variation for displaying additional destination information.
+ * Only available in destination post type and template contexts.
+ *
+ * @since 2.1.0
+ */
+
 import { __ } from '@wordpress/i18n';
 import { registerForPostTypesAndTemplates } from '@utils/conditional-block-registration.js';

 wp.domReady(() => {
+    /**
+     * Registers the Additional Information block variation.
+     *
+     * Creates a variation of core/group block with destination-specific metadata bindings.
+     *
+     * @since 2.1.0
+     */
     const registerAdditionalInfoVariation = () => {

53-53: Fix string concatenation in translatable content.

String concatenation with HTML tags breaks translator context. The __() function should wrap the entire string including HTML tags so translators see the complete context.

Apply this diff:

-                                        content: '<strong>' + __('General', 'tour-operator') + '</strong>',
+                                        content: __('<strong>General</strong>', 'tour-operator'),

127-127: Fix string concatenation in translatable content (duplicate).

Same issue as line 53: string concatenation breaks translator context.

Apply this diff:

-                                            content: '<strong>' + __('General', 'tour-operator') + '</strong>',
+                                            content: __('<strong>General</strong>', 'tour-operator'),
src/blocks/climate/index.js (3)

4-6: Add JSDoc comments for the registration function.

The coding guidelines require JSDoc comments for all functions, including an @SInCE tag indicating the next version. Add documentation for registerClimateVariation explaining its purpose, parameters (if any), and the version.

Apply this diff to add JSDoc comments:

 wp.domReady(() => {
-    // Register variation function
+    /**
+     * Registers the Climate block variation for destination post types.
+     *
+     * Creates a variation of core/group that displays climate and weather
+     * information with metadata bindings to the 'climate' post meta field.
+     *
+     * @since 2.1.0
+     */
     const registerClimateVariation = () => {

As per coding guidelines.


12-25: Replace inline SVG with icon from block.json.

The PR objectives (#691) require replacing inline icons with the centralized icon system. Your block.json already defines "icon": "cloud" (WordPress Dashicon), yet this code overrides it with an inline SVG. Remove the inline icon property from the variation registration to allow WordPress to use the icon defined in block.json.

Apply this diff to remove the inline icon:

         wp.blocks.registerBlockVariation('core/group', {
             name: 'lsx-tour-operator/climate',
             title: __('Climate', 'tour-operator'),
             description: __('Display climate and weather information for destinations.', 'tour-operator'),
-            icon: wp.element.createElement(
-                'svg',
-                {
-                    xmlns: 'http://www.w3.org/2000/svg',
-                    width: 20,
-                    height: 20,
-                    viewBox: '0 0 20 20',
-                    fill: 'none',
-                },
-                wp.element.createElement('path', {
-                    d: 'M15.175 1.5371C15.3281 1.5996 15.4406 1.7371 15.4719 1.8996L16 4.4996L18.6 5.0246C18.7625 5.05897 18.8969 5.16835 18.9625 5.32147C19.0281 5.4746 19.0094 5.6496 18.9188 5.7871L17.4531 7.99647L18.9188 10.2058C19.0094 10.3433 19.0281 10.5183 18.9625 10.6715C18.8969 10.8246 18.7625 10.9371 18.6 10.9683L16.6562 11.3652C16.2844 11.0933 15.8719 10.8777 15.425 10.7277C15.3469 10.3308 15.2125 9.95585 15.0281 9.6121C15.325 9.14647 15.5 8.59335 15.5 7.99647C15.5 6.34022 14.1562 4.99647 12.5 4.99647C11.0031 4.99647 9.7625 6.09335 9.5375 7.5246C8.70938 6.89022 7.67813 6.50897 6.55625 6.49647L6.08437 5.7871C5.99375 5.6496 5.975 5.4746 6.04063 5.32147C6.10625 5.16835 6.24062 5.05585 6.40312 5.0246L9 4.4996L9.525 1.8996C9.55937 1.7371 9.66875 1.60272 9.82187 1.5371C9.975 1.47147 10.15 1.49022 10.2875 1.58085L12.5 3.0496L14.7094 1.58397C14.8469 1.49335 15.0219 1.4746 15.175 1.54022V1.5371ZM14 7.9996C14 8.11835 13.9875 8.23397 13.9594 8.34647C13.2812 7.81522 12.4281 7.4996 11.5 7.4996C11.3562 7.4996 11.2156 7.50585 11.0781 7.52147C11.2781 6.92772 11.8406 6.4996 12.5 6.4996C13.3281 6.4996 14 7.17147 14 7.9996ZM4 17.9996C2.34375 17.9996 1 16.6558 1 14.9996C1 13.6715 1.8625 12.5433 3.05938 12.1496C3.01875 11.9402 3 11.7215 3 11.4996C3 9.56522 4.56562 7.9996 6.5 7.9996C7.84688 7.9996 9.01562 8.75897 9.6 9.8746C10.0594 9.34022 10.7406 8.9996 11.5 8.9996C12.8813 8.9996 14 10.1183 14 11.4996C14 11.6715 13.9812 11.8371 13.95 11.9996C13.9656 11.9996 13.9844 11.9996 14 11.9996C15.6562 11.9996 17 13.3433 17 14.9996C17 16.6558 15.6562 17.9996 14 17.9996H4Z',
-                    fill: '#currentColor',
-                })
-            ),
             category: 'lsx-tour-operator',

66-66: Wrap entire HTML string in translation function for proper translator context.

String concatenation in translatable content causes issues for translators. The __() function should wrap the entire HTML string including the <strong> tags to provide proper context for translation.

Apply this diff to lines 66 and 141:

-                                        content: '<strong>' + __('Climate', 'tour-operator') + '</strong>',
+                                        content: __('<strong>Climate</strong>', 'tour-operator'),

Also applies to: 141-141

src/blocks/health/index.js (2)

53-53: Wrap the entire HTML string in the translation function.

String concatenation in translatable content causes issues for translators. The __() function should wrap the entire HTML string including the <strong> tags to provide proper context for translation.

Apply this diff:

-                                        content: '<strong>' + __('Health', 'tour-operator') + '</strong>',
+                                        content: __('<strong>Health</strong>', 'tour-operator'),

128-128: Wrap the entire HTML string in the translation function.

Same issue as line 53: string concatenation in translatable content prevents translators from seeing the full context. The __() function should wrap the entire HTML string including the <strong> tags.

Apply this diff:

-                                            content: '<strong>' + __('Health', 'tour-operator') + '</strong>',
+                                            content: __('<strong>Health</strong>', 'tour-operator'),
src/blocks/electricity/index.js (2)

53-53: Fix translatable string to include HTML tags.

This issue was previously flagged but remains unresolved. The HTML <strong> tags should be inside the translatable string to provide proper context for translators. Concatenating HTML outside the translation function can cause localisation issues.

Apply this diff:

-                                        content: '<strong>' + __('Electricity', 'tour-operator') + '</strong>',
+                                        content: __('<strong>Electricity</strong>', 'tour-operator'),

128-128: Fix translatable string to include HTML tags.

Same issue as Line 53. The HTML <strong> tags should be inside the translatable string to provide proper context for translators.

Apply this diff:

-                                            content: '<strong>' + __('Electricity', 'tour-operator') + '</strong>',
+                                            content: __('<strong>Electricity</strong>', 'tour-operator'),
src/blocks/dress/index.js (3)

21-24: Use a valid colour keyword for the SVG fill.

'#currentColor' is not a valid CSS colour token, so the icon will not inherit the theme colour correctly. Switch to 'currentColor' (without the #) to let the icon follow editor styling.

-                    fill: '#currentColor',
+                    fill: 'currentColor',

66-66: Wrap the entire HTML string in the translation function.

String concatenation in translatable content can cause issues for translators. The __() function should wrap the entire HTML string including the <strong> tags to provide proper context for translation.

-                                        content: '<strong>' + __('Dress', 'tour-operator') + '</strong>',
+                                        content: __('<strong>Dress</strong>', 'tour-operator'),

33-35: Guard against undefined className values.

Whilst the predicate now correctly compares className directly (good fix from previous review), it will still match unrelated blocks when both className values are undefined. Add a guard to ensure only blocks with the intended className are matched.

-            isActive: (blockAttributes, variationAttributes) => {
-                return blockAttributes.className === variationAttributes.className;
-            },
+            isActive: (blockAttributes, variationAttributes) => {
+                return blockAttributes?.className === variationAttributes?.className && 
+                       blockAttributes?.className !== undefined;
+            },
🧹 Nitpick comments (7)
src/blocks/cuisine/index.js (1)

20-27: Consider comparing metadata.name in isActive predicate for consistency.

While the current className comparison should work, WordPress best practice for block variations recommends comparing metadata.name instead. This approach is more reliable and aligns with the recommended pattern across the WordPress ecosystem.

Apply this diff:

 isActive: (blockAttributes, variationAttributes) => {
-    return blockAttributes.className === variationAttributes.className;
+    return blockAttributes.metadata?.name === variationAttributes.metadata?.name;
 },
src/blocks/health/index.js (1)

24-26: Consider internationalizing the metadata name.

The metadata.name is set to a static string 'Health'. Whilst this may be intentional for internal use, consider whether it should be internationalized for consistency with the rest of the variation metadata.

                 metadata: {
-                    name: 'Health',
+                    name: __('Health', 'tour-operator'),
                 },
src/blocks/electricity/index.js (2)

20-22: Add optional chaining to the isActive predicate for robustness.

Whilst the className comparison is now correct (addressing the previous review), adding optional chaining would make this more defensive against edge cases where className might be undefined.

Apply this diff:

             isActive: (blockAttributes, variationAttributes) => {
-                return blockAttributes.className === variationAttributes.className;
+                return blockAttributes?.className === variationAttributes?.className;
             },

170-178: Add error handling for registration failures.

The coding guidelines require proper error handling. If the conditional registration fails, there's no feedback or graceful degradation.

As per coding guidelines.

Apply this diff to add error handling:

     // Initialize conditional registration
     const conditionalRegister = registerForPostTypesAndTemplates(
         ['destination'], // Supported post types
         ['destination'], // Template slug patterns
         registerElectricityVariation
     );

-    conditionalRegister();
+    try {
+        conditionalRegister();
+    } catch (error) {
+        console.error('Failed to register Electricity block variation:', error);
+    }
 });
src/blocks/banking/index.js (3)

20-22: Consider adding optional chaining for defensive coding.

Whilst the main issue from the previous review has been addressed (comparing className instead of metadata?.className), adding optional chaining to blockAttributes would make the code more defensive against edge cases.

             isActive: (blockAttributes, variationAttributes) => {
-                return blockAttributes.className === variationAttributes.className;
+                return blockAttributes?.className === variationAttributes.className;
             },

4-6: Consider adding JSDoc documentation.

According to the coding guidelines, functions should be documented with JSDoc comments including a @since tag. Adding documentation would improve code maintainability.

 wp.domReady(() => {
-    // Register variation function
+    /**
+     * Registers the Banking block variation for destination contexts.
+     *
+     * Creates a group block variation with banking-specific metadata,
+     * nested blocks for title and description, and a "View More" button.
+     *
+     * @since 2.1.0
+     */
     const registerBankingVariation = () => {

6-194: Consider adding error handling for block registration.

Wrapping the block registration in a try-catch block would improve robustness and provide better debugging information if registration fails.

     const registerBankingVariation = () => {
-
+        try {
         wp.blocks.registerBlockVariation('core/group', {
             name: 'lsx-tour-operator/banking',
             // ... rest of configuration
         });
+        } catch (error) {
+            // eslint-disable-next-line no-console
+            console.error('Failed to register Banking block variation:', error);
+        }
     };
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 61adb79 and cbb2a42.

⛔ Files ignored due to path filters (20)
  • build/blocks/additional-info/index.asset.php is excluded by !build/**
  • build/blocks/additional-info/index.js is excluded by !build/**
  • build/blocks/banking/index.asset.php is excluded by !build/**
  • build/blocks/banking/index.js is excluded by !build/**
  • build/blocks/climate/index.asset.php is excluded by !build/**
  • build/blocks/climate/index.js is excluded by !build/**
  • build/blocks/cuisine/index.asset.php is excluded by !build/**
  • build/blocks/cuisine/index.js is excluded by !build/**
  • build/blocks/dress/index.asset.php is excluded by !build/**
  • build/blocks/dress/index.js is excluded by !build/**
  • build/blocks/electricity/index.asset.php is excluded by !build/**
  • build/blocks/electricity/index.js is excluded by !build/**
  • build/blocks/health/index.asset.php is excluded by !build/**
  • build/blocks/health/index.js is excluded by !build/**
  • build/blocks/sticky-menu/style-index-rtl.css is excluded by !build/**
  • build/blocks/sticky-menu/style-index.css is excluded by !build/**
  • build/blocks/transport/index.asset.php is excluded by !build/**
  • build/blocks/transport/index.js is excluded by !build/**
  • build/style-rtl.css is excluded by !build/**
  • build/style.css is excluded by !build/**
📒 Files selected for processing (8)
  • src/blocks/additional-info/index.js (1 hunks)
  • src/blocks/banking/index.js (1 hunks)
  • src/blocks/climate/index.js (1 hunks)
  • src/blocks/cuisine/index.js (1 hunks)
  • src/blocks/dress/index.js (1 hunks)
  • src/blocks/electricity/index.js (1 hunks)
  • src/blocks/health/index.js (1 hunks)
  • src/blocks/transport/index.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (12)
src/**/*.{js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use @wordpress/eslint-plugin for JavaScript linting

Files:

  • src/blocks/banking/index.js
  • src/blocks/health/index.js
  • src/blocks/dress/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/electricity/index.js
  • src/blocks/climate/index.js
src/**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{js,jsx,ts,tsx}: Use useBlockProps() in block edit/save components when applicable
Use the text domain tour-operator for JS i18n calls

Files:

  • src/blocks/banking/index.js
  • src/blocks/health/index.js
  • src/blocks/dress/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/electricity/index.js
  • src/blocks/climate/index.js
{assets,src}/**/*

📄 CodeRabbit inference engine (.github/instructions/block-theme-structure.instructions.md)

Keep SCSS/JS/images source assets in assets/ or src/

Files:

  • src/blocks/banking/index.js
  • src/blocks/health/index.js
  • src/blocks/dress/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/electricity/index.js
  • src/blocks/climate/index.js
**/*.{js,ts}

📄 CodeRabbit inference engine (.github/instructions/javascript-react.instructions.md)

**/*.{js,ts}: Use const or let instead of var for variable declarations
Use default parameters for function arguments where appropriate
Use @wordpress/api-fetch (optionally with addQueryArgs) for REST API requests
Register blocks via registerBlockType using block metadata (imported from block.json), and localize title/description/keywords
Use wp.media for media selection in custom components/utilities when needed
Create and register custom data stores with @wordpress/data (createReduxStore + register), and structure actions/selectors clearly
Initialize frontend interactivity after DOMContentLoaded and implement ARIA attributes for toggles (aria-controls, aria-expanded)
Handle AJAX form submissions with fetch, proper loading states, and user notices; restore UI state in finally
Implement accessibility utilities like focus trapping and polite screen reader announcements for dynamic content

Files:

  • src/blocks/banking/index.js
  • src/blocks/health/index.js
  • src/blocks/dress/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/electricity/index.js
  • src/blocks/climate/index.js
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.github/instructions/javascript-react.instructions.md)

**/*.{js,ts,jsx,tsx}: Prefer arrow functions for callbacks and inline handlers
Use object/array destructuring for cleaner code
Use template literals for string interpolation
Use async/await for promise handling with try/catch for errors
Use WordPress i18n APIs (__/_n/sprintf) with a consistent textdomain for all user-facing strings; include translator comments where needed
Use @wordpress/data dispatch/select for interacting with WP data stores (e.g., core/notices, core/editor)

Files:

  • src/blocks/banking/index.js
  • src/blocks/health/index.js
  • src/blocks/dress/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/electricity/index.js
  • src/blocks/climate/index.js
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/instructions/js-ts.instructions.md)

**/*.{ts,tsx,js,jsx}: Debounce user inputs to prevent excessive processing
Avoid blocking the UI thread (prefer async/non-blocking operations)

Files:

  • src/blocks/banking/index.js
  • src/blocks/health/index.js
  • src/blocks/dress/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/electricity/index.js
  • src/blocks/climate/index.js
**/*.{js,mjs,ts,tsx}

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

Defer non-critical JavaScript and avoid synchronous blocking operations

Files:

  • src/blocks/banking/index.js
  • src/blocks/health/index.js
  • src/blocks/dress/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/electricity/index.js
  • src/blocks/climate/index.js
**/*.{php,js,jsx,ts,tsx}

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

Internationalize user‑facing strings using WordPress i18n APIs

Files:

  • src/blocks/banking/index.js
  • src/blocks/health/index.js
  • src/blocks/dress/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/electricity/index.js
  • src/blocks/climate/index.js
**/*.{css,js,jsx,ts,tsx}

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

Minimize CSS/JS payload size

Files:

  • src/blocks/banking/index.js
  • src/blocks/health/index.js
  • src/blocks/dress/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/electricity/index.js
  • src/blocks/climate/index.js
**/*.{js,jsx,ts,tsx}

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

Lazy-load code and resources where possible

Files:

  • src/blocks/banking/index.js
  • src/blocks/health/index.js
  • src/blocks/dress/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/electricity/index.js
  • src/blocks/climate/index.js
**/*.{js,ts,tsx,jsx}

⚙️ CodeRabbit configuration file

**/*.{js,ts,tsx,jsx}: Perform a detailed review of the provided code with following key aspects in mind:

  • Review the code to ensure it is well-structured and adheres to best practices.
  • Verify compliance with WordPress coding standards and @wordpress/eslint-plugin rules.
  • Ensure the code is well-documented with proper JSDoc comments.
  • Check for security vulnerabilities and confirm the code is secure.
  • Optimize the code for performance, removing any unnecessary elements.
  • Validate JSDoc comments for accuracy, currency, and adherence to WordPress coding standards.
  • Ensure each line comment concludes with a period.
  • Confirm every JSDoc comment includes a @SInCE tag indicating the next version of the plugin to include the code.
  • Guarantee compatibility with the latest version of WordPress, avoiding deprecated functions or features.
  • Follow WordPress JavaScript coding standards and use WordPress script localization.
  • Use WordPress script dependencies and enqueue properly.
  • Ensure React/JSX best practices for blocks and modern JavaScript/TypeScript patterns.
  • Implement proper error handling and loading states.
  • Use WordPress components and design system where applicable.
  • For Tour Operator: Focus on tour booking interfaces, search functionality, and tour display components.

Files:

  • src/blocks/banking/index.js
  • src/blocks/health/index.js
  • src/blocks/dress/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/electricity/index.js
  • src/blocks/climate/index.js
src/blocks/**/*.{js,jsx,ts,tsx}

⚙️ CodeRabbit configuration file

src/blocks/**/*.{js,jsx,ts,tsx}: - Follow WordPress JavaScript coding standards and @wordpress/scripts configuration.

  • Use WordPress components from @wordpress/components and design system.
  • Implement proper React/JSX patterns for WordPress blocks.
  • Ensure proper WordPress script dependencies and localization.
  • Use WordPress data store patterns with @wordpress/data.
  • Implement proper error boundaries and loading states.
  • Follow modern JavaScript/TypeScript patterns with proper typing.
  • Ensure accessibility in interactive block components.
  • Use WordPress block editor APIs correctly (useBlockProps, InspectorControls, etc.).
  • Implement proper block validation and save/edit functionality.

Files:

  • src/blocks/banking/index.js
  • src/blocks/health/index.js
  • src/blocks/dress/index.js
  • src/blocks/cuisine/index.js
  • src/blocks/additional-info/index.js
  • src/blocks/transport/index.js
  • src/blocks/electricity/index.js
  • src/blocks/climate/index.js
🧬 Code graph analysis (8)
src/blocks/banking/index.js (1)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/health/index.js (1)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/dress/index.js (1)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/cuisine/index.js (1)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/additional-info/index.js (8)
src/blocks/banking/index.js (1)
  • conditionalRegister (197-201)
src/blocks/climate/index.js (1)
  • conditionalRegister (184-188)
src/blocks/cuisine/index.js (1)
  • conditionalRegister (171-175)
src/blocks/dress/index.js (1)
  • conditionalRegister (184-188)
src/blocks/electricity/index.js (1)
  • conditionalRegister (171-175)
src/blocks/health/index.js (1)
  • conditionalRegister (171-175)
src/blocks/transport/index.js (1)
  • conditionalRegister (170-174)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/transport/index.js (2)
src/blocks/additional-info/index.js (1)
  • conditionalRegister (169-173)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/electricity/index.js (1)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
src/blocks/climate/index.js (2)
src/blocks/additional-info/index.js (1)
  • conditionalRegister (169-173)
src/js/conditional-block-registration.js (1)
  • registerForPostTypesAndTemplates (170-177)
⏰ 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). (2)
  • GitHub Check: review
  • GitHub Check: Summary
🔇 Additional comments (21)
src/blocks/additional-info/index.js (8)

1-2: LGTM: Imports are correct.

The imports follow WordPress coding standards and use the proper webpack alias for utility imports.


8-19: LGTM: Block variation metadata is well-structured.

The variation registration includes proper i18n for title, description, and keywords using the correct textdomain.


20-22: LGTM: isActive predicate is correct.

The isActive function correctly compares className at the top level of both blockAttributes and variationAttributes, matching the className defined at line 27. The previous metadata.className issue has been resolved.


23-31: LGTM: Attributes are properly structured.

The attributes configuration is correct with metadata, className, and layout properties appropriately defined.


66-80: LGTM: Metadata bindings are correctly configured.

The paragraph block properly uses metadata bindings to connect to the 'additional_info' post-meta field via the 'lsx/post-meta' source.


99-101: LGTM: Supports configuration is appropriate.

Disabling renaming for this destination-specific variation is a reasonable choice to maintain consistency.


102-164: LGTM: Example configuration is comprehensive.

The example provides a thorough inserter preview with properly internationalized content that demonstrates the block's structure and purpose.


169-175: LGTM: Conditional registration is correctly implemented.

The conditional registration pattern matches the other destination blocks and properly restricts this variation to destination post types and templates. The immediate invocation ensures proper initialization.

src/blocks/climate/index.js (2)

1-2: LGTM!

The imports are clean and follow WordPress patterns. The i18n import enables proper internationalization, and the conditional registration utility import aligns with the PR's objective of standardized conditional registration.


183-190: LGTM!

The conditional registration implementation correctly restricts the climate variation to destination post types and templates, aligning with the PR objectives. The pattern follows the established approach used in other blocks like additional-info.

src/blocks/health/index.js (1)

170-177: Conditional registration implementation looks solid.

The use of registerForPostTypesAndTemplates correctly restricts the Health variation to destination post types and templates, aligning with the PR objectives to limit block availability to destination editing contexts.

src/blocks/electricity/index.js (3)

1-2: Imports are properly structured.

The imports correctly use WordPress i18n APIs and the custom conditional registration utility with webpack aliasing.


23-31: Attributes are properly configured.

The metadata, className, and layout attributes are correctly structured for the block variation.


86-98: Button configuration is correctly structured.

The button block with internationalized text and theme-aware styling is properly configured.

src/blocks/dress/index.js (3)

1-4: LGTM! Proper imports and DOM readiness check.

The imports and domReady wrapper follow WordPress coding standards correctly.


98-111: LGTM! Button block properly configured.

The button text is correctly internationalized using the text attribute, which is the proper approach for button blocks.


184-190: LGTM! Conditional registration properly implemented.

The conditional registration correctly uses the utility function to limit block availability to destination contexts.

src/blocks/banking/index.js (4)

1-2: LGTM!

Imports are correctly structured using WordPress i18n and the conditional registration utility.


32-112: LGTM!

The innerBlocks structure is well-organised with proper metadata, internationalized names, and correct post meta bindings. The nested group structure provides good flexibility for content layout.


116-192: LGTM!

The example configuration is comprehensive and provides a realistic preview for the block inserter. The sample content on line 167 effectively demonstrates the block's purpose.


197-203: LGTM!

The conditional registration correctly restricts the Banking block variation to destination post types and templates, aligning with the PR objectives. The implementation is clean and uses the shared utility appropriately.

Copy link
Copy Markdown
Collaborator

@krugazul krugazul left a comment

Choose a reason for hiding this comment

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

@tibiii I have gone through the changes locally, and tested out the blocks all is working thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:block-editor lang:css Stylesheets lang:javascript lang:php PHP code meta:needs-changelog Requires a changelog entry before merge status:needs-review Awaiting code review

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Block Audit: additional-info, banking, climate, cuisine, dress, electricity, health, transport (Destination post type meta & icons integration)

3 participants