Skip to content

Comments

583 standardize block metadata#613

Closed
tibiii wants to merge 11 commits into2.1-trunkfrom
583-standardize-block-meta
Closed

583 standardize block metadata#613
tibiii wants to merge 11 commits into2.1-trunkfrom
583-standardize-block-meta

Conversation

@tibiii
Copy link
Contributor

@tibiii tibiii commented Sep 4, 2025

This PR standardizes block metadata handling across all Tour Operator blocks, refactoring inconsistent block registration code for improved WordPress.org plugin directory compatibility. The changes establish consistent metadata structure, proper internationalization support, and enhanced block editor functionality.

Standardized block.json metadata across all blocks with textdomain, descriptions, icons, and keywords
Added example configurations for all blocks to improve block editor preview experience
Refactored JavaScript code for consistent formatting and code quality improvements

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 4, 2025

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.

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.

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

168 files out of 299 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 583-standardize-block-meta

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.

@tibiii tibiii linked an issue Sep 4, 2025 that may be closed by this pull request
7 tasks
@github-project-automation github-project-automation bot moved this to Needs Triage in Tour Operator Sep 4, 2025
@tibiii tibiii added this to the 2.1.0 milestone Sep 4, 2025
@tibiii tibiii self-assigned this Sep 4, 2025
…o 583-standardize-block-meta

# Conflicts:
#	package.json
@github-actions
Copy link

github-actions bot commented Sep 4, 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.

Copy link

@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 385fe3b and f95ad38 commits.
Files selected (28)
  • .eslintrc (1)
  • .prettierrc (1)
  • build/blocks/modal-button/index.js (1)
  • changelog.md (1)
  • src/blocks/accommodation-related-accommodation/index.js (2)
  • src/blocks/accommodation-related-destination/index.js (1)
  • src/blocks/accommodation-related-tour/index.js (1)
  • src/blocks/accommodation-type/index.js (1)
  • src/blocks/additional-info/index.js (1)
  • src/blocks/banking/index.js (1)
  • src/blocks/banner-cover/index.js (1)
  • src/blocks/best-time-to-visit/index.js (1)
  • src/blocks/booking-validity-start/index.js (1)
  • src/blocks/checkin-time/index.js (1)
  • src/blocks/checkout-time/index.js (1)
  • src/blocks/climate/index.js (1)
  • src/blocks/cuisine/index.js (1)
  • src/blocks/day-by-day/index.js (1)
  • src/blocks/departs-from/index.js (1)
  • src/blocks/destination-to-accommodation/index.js (1)
  • src/blocks/dress/index.js (1)
  • src/blocks/duration/index.js (3)
  • src/blocks/electricity/index.js (1)
  • src/blocks/ends-in/index.js (1)
  • src/blocks/facilities/index.js (1)
  • src/blocks/facts-country-wrapper/index.js (1)
  • src/blocks/facts-regions-wrapper/index.js (1)
  • src/blocks/featured-accommodation/index.js (1)
Files ignored due to filter (103)
  • build/blocks/accommodation-related-accommodation/block.json
  • build/blocks/accommodation-related-destination/block.json
  • build/blocks/accommodation-related-tour/block.json
  • build/blocks/accommodation-type/block.json
  • build/blocks/additional-info/block.json
  • build/blocks/banking/block.json
  • build/blocks/banner-cover/block.json
  • build/blocks/best-time-to-visit/block.json
  • build/blocks/booking-validity-start/block.json
  • build/blocks/checkin-time/block.json
  • build/blocks/checkout-time/block.json
  • build/blocks/climate/block.json
  • build/blocks/cuisine/block.json
  • build/blocks/day-by-day/block.json
  • build/blocks/departs-from/block.json
  • build/blocks/destination-to-accommodation/block.json
  • build/blocks/dress/block.json
  • build/blocks/duration/block.json
  • build/blocks/electricity/block.json
  • build/blocks/ends-in/block.json
  • build/blocks/facilities/block.json
  • build/blocks/facts-country-wrapper/block.json
  • build/blocks/facts-regions-wrapper/block.json
  • build/blocks/featured-accommodation/block.json
  • build/blocks/featured-destinations/block.json
  • build/blocks/featured-tours/block.json
  • build/blocks/gallery/block.json
  • build/blocks/google-map/block.json
  • build/blocks/group-size/block.json
  • build/blocks/health/block.json
  • build/blocks/icons/block.json
  • build/blocks/included/block.json
  • build/blocks/itinerary/block.json
  • build/blocks/lsx-destination-to-tour/block.json
  • build/blocks/minimum-child-age/block.json
  • build/blocks/modal-button/block.json
  • build/blocks/more-link/block.json
  • build/blocks/not-included/block.json
  • build/blocks/number-of-rooms/block.json
  • build/blocks/permalink-button/block.json
  • build/blocks/price-include-exclude/block.json
  • build/blocks/price/block.json
  • build/blocks/rating/block.json
  • build/blocks/regions/block.json
  • build/blocks/related-regions/block.json
  • build/blocks/review-related-accommodation/block.json
  • build/blocks/review-related-destination/block.json
  • build/blocks/review-related-tour/block.json
  • build/blocks/safety/block.json
  • build/blocks/single-supplement-wrapper/block.json
  • build/blocks/special-interests/block.json
  • build/blocks/spoken-languages/block.json
  • build/blocks/suggested-visitor-types/block.json
  • build/blocks/tagline/block.json
  • build/blocks/tour-related-accommodation/block.json
  • build/blocks/tour-related-destination/block.json
  • build/blocks/tour-related-tour/block.json
  • build/blocks/transport/block.json
  • build/blocks/travel-styles/block.json
  • build/blocks/unit-rooms/block.json
  • build/blocks/units/block.json
  • build/blocks/videos/block.json
  • build/blocks/visa/block.json
  • build/blocks/wetu-map/block.json
  • package-lock.json
  • package.json
  • src/blocks/accommodation-related-accommodation/block.json
  • src/blocks/accommodation-related-destination/block.json
  • src/blocks/accommodation-related-tour/block.json
  • src/blocks/accommodation-type/block.json
  • src/blocks/additional-info/block.json
  • src/blocks/banking/block.json
  • src/blocks/banner-cover/block.json
  • src/blocks/best-time-to-visit/block.json
  • src/blocks/booking-validity-start/block.json
  • src/blocks/checkin-time/block.json
  • src/blocks/checkout-time/block.json
  • src/blocks/climate/block.json
  • src/blocks/cuisine/block.json
  • src/blocks/day-by-day/block.json
  • src/blocks/departs-from/block.json
  • src/blocks/destination-to-accommodation/block.json
  • src/blocks/dress/block.json
  • src/blocks/duration/block.json
  • src/blocks/electricity/block.json
  • src/blocks/ends-in/block.json
  • src/blocks/facilities/block.json
  • src/blocks/facts-country-wrapper/block.json
  • src/blocks/facts-regions-wrapper/block.json
  • src/blocks/featured-accommodation/block.json
  • src/blocks/featured-destinations/block.json
  • src/blocks/featured-tours/block.json
  • src/blocks/gallery/block.json
  • src/blocks/google-map/block.json
  • src/blocks/group-size/block.json
  • src/blocks/health/block.json
  • src/blocks/icons/block.json
  • src/blocks/included/block.json
  • src/blocks/itinerary/block.json
  • src/blocks/lsx-destination-to-tour/block.json
  • src/blocks/minimum-child-age/block.json
  • src/blocks/more-link/block.json
  • src/blocks/not-included/block.json
Files not summarized due to errors (28)
  • build/blocks/modal-button/index.js (diff tokens exceeds limit)
  • .eslintrc (nothing obtained from openai)
  • src/blocks/accommodation-related-accommodation/index.js (nothing obtained from openai)
  • changelog.md (nothing obtained from openai)
  • src/blocks/accommodation-related-tour/index.js (nothing obtained from openai)
  • src/blocks/accommodation-related-destination/index.js (nothing obtained from openai)
  • .prettierrc (nothing obtained from openai)
  • src/blocks/accommodation-type/index.js (nothing obtained from openai)
  • src/blocks/additional-info/index.js (nothing obtained from openai)
  • src/blocks/banner-cover/index.js (nothing obtained from openai)
  • src/blocks/banking/index.js (nothing obtained from openai)
  • src/blocks/best-time-to-visit/index.js (nothing obtained from openai)
  • src/blocks/booking-validity-start/index.js (nothing obtained from openai)
  • src/blocks/checkout-time/index.js (nothing obtained from openai)
  • src/blocks/climate/index.js (nothing obtained from openai)
  • src/blocks/checkin-time/index.js (nothing obtained from openai)
  • src/blocks/cuisine/index.js (nothing obtained from openai)
  • src/blocks/departs-from/index.js (nothing obtained from openai)
  • src/blocks/day-by-day/index.js (nothing obtained from openai)
  • src/blocks/electricity/index.js (nothing obtained from openai)
  • src/blocks/dress/index.js (nothing obtained from openai)
  • src/blocks/duration/index.js (nothing obtained from openai)
  • src/blocks/destination-to-accommodation/index.js (nothing obtained from openai)
  • src/blocks/ends-in/index.js (nothing obtained from openai)
  • src/blocks/facilities/index.js (nothing obtained from openai)
  • src/blocks/facts-country-wrapper/index.js (nothing obtained from openai)
  • src/blocks/featured-accommodation/index.js (nothing obtained from openai)
  • src/blocks/facts-regions-wrapper/index.js (nothing obtained from openai)
Files not reviewed due to errors (28)
  • .eslintrc (no response)
  • src/blocks/accommodation-related-destination/index.js (no response)
  • src/blocks/accommodation-related-accommodation/index.js (no response)
  • .prettierrc (no response)
  • build/blocks/modal-button/index.js (no response)
  • changelog.md (no response)
  • src/blocks/accommodation-related-tour/index.js (no response)
  • src/blocks/best-time-to-visit/index.js (no response)
  • src/blocks/accommodation-type/index.js (no response)
  • src/blocks/banking/index.js (no response)
  • src/blocks/banner-cover/index.js (no response)
  • src/blocks/additional-info/index.js (no response)
  • src/blocks/booking-validity-start/index.js (no response)
  • src/blocks/checkin-time/index.js (no response)
  • src/blocks/climate/index.js (no response)
  • src/blocks/checkout-time/index.js (no response)
  • src/blocks/cuisine/index.js (no response)
  • src/blocks/day-by-day/index.js (no response)
  • src/blocks/departs-from/index.js (no response)
  • src/blocks/dress/index.js (no response)
  • src/blocks/destination-to-accommodation/index.js (no response)
  • src/blocks/duration/index.js (no response)
  • src/blocks/electricity/index.js (no response)
  • src/blocks/ends-in/index.js (no response)
  • src/blocks/facts-regions-wrapper/index.js (no response)
  • src/blocks/facts-country-wrapper/index.js (no response)
  • src/blocks/featured-accommodation/index.js (no response)
  • src/blocks/facilities/index.js (no response)
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.

@tibiii tibiii requested a review from krugazul September 5, 2025 07:22
@tibiii tibiii marked this pull request as draft September 8, 2025 09:36
@tibiii tibiii requested a review from Copilot September 8, 2025 09:37
Copy link
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 standardizes block metadata handling across all Tour Operator blocks, refactoring inconsistent block registration code for improved WordPress.org plugin directory compatibility. The changes establish consistent metadata structure, proper internationalization support, and enhanced block editor functionality.

  • Standardized block.json metadata across all blocks with textdomain, descriptions, icons, and keywords
  • Added example configurations for all blocks to improve block editor preview experience
  • Refactored JavaScript code for consistent formatting and code quality improvements

Reviewed Changes

Copilot reviewed 277 out of 353 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/blocks/*/block.json Added standardized metadata including textdomain, descriptions, icons, keywords, and example configurations
src/blocks/*/index.js Refactored for consistent code formatting, quote usage, and added example properties
package.json Added Prettier dependency for code formatting consistency
changelog.md Updated with PR reference for block metadata standardization
build/* Updated compiled assets reflecting the refactored source code

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Tibi Buzdugan <buzdugan.tiberiu@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Tibi Buzdugan <buzdugan.tiberiu@gmail.com>
Copy link

@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 f95ad38 and 3e9fdbf commits.
Files selected (1)
  • src/blocks/facts-country-wrapper/index.js (1)
Files ignored due to filter (1)
  • src/blocks/best-time-to-visit/block.json
Files not summarized due to errors (1)
  • src/blocks/facts-country-wrapper/index.js (nothing obtained from openai)
Files not reviewed due to errors (1)
  • src/blocks/facts-country-wrapper/index.js (no response)
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.

@tibiii
Copy link
Contributor Author

tibiii commented Sep 8, 2025

@coderabbitai summary

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 8, 2025

✅ Actions performed

Summary regeneration triggered.

Copy link
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 277 out of 353 changed files in this pull request and generated 4 comments.

Comment on lines +32 to +52
"attributes": {
"metadata": {
"name": "Day by Day"
}
},
"innerBlocks": [
[
"core/group",
{},
[
[
"core/heading",
{
"content": "Day by Day",
"level": 3
}
],
[
"core/paragraph",
{
"content": "Detailed daily breakdown of your tour experience."
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

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

Inconsistent quote usage in example object. Should use double quotes consistently throughout the object structure to match the rest of the codebase formatting.

Suggested change
"attributes": {
"metadata": {
"name": "Day by Day"
}
},
"innerBlocks": [
[
"core/group",
{},
[
[
"core/heading",
{
"content": "Day by Day",
"level": 3
}
],
[
"core/paragraph",
{
"content": "Detailed daily breakdown of your tour experience."
'attributes': {
'metadata': {
'name': 'Day by Day'
}
},
'innerBlocks': [
[
'core/group',
{},
[
[
'core/heading',
{
'content': 'Day by Day',
'level': 3
}
],
[
'core/paragraph',
{
'content': 'Detailed daily breakdown of your tour experience.'

Copilot uses AI. Check for mistakes.
Comment on lines +145 to +146
['core/heading', { content: 'African Safari Adventure', level: 3 }],
['core/paragraph', { content: "Embark on an unforgettable 7-day safari experience through Kenya's most spectacular wildlife reserves." }],
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

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

Inconsistent quote usage within array elements. Line 145 uses single quotes while line 146 uses double quotes. Should standardize to double quotes throughout.

Copilot uses AI. Check for mistakes.
Comment on lines +145 to +146
[ 'core/heading', { content: 'Kruger National Park', level: 3 } ],
[ 'core/paragraph', { content: 'Premier wildlife destination offering exceptional safari experiences and diverse ecosystems.' } ]
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

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

Inconsistent quote usage in array structure. Should use double quotes consistently to match the established pattern in other blocks.

Copilot uses AI. Check for mistakes.
Comment on lines +145 to +146
[ 'core/heading', { content: 'Luxury Beach Resort', level: 3 } ],
[ 'core/paragraph', { content: 'Experience ultimate comfort at our beachfront resort with stunning ocean views and world-class amenities.' } ]
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

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

Inconsistent quote usage in array structure. Should use double quotes consistently to match the established pattern in other blocks.

Copilot uses AI. Check for mistakes.
@tibiii tibiii closed this Nov 18, 2025
@github-project-automation github-project-automation bot moved this from Needs Triage to ✅ Done in Tour Operator Nov 18, 2025
@tibiii tibiii deleted the 583-standardize-block-meta branch November 18, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:block-json Block metadata (block.json)

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

[Refactor]: Standardize Block Metadata for Tour Operator Plugin

3 participants