Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Custom Preview Images for Tour Operator Blocks #402

Open
1 of 6 tasks
Tracked by #361
ashleyshaw opened this issue Oct 10, 2024 · 0 comments
Open
1 of 6 tasks
Tracked by #361

Create Custom Preview Images for Tour Operator Blocks #402

ashleyshaw opened this issue Oct 10, 2024 · 0 comments
Assignees
Labels
[Component] Block Variations Block development issues or pulls. [Status] Needs Design Needs design efforts. [Type] Feature New feature to highlight in changelogs
Milestone

Comments

@ashleyshaw
Copy link
Member

ashleyshaw commented Oct 10, 2024

Create Custom Preview Images for Tour Operator Blocks

Is your feature request related to a problem? Please describe.
Some of the Tour Operator Plugin blocks have a highly visual or interactive component, making it difficult for users to understand their functionality without a preview image in the block editor.

Describe the solution you'd like
We propose adding custom preview images for the following blocks to help users visualize their design and functionality before they add them to the page:

  • Image Gallery Block (Tours, Destinations & Accommodation)
  • Video Gallery Block (Tours, Destinations & Accommodation)
  • Itinerary Block
  • Highlights Block
  • Rooms/Units Block (Accommodation)
  • Travel Info Block
  • Map Blocks (WETU and Google)
  • Carousel Block (galleries and connected content)
  • Tour Collections Block

These preview images should be added by localizing the block's script and using a preview attribute to ensure they display correctly.

Describe alternatives you've considered
Alternatively, we could leave the blocks without preview images, but this would significantly reduce the usability and clarity of these visual components in the block editor.

Additional context
Following the approach from Gutenberg Kits, we'll use wp_localize_script() to pass the image URL to the block’s script and set up the preview image display logic in the block's edit function.

Acceptance Criteria:

  • Create custom preview images for each listed block.
  • Use wp_localize_script() to pass these images to the block editor.
  • Implement the logic to display the preview images in the block's edit function.

Tasks:

  • Design and optimize custom preview images for each block.
  • Update the block's script to include the localized preview image URL.
  • Test the implementation to ensure the preview images are displayed properly.
@ashleyshaw ashleyshaw added [Status] Needs Design Needs design efforts. [Type] Feature New feature to highlight in changelogs [Component] Block Variations Block development issues or pulls. labels Oct 10, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage in Tour Operator Oct 10, 2024
@ZaredRogers ZaredRogers self-assigned this Oct 11, 2024
@ZaredRogers ZaredRogers added this to the 2.0.0 milestone Oct 11, 2024
@ashleyshaw ashleyshaw mentioned this issue Oct 12, 2024
37 tasks
@ZaredRogers ZaredRogers moved this from 📥 Needs Dev to Needs Design in Tour Operator Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Block Variations Block development issues or pulls. [Status] Needs Design Needs design efforts. [Type] Feature New feature to highlight in changelogs
Projects
Status: Needs Design
Development

No branches or pull requests

2 participants