Skip to content

Commit 5b3f582

Browse files
authored
Merge pull request #29 from magento-devdocs/MAGEDOC-3644
MAGEDOC-3644: Post GA release docs cleanup
2 parents 092d40c + e9fc6e9 commit 5b3f582

25 files changed

+159
-94
lines changed

docs/create-container-content-type/overview.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ The `type` element defines the key properties of your content type. The attribut
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. |
7171
| `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. |
73+
{:style="table-layout:auto"}
7374

7475
## The `children` element
7576

docs/create-custom-content-type/step-2-add-templates.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ The following table describes each `appearance` attribute in our example.
6262
| `preview_template` | References the `preview.html` (the Admin preview template) for rendering the preview appearance of your content type on the stage within the Admin UI. |
6363
| `master_template` | References the `master.html` (the master format storefront template) for rendering the appearance of your content type on the storefront for customers to see. |
6464
| `reader` | Reads content type data from the master format. |
65+
{:style="table-layout:auto"}
6566

6667
## Quote `preview_template`
6768

docs/create-custom-content-type/step-3-add-components.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ A description of each component-related attribute from the Quote configuration f
6767
| `component` | Page Builder provides 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 (like our Quote). Use `Magento_PageBuilder/js/content-type-collection` for content types that can contain children (container content types). You can also create and specify your own component implementations, provided they conform to the Page Builder interfaces. |
6868
| `preview_component` | Optional. The `preview.js` file provides rendering logic to the Admin preview template. If your content type does not require any changes to Page Builder's standard rendering logic, you can omit this attribute from the the `type` element. When you omit the attribute, Page Builder will use `Magento_PageBuilder/js/content-type/preview` by default.<br /><br />However, if you want to make changes to the option menu for your content type, or other customize other user-interactivity in the Admin, you need to create your own preview component as we have done for the Quote content type. |
6969
| `master_component` | Optional. The `master.js` file provides rendering logic to the master format storefront template. As with the `preview_component`, if your content type does not require any specific user-interactivity or other behavior when it's displayed in the storefront, you can simply omit this attribute from the the `type` element. When you omit the attribute, Page Builder will use `Magento_PageBuilder/js/content-type/master` by default. <br /><br />In the Quote configuration, the `master_component` attribute is only included for discussion. It simply points to the Page Builder default `master.js` component that would be used the attribute was omitted. |
70+
{:style="table-layout:auto"}
7071

7172
## Quote `preview_component`
7273

docs/create-custom-content-type/step-4-add-form.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ In your configuration file, add your form name (without the .xml file extension)
5656
| Attribute | Description |
5757
| --------- | ------------------------------------------------------------ |
5858
| `form` | Name of the UI component form that provides the form editor for your content type. |
59+
{:style="table-layout:auto"}
5960

6061
## The Quote form
6162

@@ -71,6 +72,7 @@ The purpose of each field is described as follows:
7172
| Author | A text input field for the author's name. |
7273
| Description | A text input field to describe the author's title or origin of the quote. |
7374
| CSS for Quote | A text input field for end-users to add CSS class names for styling the text in the Quote field. This option is detailed in [Step 5: Add styles](step-5-add-styles.md). |
75+
{:style="table-layout:auto"}
7476

7577
The Quote form is shown in full here for you to copy into your `pagebuilder_example_form.xml` file, followed by descriptions of the key parts.
7678

@@ -234,6 +236,7 @@ Page Builder requires fields to be grouped within named `<fieldset>` elements. F
234236
| ----------- | ------------------------------------------------------------ |
235237
| `name` | You can name your fieldset whatever you want. Currently, it has no significance for data binding. |
236238
| `sortOrder` | Determines where Page Builder puts the fieldset within the editor in relation to other fieldsets. Page Builder sets the `sortOrder` for the `pagebuilder_base_form` fieldset to `90`. Setting your fieldset to a value less than that (such as `20`) will put your fieldset above both inherited fieldsets. A value greater than `90` will put your fieldset below the inherited fieldsets. |
239+
{:style="table-layout:auto"}
237240

238241
### field
239242

@@ -244,6 +247,7 @@ The `<field>` element creates the actual HTML form element as specified by the `
244247
| `name` | The name of the field used for data bindings. |
245248
| `sortOrder` | Determines where Page Builder puts the field within the fieldset in relation to other fields. |
246249
| `formElement` | Determines the HTML form element to render for the field. |
250+
{:style="table-layout:auto"}
247251

248252
### data source
249253

@@ -277,6 +281,7 @@ The `<settings>` element defines the data scope, data type, and label to use for
277281
| `dataScope` | Specifies the name of your input field for data binding. The `dataScope` node allows you to change the value of the `name` attribute for your input field. We do not need to change the field name value, so we keep our dataScope value the same as our field name. |
278282
| `dataType` | Specifies the data type for the field's data. Common values are `text` and `boolean`. |
279283
| `label` | Specifies the text label applied to the input field on the form. |
284+
{:style="table-layout:auto"}
280285

281286
## Quote form layout
282287

@@ -340,6 +345,7 @@ The `<element>` element provides a scope for the data bindings within it.
340345
| Attribute | Description |
341346
| --------- | ------------------------------------------------------------ |
342347
| `name` | Specifies the name of the element scope for the data binding when applied to template elements. In our example, the element name of `main` is used as the scope for binding styles and other attributes to the top-level `<div>` element in our template: `<div attr="data.main.attributes" ko-style="data.main.style">` |
348+
{:style="table-layout:auto"}
343349

344350
#### style
345351

@@ -353,6 +359,7 @@ The `<style>` element configures the bindings from the form style fields to the
353359
| `preview_converter` | Converts the value for the preview. Used for cases where the conversion logic is different between the two views. |
354360
| `storage_key` | Optional variable name for value in the data storage. If no value is provided, the `name` attribute will be used. |
355361
| `reader` | Reader used for parsing attributes and properties out of the DOM. Should not be used with read-only persistence_mode. |
362+
{:style="table-layout:auto"}
356363

357364
#### attribute
358365

@@ -362,6 +369,7 @@ The `<attribute>` element provides a mechanism to attach DOM attributes to templ
362369
| --------- | ------------------------------------------------------------ |
363370
| `name` | Unique name used for configuration merging, and the default value for storage_key if none is provided. |
364371
| `source` | The name of the property or attribute in the DOM. Must be in snake_case. |
372+
{:style="table-layout:auto"}
365373

366374
#### css
367375

