Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Store Customization > Introduce the new Patterns Dictionary #10609

Closed
Tracked by #10568
nefeline opened this issue Aug 15, 2023 · 0 comments · Fixed by #10674
Closed
Tracked by #10568

Store Customization > Introduce the new Patterns Dictionary #10609

nefeline opened this issue Aug 15, 2023 · 0 comments · Fixed by #10674
Assignees
Labels
focus: patterns WooCommerce patterns type: enhancement The issue is a request for an enhancement.

Comments

@nefeline
Copy link
Contributor

As part of the scope described on #10503 , we need to create a new Patterns Dictionary. At a minimum, the following information is required from each one of our patterns:

  • Total number of Images
  • Format of the Images required: 'square', 'landscape' or 'portrait'
  • Short description of the content expected in the titles
  • Short description of the content expected in the descriptions

These will be handy for either creating the prompt for the AI to generate content or to manipulate the data received from external services (e.g. fetch all relevant images from the Verticals API for a given store category in a single request and later on just assign them to be used on specific patterns depending on the format the pattern is expecting).

This dictionary containing info regarding all existing patterns should be stored in our codebase. We should also inform the team & document that as soon as this feature is in place, any new patterns inserted in our codebase should have a corresponding entry in this dictionary.

Implementation Details

  • This dictionary should be saved in a file called dictionary.json
  • dictionary.json should be placed in a newly created directory under woocommerce-blocks/src called Patterns.
  • The initial format for the dictionary can be (using the Hero Product Split pattern as an example):
[
	{
		"name": "Hero Product Split",
		"slug": "woocommerce-blocks/hero-product-split",
		"images_total" : 1,
		"images_format": "landscape",
		"content": {
			"title": {
				"default": "Get cozy this fall with knit sweaters",
				"ai_prompt": "An impact phrase that advertises the displayed product"
			},
			"description": {
				"default": "",
				"ai_prompt": ""
			}
		}
	}
]

We can adjust the AI prompts and content as needed. The most critical information for this phase of the project is to have the expected total number of images and their format so we can use it to classify the images returned by the Verticals API and later on save this info as an option in the DB.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: patterns WooCommerce patterns type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants