title: "Block Audit: best-time-to-visit, facts-country-wrapper, facts-region-wrapper & safety (Destination post type meta & icons integration)"
issue: NEW
post_types:
- destination
blocks:
- lsx/best-time-to-visit
- lsx/facts-country-wrapper
- lsx/facts-region-wrapper
- lsx/safety
- lsx/visa
dependencies:
- icons block
category: block-audit
author: tibiii
related_prs:
- 625
labels:
- enhancement
- block
- audit
Overview
- Block name/slug:
lsx/best-time-to-visit, lsx/facts-country-wrapper, lsx/facts-region-wrapper, lsx/safety
- Type: Static
- InnerBlocks: Yes (where applicable)
- Templates/Patterns using this block: Used in Destination templates/patterns.
- Icon usage: Replace inline image/icon with the new
icons block, following the standard for icon rendering.
- Dependencies: Should appear only when editing Destination post types (meta visibility restriction).
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), selectors for post type destination, and robust supports.
- Only available for
destination post type via postTypes meta.
Registration
- Register server-side with
register_block_type( __DIR__ . '/build/blocks/best-time-to-visit' ), 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.
Playwright Acceptance Tests (suggested)
Write E2E tests that:
- Insert block from inserter and assert preview renders.
- Toggle key controls (sidebar + toolbar) and assert front-end HTML/CSS via SSR or preview.
- If InnerBlocks: assert template creation, allowedBlocks enforcement, appender.
- If Query Loop variant: assert namespace attribute activates variation and filters CPT/tax terms.
- If Dynamic: save post and check server HTML matches expectations.
- If Icons integration: verify icon is rendered via the
icons block, not inline SVG/PNG.
- Visual regression: take screenshot in default + one variation.
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
This issue is based on improvements made in PR #613 (Standardize block metadata).
title: "Block Audit: best-time-to-visit, facts-country-wrapper, facts-region-wrapper & safety (Destination post type meta & icons integration)"
issue: NEW
post_types:
blocks:
dependencies:
category: block-audit
author: tibiii
related_prs:
labels:
Overview
lsx/best-time-to-visit,lsx/facts-country-wrapper,lsx/facts-region-wrapper,lsx/safetyiconsblock, following the standard for icon rendering.Block.json (target, API v3)
Provide comprehensive meta, ensuring these blocks:
apiVersion: 3title,description,keywords,icon(via icons block),category,version,textdomain,attributes(with proper types),selectorsfor post type destination, and robustsupports.destinationpost type viapostTypesmeta.Registration
register_block_type( __DIR__ . '/build/blocks/best-time-to-visit' ), etc. for each block.get_block_wrapper_attributes()).Styling migration (CSS ➜ theme.json/selectors)
Inserter Preview
Playwright Acceptance Tests (suggested)
Write E2E tests that:
iconsblock, not inline SVG/PNG.Block Locking (optional)
SlotFills (if applicable)
Done When
This issue is based on improvements made in PR #613 (Standardize block metadata).