@@ -370,6 +378,7 @@ The `<css>` element sets the binding for the CSS Classes form field (`css_classe
370378
| Attribute | Description |
371379
| --------- | ------------------------------------------------ |
372380
| `name` | Specifies the name of the form field to bind to. |
381+
{:style="table-layout:auto"}
373382

374383
For example, in our Quote configuration, we define an `<element>` named `quote` with a `<css>` element bound to an input field in our form named `quote_css`, as shown here:
375384

@@ -415,6 +424,7 @@ The `<html>` element binds the HTML content entered in a form field. When the `<
415424
| Attribute | Description |
416425
| --------- | ------------------------------------------------ |
417426
| `name` | Specifies the name of the form field to bind to. |
427+
{:style="table-layout:auto"}
418428

419429
For example, as with the previous `css` binding, the Quote configuration defines the `<element>` named `quote` with an `<html>` element that is bound to an input field in our form named `quote_text`, as shown here:
420430

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ The CSS for integrating SVG and PNG images with the font icons used by Page Buil
5050
| `width` | Sets the width of the content area that most closely matches the widths of Page Builder icon fonts. |
5151
| `height` | Sets the height of the content area that most closely matches the widths of Page Builder icon fonts. |
5252
| `margin-bottom` | Pulls the SVG or PNG image down within the panel container to more closely match the positioning of Page Builder's font icon. |
53+
{:style="table-layout:auto"}
5354

5455
When deployed, your icon images are linked from `pub/static` as shown here:
5556

@@ -77,7 +78,6 @@ The last step is to add our icon's class name to our config file. Previous to th
7778
That's it. Now you can regenerate your static assets, empty your browser cache, and do a hard reload of your Admin page to see your new icon in the panel.
7879

7980
## Next
80-
81-
Congratulations! You just finished the last step in this tutorial. To wrap things up, find out [What's next](whats-next.md).
81+
[Tutorial summary](summary.md).
8282

8383

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Summary
2+
3+
If you made it this far, congratulations! We hope this tutorial was useful for learning the basics of creating a completely new content type for your end users.
4+
5+
## Next topics
6+
Review the following topics to learn more about customizing Page Builder:
7+
8+
### Tutorials
9+
10+
- [Extend an existing content type](../extend-existing-content-type/overview.md)
11+
12+
### How-Tos
13+
14+
- [How to customize the Page Builder panel](../how-to/how-to-customize-panel.md)
15+
- [How to add an image uploader](../how-to/how-to-add-image-uploader.md)
16+
- [How to add a storefront widget](../how-to/how-to-add-storefront-widget.md)
17+
- [How to add a custom toolbar](../how-to/how-to-add-custom-toolbar.md)
18+
- [How to add icons and images](../how-to/how-to-add-icons-images.md)
19+
- [How to change breakpoints](../how-to/how-to-change-breakpoints.md)
20+
21+
### Reference
22+
23+
- [Page Builder configurations](../reference/configurations.md)
24+
- [Page Builder Datastore](../reference/data-store.md)
25+
- [Page Builder events](../reference/events.md)
26+
- [Page Builder Knockout bindings](../reference/knockout-bindings.md)

docs/create-custom-content-type/whats-next.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/extend-existing-content-type/overview.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Overview
22

3-
One of quickest ways to customize Page Builder is by changing how _existing_ content types look and behave. End-users can already edit Page Builder's content types in several ways. But sometimes your end-users will want to change the structure or modify properties that do not exist on a given content type. In those cases, you can extend an existing content type by customizing its existing _appearance_ or adding a new _appearance_.
3+
One of the quickest ways to customize Page Builder is by changing how _existing_ content types look and behave. End users can already use Page Builder's content types to customize their content using the form editor. But your end users may want to change the structure or set properties that do not exist on the content type. In those cases, you can extend an existing content type by customizing its _appearance_ or adding a new _appearance_.
44

55
## Appearances
66

7-
An **appearance** is an XML element in a content type's configuration file that lets you modify existing properties, templates, styles, and form fields, or create new ones. In other words, all Page Builder content types (existing or custom) are extended through appearances.
7+
An **appearance** is an XML element (in the content type's configuration file) that defines a view for your content type. This view defines HTML templates, styles, form fields, and other elements that you can customize in various ways. To extend existing Page Builder content types, you can either modify existing appearances or create new ones.
88

99
Many of Page Builder's content types have only one `appearance` element. These include the Heading, Text, Image, Video, Tabs, and more. Other content types have several appearances. For example, the Banner content type has four appearances, as shown here:
1010

@@ -21,7 +21,8 @@ Page Builder defines these appearances in the Banner's configuration file (`Mage
2121
</appearances>
2222
```
2323

24-
Within each `appearance` element, you can change content types in the following ways:
24+
In Page Builder 1.0.0, when you customize content types that have multiple appearances (like the Banner), you must apply your changes to all the appearances, not just one. Customizing a single appearance of a content type that defines multiple appearances is not currently supported.
25+
You can use appearances to change content types in the following ways:
2526

2627
- Add new style properties.
2728
- Add or change templates.
@@ -31,19 +32,19 @@ Within each `appearance` element, you can change content types in the following
3132

3233
## Banner extension tutorial
3334

34-
In this tutorial, you will extend the Banner content type by adding a new `max-height` style property to two of the Banner's existing appearances: `collage-left` and `collage-right`.
35+
In this tutorial, you will learn how to extend one of Page Builder's existing content types by adding a new `max-height` style property to the Banner's existing appearances.
3536

3637
![Page Builder Banner menu item](../images/extend-banner-menu.png){:width="815px" height="auto"}
3738

3839
## Banner extension steps
3940

40-
These steps show the basic pattern for adding style properties using existing appearances to extend a content type:
41+
These steps show the basic pattern for adding style properties and form fields to existing content type appearances:
4142

4243
![Creating Custom Content Types](../images/extension-steps-overview.svg)
4344

4445
1. **Create an extension module**: Create a basic module for your Banner extensions.
4546
2. **Extend appearances**: Extend the existing content type's configuration file by customizing an existing appearance with new style properties.
46-
3. **Extend forms**: Extend the existing content type's UI component form by adding new form fields and changing defaults for existing fields.
47+
3. **Extend forms**: Extend the existing content type's UI component form by adding new form fields and/or changing defaults for existing fields.
4748

4849
## Next
4950

docs/extend-existing-content-type/step-1-create-extension-module.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Step 1: Create an extension module
22

3-
Appearance extensions for Page Builder are implemented using modules. In this step, we will create an empty module so we can add our appearance and form extensions in steps 2 and 3, as shown here:
3+
The first step to creating appearance customizations for existing Page Builder content types is to create a standard Magento module. In this step, we create an empty module so we can add our appearance and form extensions in steps 2 and 3:
44

55
![Completed extension file structure](../images/extension-file-structure-complete.png){:width="826px" height="auto"}
66

7-
## Add directory structure
7+
## Add a directory structure
88

99
To create a module for the Banner extensions, name your vendor directory `Example` and name your module `PageBuilderExtensionBanner`, as shown here:
1010

1111
![Minimum extension module structure](../images/banner-extension-file-structure.png){:width="530px" height="auto"}
1212

13-
The convention for naming extension modules is to prefix your extension of an existing content type with `PageBuilderExtension`, followed by the name of the content type. This is not a required convention, but we find that it helps visually group extension modules within your vendor directory.
13+
The convention for naming extension modules is to prefix your extension of an existing content type with `PageBuilderExtension`, followed by the name of the content type. This is not a required convention, but we find it helps group extension modules within your vendor directory.
1414

1515
## Add module file
1616

0 commit comments

Comments
 (0)