Skip to content

Accommodation Fast Facts Block Variation #387

@ZaredRogers

Description

@ZaredRogers

Description:

The Single Accommodation Template will include a Fast Facts section. The block variation will be a Group Block with Row Blocks for each fact, containing an icon, label, and bound custom field. The block should behave similarly to the Single Tour Template's Fast Facts section, where empty custom fields result in the row not displaying.

Requirements:

Block Structure:

  • The block variation should be a Group Block containing Row Blocks for each fact.
  • Each Row Block should contain:
    • An icon. (icons are included in this issue)
    • A label for the fact.
    • A bound custom field displaying the relevant information.
  • An enquiry button

Fast Facts List:

  • Rating: Presented by a series of stars, followed by a rating type, both bound to custom fields.
  • Location: Linked to the Region or Country where the accommodation is located.
  • Type: Linked to the Accommodation Type custom taxonomy.
  • Rooms/Units: A bound field displaying the number of rooms/units in the accommodation.
  • Friendly: A bound field displaying suggested visitor types (e.g., families, couples, pets).
  • Spoken Languages: A bound field displaying the languages spoken by staff.

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 for each fact.
  • No empty rows are displayed if the custom field is empty.
  • The Rating is displayed as stars followed by a rating type.
  • The Location links to the relevant Region or Country.
  • The Type links to the Accommodation Type custom taxonomy.
  • 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.

Resources

Images

TO Backend 2024-10-10 at 3 21 37 PM

Icons Used

rate-star
globe-europe-africa
home-modern
friendly-TO-icon-black-20px
rooms-TO-icon-black-20px
accommodation-type-TO-icon-black-20px
rating-icon-TO-black-20px

Metadata

Metadata

Labels

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions