Skip to content

Commit b39686b

Browse files
author
Hwashiang Yu
committed
MC-5810: Improve naming of the critical variables/parameters in the code and configuration
- Updated references to group to menu section in documentation - Updated documentation images
1 parent 19652db commit b39686b

8 files changed

+18
-18
lines changed

docs/configurations/content-type-configuration.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
<!-- {% raw %} -->
77

8-
Use the content type and group configuration to add new content types, extend existing content types, add groups in the left menu, or rearrange content types in the groups.
8+
Use the content type and menu section configuration to add new content types, extend existing content types, add menu_sections in the left menu, or rearrange content types in the menu sections.
99

1010
| Element | Description |
1111
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
12-
| `group` | Describes the group name, translated field, and sort order in the menu. |
13-
| `type` | Describes the content type name, translated field, and sort order in the menu group. Each type should have its own configuration file. |
12+
| `menu_section` | Describes the menu section name, translated field, and sort order in the menu. |
13+
| `type` | Describes the content type name, translated field, and sort order in the menu section. Each type should have its own configuration file. |
1414
| `parents` | List of parent content types that can accept this type as a child. |
1515
| `children` | List of children content types that can accept this type as a parent. |
1616
| `appearances` | Appearance configuration. |
@@ -26,18 +26,18 @@ Use the content type and group configuration to add new content types, extend ex
2626
| `preview_component` | Helper component that contains preview specific logic. Helper component is optional. |
2727
| `master_component` | Contains master format rendering logic that is generic for all appearances. Content component is optional. |
2828
| `form` | UI component form used for editing the content type. |
29-
| `group` | Existing menu group that contains this content type. |
29+
| `menu_section` | Existing menu menu section that contains this content type. |
3030
{:style="table-layout:auto"}
3131

3232
### Examples
3333

34-
#### `group`
34+
#### `menu_section`
3535

36-
The following is an example of a group configuration in `view/adminhtml/pagebuilder/group.xml`:
36+
The following is an example of a menu section configuration in `view/adminhtml/pagebuilder/menu_section.xml`:
3737

3838
``` xml
39-
<!-- Definition of main menu, used for grouping content types -->
40-
<group name="media" translate="label" sortOrder="10" label="Media"/>
39+
<!-- Definition of main menu, used for menu sectioning content types -->
40+
<menu_section name="media" translate="label" sortOrder="10" label="Media"/>
4141
```
4242

4343
#### Content type
@@ -51,7 +51,7 @@ The following is an example of a content type configuration in `view/adminhtml/p
5151
component="Magento_PageBuilder/js/content-type"
5252
preview_component="Magento_PageBuilder/js/content-type/banner/preview"
5353
form="pagebuilder_banner_form"
54-
group="media"
54+
menu_section="media"
5555
icon="icon-pagebuilder-image"
5656
sortOrder="1"
5757
translate="label">
@@ -155,7 +155,7 @@ The following is an example of a content type configuration in `view/adminhtml/p
155155
| `preview_component` | Helper component that contains preview specific logic. Helper component is optional. |
156156
| `master_component` | Contains master format rendering logic that is generic for all appearances. Content component is optional. |
157157
| `form` | UI component form used for editing the content type |
158-
| `group` | Existing menu group that contains this content type. |
158+
| `menu_section` | Existing menu section that contains this content type. |
159159
{:style="table-layout:auto"}
160160

161161
### `form`

docs/create-basic-content-type/step-1-add-configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The following configuration is from the Quote content type. An overview of these
2929
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_PageBuilder:etc/content_type.xsd">
3030
<type name="example_quote"
3131
label="Quote"
32-
group="elements"
32+
menu_section="elements"
3333
component="Magento_PageBuilder/js/content-type"
3434
preview_component="Example_PageBuilderQuote/js/content-type/example-quote/preview"
3535
master_component="Magento_PageBuilder/js/content-type/master"
@@ -62,13 +62,13 @@ The `type` element defines the key properties of your content type. The attribut
6262
| ------------------- | ------------------------------------------------------------ |
6363
| `name` | Name of the content type that Magento uses for XML merging. The convention for using multi-word names is to separate the words with hyphens. |
6464
| `label` | Label displayed in the Page Builder panel, option menu, and on the Admin stage. |
65-
| `group` | Group or category in the panel menu where your content type is displayed. The default groups are Layout, Elements, Media, and Add Content. See [Panel configurations](../configurations/panel-configurations.md) for more details. |
65+
| `menu_section` | Menu section or category in the panel menu where your content type is displayed. The default menu sections are Layout, Elements, Media, and Add Content. See [Panel configurations](../configurations/panel-configurations.md) for more details. |
6666
| `component` | There are two component types to choose from: `content-type` and `content-type-collection`. Use `Magento_PageBuilder/js/content-type` for static content types that do not have children. Use `Magento_PageBuilder/js/content-type-collection` for content types that can contain children, otherwise known as container content types. |
6767
| `preview_component` | Optional. JavaScript file (`preview.js`) that provides rendering logic within the Admin UI. The preview component does not need to specify the `.js` extension. If you don't provide the `preview_component`, Page Builder uses the base `Preview` component shown in the code: `Magento_PageBuilder/js/content-type/preview`. |
6868
| `master_component` | Optional. JavaScript file (`master.js`) that provides rendering logic generic for all appearances of your content type when rendered on the storefront. The master component does not need to specify the `.js` extension. If you don't provide the `master_component`, Page Builder uses the base `Master` component shown in the code: `Magento_PageBuilder/js/content-type/master`. |
6969
| `form` | UI component form that provides the form controls for editing your content type. |
7070
| `icon` | Optional. Class name for your PNG or SVG image (or font icon) displayed in the Page Builder panel alongside the label. If you don't provide an icon value, the Page Builder panel displays the content type name without an icon. |
71-
| `sortOrder` | Optional. The listed order within the menu group. For example, `sortOrder=21` puts the content type third in the `Elements` menu group, after the content types with `sortOrder` values of 10 and 20. |
71+
| `sortOrder` | Optional. The listed order within the menu section. For example, `sortOrder=21` puts the content type third in the `Elements` menu section, after the content types with `sortOrder` values of 10 and 20. |
7272
| `translate` | Identifies the attribute you want Magento to translate. Here, the `label` value is set for translation. |
7373

7474
## The `children` element

docs/create-basic-content-type/step-6-add-icon.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The last step is to add our icon's class name to our config file. Previous to th
6363
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_PageBuilder:etc/content_type.xsd">
6464
<type name="example_quote"
6565
label="Quote"
66-
group="elements"
66+
menu_section="elements"
6767
component="Magento_PageBuilder/js/content-type"
6868
preview_component="Example_PageBuilderQuote/js/content-type/example-quote/preview"
6969
master_component="Magento_PageBuilder/js/content-type/master"

docs/how-to/how-to-add-custom-toolbar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Option property descriptions:
5656

5757
| Element | Description |
5858
| ------------------- | ---------------------------------------------------------------------------------- |
59-
| `key` | Describes the group name in the menu (comparable to a CSS property, `text_align`). |
59+
| `key` | Describes the menu section name in the menu (comparable to a CSS property, `text_align`). |
6060
| `type` | Describes the element type (comparable to the HTML `input` type). |
6161
| `values` | Array of values for each option. |
6262
| `value` | Value referenced in the dataStore (comparable to a CSS property value). |

docs/how-to/how-to-develop-container-content-type.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Write the following content into this configuration file:
3434
preview_component="VendorName_CustomContainer/js/content-type/custom-container-group/preview"
3535
master_component="Magento_PageBuilder/js/content-type/master-collection"
3636
form="pagebuilder_custom_container_group_form"
37-
group="general"
37+
menu_section="general"
3838
icon="icon-pagebuilder-row"
3939
sortOrder="1"
4040
translate="label">
@@ -141,7 +141,7 @@ Write the following content into this configuration file:
141141
preview_component="VendorName_CustomContainer/js/content-type/custom-container/preview"
142142
master_component="Magento_PageBuilder/js/content-type/master-collection"
143143
form="pagebuilder_custom_container_form"
144-
group="general"
144+
menu_section="general"
145145
icon="icon-pagebuilder-row"
146146
sortOrder="1"
147147
translate="label">

docs/how-to/how-to-use-image-uploader.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Use `additional_data` in your `<YourModule>/view/base/pagebuilder/content_type/<
1717

1818
``` xml
1919
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_PageBuilder:etc/content_type.xsd">
20-
<type name="MyName" translate="label" label="MyName" icon="icon-modulename-simple" component="Vendor_ModuleName/js/content-type" form="modulename_simple_form" group="layout">
20+
<type name="MyName" translate="label" label="MyName" icon="icon-modulename-simple" component="Vendor_ModuleName/js/content-type" form="modulename_simple_form" menu_section="layout">
2121
...
2222
<additional_data>
2323
<item name="uploaderConfig" xsi:type="array">
11.3 KB
Loading
7.04 KB
Loading

0 commit comments

Comments
 (0)