Skip to content

Tour Fast Facts Block Variation #385

@ZaredRogers

Description

@ZaredRogers

Description:

The Single Tour Template includes a Fast Facts section that houses key information about the tour. We need to develop a block variation for this section. The block should be a Group Block, and each "fact" will consist of a Row Block with an icon, label, and a bound custom field displaying the relevant information. If any custom field is empty, the entire row should not display. The block variation should be locked from insert, but rearrangeable, and only allowed inside the Single Post template.

Requirements:

Block Structure:

  • The block variation should be a Group Block containing Row Blocks for each fact.
  • Each Row Block will be it's own block variation and should contain:
    • An icon. (Icons are included in this issue)
    • A label for the fact.
    • A bound custom field displaying the relevant information.
  • An Enquire Button

Fast Facts List (all should be their own block variations, and be nested inside the Fast Facts block with innerBlocks configuration):

  • Currency
  • Price
  • Sale Price
  • Departs from
  • Ends in
  • Group size
  • Duration
  • Term: Travel Styles (this row should point to the custom taxonomy, Travel Styles, not a custom field)
  • Best time to visit

Conditional Display:

  • If any custom field is empty, the entire Row Block should not display (no empty rows).

Block Behaviour:

  • The block variation should be locked from insert, meaning no new rows can be added by users.
  • The rows should be rearrangeable, allowing users to change the order of the facts.
  • The block should only be allowed inside the Single Post Template.

Styling:

  • The block should allow customisation of:
    • Spacing and positioning.
    • Typography (font size, style, etc.).
    • Background colour.
    • Text colour.

Acceptance Criteria:

  • A block variation for Fast Facts is developed as a Group Block with Row Blocks for each fact.
  • The Row Blocks correctly display the icon, label, and relevant custom field.
  • No empty rows are displayed if the custom field is empty.
  • The Term: Travel Styles row points to the custom taxonomy and not a custom field.
  • The block variation is locked from insert, rearrangeable, and only allowed inside the Single Post template.
  • Custom styling options for spacing, typography, background, and text colour are available.

Additional Notes:

  • Test the block variation to ensure all custom fields display correctly and no empty rows are visible.
  • Ensure that the block behaves correctly in the Single Post template and is not allowed in other contexts.

Images

TO Backend 2024-10-10 at 3 15 29 PM

Icons Used

map
globe-europe-africa
from-price-TO-icon-black-20px
duration-icon-black-20px
calendar
best-months-to-travel-TO-icon-black-20px

Metadata

Metadata

Labels

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions