Skip to content

Block Audit: review-related-accommodation, review-related-destination, review-related-tour, tour-related-accommodation, tour-related-destination, accommodation-related-tour (Review system & cross-referencing blocks) #694

@tibiii

Description

@tibiii

title: "Block Audit: review-related-accommodation, review-related-destination, review-related-tour, tour-related-accommodation, tour-related-destination, accommodation-related-tour (Review system & cross-referencing blocks)"
issue: NEW
post_types:

  • review
  • tour
  • accommodation
  • destination
    blocks:
  • lsx/review-related-accommodation
  • lsx/review-related-destination
  • lsx/review-related-tour
  • lsx/tour-related-accommodation
  • lsx/tour-related-destination
  • lsx/accommodation-related-tour
  • lsx/accommodation-related-accommodation
  • lsx/accommodation-related-destination
    dependencies:
  • icons block
    category: block-audit
    author: tibiii
    related_prs:
  • 625
    labels:
  • enhancement
  • block
  • audit

Overview

  • Block name/slug: lsx/review-related-accommodation, lsx/review-related-destination, lsx/review-related-tour, lsx/tour-related-accommodation, lsx/tour-related-destination, lsx/accommodation-related-tour
  • Type: Dynamic/Query
  • InnerBlocks: No
  • Templates/Patterns using this block: Used in Review, Tour, Accommodation, and Destination templates/patterns.
  • Icon usage: Replace inline image/icon with the new icons block, following the standard for icon rendering.
  • Dependencies: Should appear conditionally based on post type and available relationships.

Block.json (target, API v3)

Provide comprehensive meta, ensuring these blocks:

  • Use apiVersion: 3
  • Include fields: title, description, keywords, icon (via icons block), category, version, textdomain, attributes (with proper types), appropriate postTypes restrictions, and robust supports.
  • Context-specific post type availability for relationship management.

Registration

  • Register server-side with register_block_type( __DIR__ . '/build/blocks/review-related-accommodation' ), etc. for each block.
  • Output wrapper attributes (get_block_wrapper_attributes()).

Styling migration (CSS ➜ theme.json/selectors)

  • Map legacy CSS to selectors and theme styles.
  • Remove bespoke CSS, retain only minimal component styles.
  • Document any required theme.json block settings.

Inserter Preview

  • Provide example data and style variation previews for all blocks.

Special Notes

  • Review system integration: Review-related blocks should only appear on review post types
  • Cross-referencing blocks: Tour/accommodation/destination relationship blocks need proper post type restrictions
  • Relationship queries: Ensure proper meta queries and relationship handling
  • Conditional rendering: Implement smart availability based on existing relationships and post type context

Block Locking (optional)

  • Identify parts to lock (move/remove/edit/content-only) for patterns/templates.

SlotFills (if applicable)

  • Note any editor UI extension points required.

Done When

  • block.json approved for all blocks
  • PHP registration complete for all blocks
  • Styling migrated for all blocks
  • Inserter preview added for all blocks
  • Icons block integration completed for all blocks
  • Context-aware conditional rendering implemented
  • Cross-post type relationships properly handled
  • Templates/patterns updated if needed

This issue is based on improvements made in PR #613 (Standardize block metadata).

Metadata

Metadata

Assignees

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions