Update Block Reference and make it public doc (#50906)

* Update Block References doc

* Move the Block References to public Docs

* Change the place Block Reference is generated to

* Add changelog

* Update docs manifest file

* Update manifest
This commit is contained in:
Karol Manijak 2024-08-27 09:04:15 +02:00 committed by GitHub
parent c63bb88e0e
commit 5a80d5e1da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 74 additions and 28 deletions

View File

@ -1,9 +1,25 @@
---
post_title: Blocks reference
menu_title: Blocks Reference
---
# Woo Blocks Reference # Woo Blocks Reference
This page lists the Woo blocks included in the package. (Incomplete as there are still blocks that are not using block.json definition). This page lists the Woo blocks included in the package. (Incomplete as there are still blocks that are not using block.json definition).
<!-- START Autogenerated - DO NOT EDIT --> <!-- START Autogenerated - DO NOT EDIT -->
## Add to Cart with Options - woocommerce/add-to-cart-form
Display a button so the customer can add a product to their cart. Options will also be displayed depending on product type. e.g. quantity, variation.
- **Name:** woocommerce/add-to-cart-form
- **Category:** woocommerce-product-elements
- **Ancestor:**
- **Parent:**
- **Supports:**
- **Attributes:** isDescendentOfSingleProductBlock
## Product Average Rating (Beta) - woocommerce/product-average-rating ## Product Average Rating (Beta) - woocommerce/product-average-rating
Display the average rating of a product Display the average rating of a product
@ -650,7 +666,7 @@ Renders classic WooCommerce shortcodes.
- **Category:** woocommerce - **Category:** woocommerce
- **Ancestor:** - **Ancestor:**
- **Parent:** - **Parent:**
- **Supports:** color (text, ~~background~~) - **Supports:** color (text, ~~background~~), ~~inserter~~
- **Attributes:** color, storeOnly - **Attributes:** color, storeOnly
## Customer account - woocommerce/customer-account ## Customer account - woocommerce/customer-account
@ -717,7 +733,7 @@ Display a button for shoppers to quickly view their cart.
- **Ancestor:** - **Ancestor:**
- **Parent:** - **Parent:**
- **Supports:** typography (fontSize), ~~html~~, ~~multiple~~ - **Supports:** typography (fontSize), ~~html~~, ~~multiple~~
- **Attributes:** addToCartBehaviour, cartAndCheckoutRenderStyle, hasHiddenPrice, iconColor, iconColorValue, isPreview, miniCartIcon, priceColor, priceColorValue, productCountColor, productCountColorValue - **Attributes:** addToCartBehaviour, cartAndCheckoutRenderStyle, hasHiddenPrice, iconColor, iconColorValue, isPreview, miniCartIcon, priceColor, priceColorValue, productCountColor, productCountColorValue, productCountVisibility
## Empty Mini-Cart view - woocommerce/empty-mini-cart-contents-block ## Empty Mini-Cart view - woocommerce/empty-mini-cart-contents-block
@ -1060,29 +1076,18 @@ The contents of this block will display when there are no products found.
- **Supports:** align, color (background, gradients, link, text), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ - **Supports:** align, color (background, gradients, link, text), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~
- **Attributes:** - **Attributes:**
## Add to Cart with Options - woocommerce/add-to-cart-form
Display a button so the customer can add a product to their cart. Options will also be displayed depending on product type. e.g. quantity, variation.
- **Name:** woocommerce/add-to-cart-form
- **Category:** woocommerce-product-elements
- **Ancestor:**
- **Parent:**
- **Supports:** interactivity
- **Attributes:** isDescendentOfSingleProductBlock, quantitySelectorStyle
## Product Filter (Experimental) - woocommerce/product-filter ## Product Filter (Experimental) - woocommerce/product-filter
A block that adds product filters to the product collection. A block that adds product filters to the product collection.
- **Name:** woocommerce/product-filter - **Name:** woocommerce/product-filter
- **Category:** woocommerce - **Category:** woocommerce
- **Ancestor:** - **Ancestor:** woocommerce/product-filters
- **Parent:** - **Parent:**
- **Supports:** ~~html~~, ~~inserter~~, ~~reusable~~ - **Supports:** ~~html~~, ~~inserter~~, ~~reusable~~
- **Attributes:** attributeId, filterType, heading, isPreview - **Attributes:** attributeId, filterType, heading, isPreview
## Product Filter: Active Filters (Experimental) - woocommerce/product-filter-active ## Filter Options - woocommerce/product-filter-active
Display the currently active filters. Display the currently active filters.
@ -1093,7 +1098,7 @@ Display the currently active filters.
- **Supports:** color (text, ~~background~~), interactivity, ~~inserter~~ - **Supports:** color (text, ~~background~~), interactivity, ~~inserter~~
- **Attributes:** displayStyle - **Attributes:** displayStyle
## Product Filter: Attribute (Experimental) - woocommerce/product-filter-attribute ## Filter Options - woocommerce/product-filter-attribute
Enable customers to filter the product grid by selecting one or more attributes, such as color. Enable customers to filter the product grid by selecting one or more attributes, such as color.
@ -1101,8 +1106,8 @@ Enable customers to filter the product grid by selecting one or more attributes,
- **Category:** woocommerce - **Category:** woocommerce
- **Ancestor:** woocommerce/product-filter - **Ancestor:** woocommerce/product-filter
- **Parent:** - **Parent:**
- **Supports:** color (text, ~~background~~), interactivity, ~~inserter~~ - **Supports:** color (text, ~~background~~), interactivity, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~inserter~~
- **Attributes:** attributeId, displayStyle, isPreview, queryType, selectType, showCounts - **Attributes:** attributeId, clearButton, displayStyle, hideEmpty, isPreview, queryType, selectType, showCounts, sortOrder
## Clear (Experimental) - woocommerce/product-filter-clear-button ## Clear (Experimental) - woocommerce/product-filter-clear-button
@ -1115,7 +1120,7 @@ Allows shoppers to reset this filter.
- **Supports:** interactivity, ~~inserter~~ - **Supports:** interactivity, ~~inserter~~
- **Attributes:** - **Attributes:**
## Product Filter: Price (Experimental) - woocommerce/product-filter-price ## Filter Options - woocommerce/product-filter-price
Enable customers to filter the product collection by choosing a price range. Enable customers to filter the product collection by choosing a price range.
@ -1126,7 +1131,7 @@ Enable customers to filter the product collection by choosing a price range.
- **Supports:** interactivity, ~~inserter~~ - **Supports:** interactivity, ~~inserter~~
- **Attributes:** inlineInput, showInputFields - **Attributes:** inlineInput, showInputFields
## Product Filter: Rating (Experimental) - woocommerce/product-filter-rating ## Filter Options - woocommerce/product-filter-rating
Enable customers to filter the product collection by rating. Enable customers to filter the product collection by rating.
@ -1137,7 +1142,7 @@ Enable customers to filter the product collection by rating.
- **Supports:** color (text, ~~background~~), interactivity, ~~inserter~~ - **Supports:** color (text, ~~background~~), interactivity, ~~inserter~~
- **Attributes:** className, displayStyle, isPreview, selectType, showCounts - **Attributes:** className, displayStyle, isPreview, selectType, showCounts
## Product Filter: Stock Status (Experimental) - woocommerce/product-filter-stock-status ## Filter Options - woocommerce/product-filter-stock-status
Enable customers to filter the product collection by stock status. Enable customers to filter the product collection by stock status.
@ -1156,8 +1161,30 @@ Let shoppers filter products displayed on the page.
- **Category:** woocommerce - **Category:** woocommerce
- **Ancestor:** - **Ancestor:**
- **Parent:** - **Parent:**
- **Supports:** align, interactivity, ~~multiple~~ - **Supports:** align, color (background, text), interactivity, layout (allowJustification, allowOrientation, allowVerticalAlignment, default, ~~allowInheriting~~), spacing (blockGap), typography (fontSize, textAlign), ~~inserter~~, ~~multiple~~
- **Attributes:** - **Attributes:** overlay, overlayButtonStyle, overlayIcon, overlayIconSize
## Product Filters Overlay (Experimental) - woocommerce/product-filters-overlay
Display product filters in an overlay on top of a page.
- **Name:** woocommerce/product-filters-overlay
- **Category:** woocommerce
- **Ancestor:**
- **Parent:**
- **Supports:** align, color (background, text), dimensions (), layout (allowCustomContentAndWideSize), spacing (blockGap, padding), typography (), ~~inserter~~, ~~multiple~~
- **Attributes:** overlayPosition, overlayStyle, style
## Overlay Navigation (Experimental) - woocommerce/product-filters-overlay-navigation
Display overlay navigation controls.
- **Name:** woocommerce/product-filters-overlay-navigation
- **Category:** woocommerce
- **Ancestor:** woocommerce/product-filters-overlay,woocommerce/product-filters
- **Parent:**
- **Supports:** align (center, left, right), color (background, text), layout (default, ~~allowEditing~~), position (sticky), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~inserter~~
- **Attributes:** align, buttonStyle, iconSize, navigationStyle, overlayMode, style, triggerType
## Product Gallery (Beta) - woocommerce/product-gallery ## Product Gallery (Beta) - woocommerce/product-gallery

View File

@ -70,6 +70,14 @@
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/building-a-woo-store/configuring-caching-plugins.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/building-a-woo-store/configuring-caching-plugins.md",
"id": "9f484f8db1111fa6c1b6108d40939c967eea7f47" "id": "9f484f8db1111fa6c1b6108d40939c967eea7f47"
}, },
{
"post_title": "Blocks reference",
"menu_title": "Blocks Reference",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/building-a-woo-store/block-references.md",
"hash": "b6cd78cba78be8846621f27b9d4a408c713e1915bdbb7fc27b6247b3ff8610f1",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/building-a-woo-store/block-references.md",
"id": "1fbe91d7fa4fafaf35f0297e4cee1e7958756aed"
},
{ {
"post_title": "How to add a custom field to simple and variable products", "post_title": "How to add a custom field to simple and variable products",
"menu_title": "Add Custom Fields to Products", "menu_title": "Add Custom Fields to Products",
@ -1302,7 +1310,7 @@
"post_title": "How to request WooCommerce extension reviews", "post_title": "How to request WooCommerce extension reviews",
"menu_title": "Requesting reviews", "menu_title": "Requesting reviews",
"edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/quality-and-best-practices/review-guidelines/how-to-request-reviews.md", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/quality-and-best-practices/review-guidelines/how-to-request-reviews.md",
"hash": "5a77783c32c1bb0fefc6888f7a3217fe6e5c7242692593a17828b2f1ffec618b", "hash": "dfdf5add075777636eb628d25484e93268251437dec0253766c12d80ac82573b",
"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/quality-and-best-practices/review-guidelines/how-to-request-reviews.md", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/quality-and-best-practices/review-guidelines/how-to-request-reviews.md",
"id": "3d0c8bf7339a71198737d19eec7e6d71697b3727" "id": "3d0c8bf7339a71198737d19eec7e6d71697b3727"
} }
@ -1796,5 +1804,5 @@
"categories": [] "categories": []
} }
], ],
"hash": "7e929e4f5594921717bb3407ea502c4a01d4dabee6b8b1d441cd14fda4b22248" "hash": "e054beda95d791f118b8aba90fd63fe1c28ce9f008d89fd863397aac7bf9e827"
} }

View File

@ -17,14 +17,21 @@ const fs = require( 'fs' );
* *
* @type {string} * @type {string}
*/ */
const ROOT_DIR = path.resolve( __dirname, '../' ); const ROOT_DIR = path.resolve( __dirname, '../../../' );
/**
* Path to root Blocks project directory.
*
* @type {string}
*/
const BLOCK_LIBRARY_ROOT_DIR = path.resolve( __dirname, '../' );
/** /**
* Path to blocks directory. * Path to blocks directory.
* *
* @type {string} * @type {string}
*/ */
const BLOCK_LIBRARY_DIR = path.resolve( ROOT_DIR, 'assets/js' ); const BLOCK_LIBRARY_DIR = path.resolve( BLOCK_LIBRARY_ROOT_DIR, 'assets/js' );
/** /**
* Path to docs file. * Path to docs file.
@ -33,7 +40,7 @@ const BLOCK_LIBRARY_DIR = path.resolve( ROOT_DIR, 'assets/js' );
*/ */
const BLOCK_LIBRARY_DOCS_FILE = path.resolve( const BLOCK_LIBRARY_DOCS_FILE = path.resolve(
ROOT_DIR, ROOT_DIR,
'docs/block-references/block-references.md' 'docs/building-a-woo-store/block-references.md'
); );
/** /**

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Make Block Reference a public doc