Skip to content

Commit f4ccf7e

Browse files
author
James Calcaben
committed
MAGETWO-91200: Update documentation for PageBuilder EAP
- revise architecture overview topic
1 parent eb53a2b commit f4ccf7e

10 files changed

+113
-38
lines changed

app/code/Magento/PageBuilder/docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ It replaces the default WYSIWYG Editor in the Admin area with a highly configura
99
2. [Installation guide]
1010
3. Contribution guide
1111
4. [Developer documentation]
12+
1. [Architecture overview]
1213
1. [BlueFoot to PageBuilder data migration]
1314
1. [Third-party content type migration]
1415
1. [Iconography]
@@ -21,6 +22,7 @@ It replaces the default WYSIWYG Editor in the Admin area with a highly configura
2122
[Introduction]: README.md
2223
[Installation Guide]: install.md
2324
[Developer documentation]: developer-documentation.md
25+
[Architecture overview]: architecture-overview.md
2426
[BlueFoot to PageBuilder data migration]: bluefoot-data-migration.md
2527
[Third-party content type migration]: new-content-type-example.md
2628
[Iconography]: iconography.md
Lines changed: 93 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,78 @@
11
# Architecture overview
22

3-
## What is Page Builder?
4-
5-
PageBuilder is tool that simplifies content creation. It allows to grag and drop content types and configure them. Changes are immediately displayed in the preview in admin and it matches to what user will see on the storefront.
6-
7-
## What is Page Builder?
8-
9-
PageBuilder is tool that simplifies content creation. It allows to grag and drop content types and configure them. Changes are immediately displayed in the preview in admin and it matches to what user will see on the storefront.
3+
## Navigation
4+
5+
1. [Introduction]
6+
2. [Installation guide]
7+
3. Contribution guide
8+
4. [Developer documentation]
9+
1. **Architecture overview**
10+
1. [BlueFoot to PageBuilder data migration]
11+
1. [Third-party content type migration]
12+
1. [Iconography]
13+
1. [Module integration]
14+
1. [Additional data configuration]
15+
1. [Content type configuration]
16+
1. [How to add a new content type]
17+
5. [Roadmap and known issues]
18+
19+
[Introduction]: README.md
20+
[Installation Guide]: install.md
21+
[Developer documentation]: developer-documentation.md
22+
[Architecture overview]: architecture-overview.md
23+
[BlueFoot to PageBuilder data migration]: bluefoot-data-migration.md
24+
[Third-party content type migration]: new-content-type-example.md
25+
[Iconography]: iconography.md
26+
[Module integration]: module-integration.md
27+
[Additional data configuration]: custom-configuration.md
28+
[Content type configuration]: content-type-configuration.md
29+
[How to add a new content type]: how-to-add-new-content-type.md
30+
[Roadmap and Known Issues]: roadmap.md
31+
32+
## What is PageBuilder?
33+
34+
PageBuilder is tool that simplifies content creation by letting you drag and drop content types and configure them without writing a line of code.
35+
Changes appear in real time in the preview area in the Admin and matches what users see on the storefront.
1036

1137
## Technologies
1238

13-
Page Builder written in TypeScript, however it comes with compiled JavaScript. You don't need to worry about compiling TypeScript or use it TypeScript your module.
39+
PageBuilder is written in [TypeScript], a superset of JavaScript, that is compiled down to JavaScript prior to a release.
40+
Use the TypeScript components in the module as reference to understand the flow information.
1441

15-
Page Builder also uses Knockout.js, UI components for building forms and different libraries like slick.
42+
**Note:**
43+
*You do not need to use TypeScript in your module to work with the PageBuilder code.*
44+
45+
PageBuilder also uses core Magento technologies such as jQuery, Knockout & UI Components.
46+
It also uses additional libraries to help with various content types shipped with the module.
1647

1748
## Storage format
1849

19-
For storage (later master format) Page Builder uses XHTML with inline styles and data attributes. The idea is that is that content can be displayed with minimum changes on Magento storefront and also by third party systems.
50+
PageBuilder uses XHTML with inline stlyes and data attributes for storage and as the [master format].
51+
This allows the content to be displayed with minimum changes to the Magento storefront and other third-party systems.
2052

2153
To display Page Builder content on storefront Magento and third party systems need to do the following
2254

23-
1. Replace Magento directives (for instance {{image url=path/to/image.png}}).
24-
2. Add custom stylesheet to provide base styles that user can't edit (this includes styles for the content types like `slider`, `tabs`, `accordion`, etc).
25-
3. After content is rendered, on the frontend find all of content types that need to have widgets initialized (for instance, slider, tabs, etc) and load and initialize these widgets.
55+
Use the following steps to display PageBuilder content on a Magento storefront or third-party system:
2656

27-
See more on [master format](master-format.md)
57+
1. Replace all Magento directives such as `{{image url=path/to/image.png}}`
58+
2. Add custom stylesheet to provide the base styles that user can't edit.
59+
This includes styles for the content types such as `slider`, `tabs`, `accordion`, etc.
60+
3. After the content renders, load and initialze the widgets and libraries on the frontend that need initalization, such as slider, tabs, etc.
2861

2962
## Integration with Magento and custom modules
3063

31-
PageBuilder replaces WYSIWYG on all forms. You can enable/disable Page Builder for product attributes.
64+
When PageBuilder is enabled in the system configuration, it replaces all WYSIWYG instances.
65+
It does this by intercepting the WYSIWYG UI Component field and replacing the traditional WYSIWYG editor with the PageBuilder editor.
66+
67+
This means that any custom extension that utilises the WYSIWYG field UI Component automatically supports the PageBuilder editor.
3268

33-
Page Builder also would be enabled in custom extensions where WYSIWYG is used.
69+
To revert back to using the default WYSIWYG, add the following entry to the field configuration in the XML configuration file:
70+
71+
```
72+
<item name="wysiwygConfigData" xsi:type="array">
73+
<item name="is_pagebuilder_enabled" xsi:type="boolean">false</item>
74+
</item>
75+
```
3476

3577
## Big picture
3678

@@ -52,43 +94,52 @@ Page Builder also would be enabled in custom extensions where WYSIWYG is used.
5294

5395
![Page Builder data flow](images/data-flow.png)
5496

55-
Here is simplified data flow:
56-
1. Data read by reader `Magento_PageBuilder/js/master-format/read/configurable`.
57-
2. Data for each element (`border`, `border_color`, `border_width` etc) converted to internal format by element converters.
58-
3. Data converted by mass converters, for more details see [converter interface](content-type-configuration.md).
59-
4. Content type created and `Magento_PageBuilder/js/data-store` populated with data.
60-
5. Data in data store modified in the form or using live edit.
61-
6. Data converted by mass converters.
62-
7. Converted by element data converters.
63-
8. Preview and master component observables updated.
64-
9. Editable with Page Builder entity attribute updated, when user saves the pages master format being saved to the database.
97+
The following is a simple overview of the data flow:
98+
99+
1. Data is read by reader `Magento_PageBuilder/js/master-format/read/configurable`.
100+
2. Data for each element (`border`, `border_color`, `border_width` etc) is converted to an internal format by element converters.
101+
3. Data is converted by mass converters. For more details see [converter interface](content-type-configuration.md).
102+
4. Content type is created and `Magento_PageBuilder/js/data-store` is populated with data.
103+
5. Data in the data store is modified in the form or using live edit.
104+
6. Data is converted by mass converters.
105+
7. It is then converted by element data converters.
106+
8. The preview and master component observables are updated.
107+
9. When the user saves the page's master format into the database, the editable with the PageBuilder entity attribute is updated.
108+
109+
### Mass converter
65110

66-
Mass converter modifies on data for all content type elements. For instance, if content type two elements, main and image. And data for these elements stored in the fields `border`, `border_color`, `border_width`, `background_image`. Mass converter will allow to modify all these fields. See more on how [data stored internally](#Data store).
111+
A Mass converter modifies data for all content type elements.
112+
For example, the content type of two elements, main and image has data stored in the fields `border`, `border_color`, `border_width`, `background_image`.
113+
A mass converter allows you to modify all these fields.
67114

68-
Element converter modifies single field at a time.
115+
For more information, read about how [data is stored internally](#Data store).
116+
117+
### Element converter
118+
119+
An element converter modifies a single field at a time.
69120

70121
## Data store
71122

72-
Data for content type stored in DataStore `Magento_PageBuilder/js/data-store`.
123+
Data for content types are stored in a simple object called the DataStore `Magento_PageBuilder/js/data-store`.
73124

74-
DataStore is a simple object. `var` from [content type configuration](content-type-configuration.md) is the name of parameter in DataStore.
125+
`var` from [content type configuration](content-type-configuration.md) is the name of a parameter in the DataStore.
75126

76-
You can use `subscribe` method to subscribe to changes of the data and perform custom action on it.
127+
You can use the `subscribe` method to subscribe to changes in the data and perform custom action on it.
77128

78129
## Content type configuration
79130

80-
Please see [content type configuration](content-type-configuration.md#Converter Interfaces) for content type configuration.
131+
Please see [content type configuration](content-type-configuration.md#Converter Interfaces) for information on content type configuration.
81132

82133
## Appearances
83134

84-
Appearances allow to customize existing content types.
135+
Appearances allow you to make the following customization on existing content types:
85136

86-
Appearance allows to make the following customizations to content type:
87-
1. Add new style properties to existing content types.
137+
1. Add new style properties to existing content types
88138
2. Add new attributes to existing content types. This is similar to above.
89139
3. Change templates
90-
4. Move data between elements, achieved with data mapping configuration. For example, developer can move margin from one element to another.
91-
5. Change form for content type.
140+
4. Move data between elements, achieved with data mapping configuration.
141+
For example, a developer can move the `margin` style property from one element to another.
142+
5. Change the form for a [content type]
92143

93144
## Module structure
94145

@@ -99,4 +150,8 @@ Appearance allows to make the following customizations to content type:
99150
| Styles | `Vendor/ModuleName/view/adminhtml/web/css/source/content-type/content-type-name` |
100151

101152
**Note:**
102-
*We also considering introducing appearance component and/or moving initialization of the libraries to bindings. This would allow add custom logic per appearance changes libraries per appearance for content types like slider, tabs, accordion, etc.*
153+
*We also considered introducing appearance component and/or moving the initialization of the libraries to bindings. This would allow you to add custom logic per appearance changes and libraries per appearance for content types like slider, tabs, accordion, etc.*
154+
155+
[TypeScript]: https://www.typescriptlang.org/
156+
[master format]: master-format.md
157+
[content type]: how-to-add-new-content-type.md

app/code/Magento/PageBuilder/docs/bluefoot-data-migration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
2. [Installation guide]
66
3. Contribution guide
77
4. [Developer documentation]
8+
1. [Architecture overview]
89
1. **BlueFoot to PageBuilder data migration**
910
1. [Third-party content type migration]
1011
1. [Iconography]
@@ -17,6 +18,7 @@
1718
[Introduction]: README.md
1819
[Installation guide]: install.md
1920
[Developer documentation]: developer-documentation.md
21+
[Architecture overview]: architecture-overview.md
2022
[BlueFoot to PageBuilder data migration]: bluefoot-data-migration.md
2123
[Third-party content type migration]: new-content-type-example.md
2224
[Iconography]: iconography.md

app/code/Magento/PageBuilder/docs/content-type-configuration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
2. [Installation guide]
1010
3. Contribution guide
1111
4. [Developer documentation]
12+
1. [Architecture overview]
1213
1. [BlueFoot to PageBuilder data migration]
1314
1. [Third-party content type migration]
1415
1. [Iconography]
@@ -21,6 +22,7 @@
2122
[Introduction]: README.md
2223
[Installation guide]: install.md
2324
[Developer documentation]: developer-documentation.md
25+
[Architecture overview]: architecture-overview.md
2426
[BlueFoot to PageBuilder data migration]: bluefoot-data-migration.md
2527
[Third-party content type migration]: new-content-type-example.md
2628
[Iconography]: iconography.md

app/code/Magento/PageBuilder/docs/custom-configuration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
2. [Installation guide]
77
3. Contribution guide
88
4. [Developer documentation]
9+
1. [Architecture overview]
910
1. [BlueFoot to PageBuilder data migration]
1011
1. [Third-party content type migration]
1112
1. [Iconography]
@@ -18,6 +19,7 @@
1819
[Introduction]: README.md
1920
[Installation guide]: install.md
2021
[Developer documentation]: developer-documentation.md
22+
[Architecture overview]: architecture-overview.md
2123
[BlueFoot to PageBuilder data migration]: bluefoot-data-migration.md
2224
[Third-party content type migration]: new-content-type-example.md
2325
[Iconography]: iconography.md

app/code/Magento/PageBuilder/docs/developer-documentation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
2. [Installation guide]
77
3. Contribution guide
88
4. **Developer documentation**
9+
1. [Architecture overview]
910
1. [BlueFoot to PageBuilder data migration]
1011
1. [Third-party content type migration]
1112
1. [Iconography]
@@ -15,6 +16,8 @@
1516
1. [How to add a new content type]
1617
5. [Roadmap and known issues]
1718

19+
**[Architecture overview]** - An overview of the PageBuilder module architecture.
20+
1821
**[BlueFoot to PageBuilder data migration]** - An overview of how data is migrated from BlueFoot to PageBuilder and a summary of the API available for this process.
1922

2023
**[Third-party content type migration]** - A tutorial that illustrates the process of migrating a BlueFoot third-party content type into PageBuilder.
@@ -31,6 +34,7 @@
3134

3235
[Introduction]: README.md
3336
[Installation guide]: install.md
37+
[Architecture overview]: architecture-overview.md
3438
[BlueFoot to PageBuilder data migration]: bluefoot-data-migration.md
3539
[Third-party content type migration]: new-content-type-example.md
3640
[Iconography]: iconography.md

app/code/Magento/PageBuilder/docs/how-to-add-new-content-type.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
2. [Installation guide]
77
3. Contribution guide
88
4. [Developer documentation]
9+
1. [Architecture overview]
910
1. [BlueFoot to PageBuilder data migration]
1011
1. [Third-party content type migration]
1112
1. [Iconography]
@@ -18,6 +19,7 @@
1819
[Introduction]: README.md
1920
[Installation guide]: install.md
2021
[Developer documentation]: developer-documentation.md
22+
[Architecture overview]: architecture-overview.md
2123
[BlueFoot to PageBuilder data migration]: bluefoot-data-migration.md
2224
[Third-party content type migration]: new-content-type-example.md
2325
[Iconography]: iconography.md

app/code/Magento/PageBuilder/docs/iconography.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
2. [Installation guide]
77
3. Contribution guide
88
4. [Developer documentation]
9+
1. [Architecture overview]
910
1. [BlueFoot to PageBuilder data migration]
1011
1. [Third-party content type migration]
1112
1. **Iconography**
@@ -18,6 +19,7 @@
1819
[Introduction]: README.md
1920
[Installation guide]: install.md
2021
[Developer documentation]: developer-documentation.md
22+
[Architecture overview]: architecture-overview.md
2123
[BlueFoot to PageBuilder data migration]: bluefoot-data-migration.md
2224
[Third-party content type migration]: new-content-type-example.md
2325
[Iconography]: iconography.md

app/code/Magento/PageBuilder/docs/module-integration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
2. [Installation guide]
77
3. Contribution guide
88
4. [Developer documentation]
9+
1. [Architecture overview]
910
1. [BlueFoot to PageBuilder data migration]
1011
1. [Third-party content type migration]
1112
1. [Iconography]
@@ -18,6 +19,7 @@
1819
[Introduction]: README.md
1920
[Installation guide]: install.md
2021
[Developer documentation]: developer-documentation.md
22+
[Architecture overview]: architecture-overview.md
2123
[BlueFoot to PageBuilder data migration]: bluefoot-data-migration.md
2224
[Third-party content type migration]: new-content-type-example.md
2325
[Iconography]: iconography.md

app/code/Magento/PageBuilder/docs/new-content-type-example.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
2. [Installation guide]
77
3. Contribution guide
88
4. [Developer documentation]
9+
1. [Architecture overview]
910
1. [BlueFoot to PageBuilder data migration]
1011
1. **Third-party content type migration**
1112
1. [Iconography]
@@ -18,6 +19,7 @@
1819
[Introduction]: README.md
1920
[Installation guide]: install.md
2021
[Developer documentation]: developer-documentation.md
22+
[Architecture overview]: architecture-overview.md
2123
[BlueFoot to PageBuilder data migration]: bluefoot-data-migration.md
2224
[Third-party content type migration]: new-content-type-example.md
2325
[Iconography]: iconography.md

0 commit comments

Comments
 (0)