Skip to content

Commit 244c6d6

Browse files
committed
Merge branch 'develop' into MC-4014-performance
# Conflicts: # app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/slide/preview.js # app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/slider/preview.js # app/code/Magento/PageBuilder/view/adminhtml/web/js/stage.js # app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type/slider/preview.ts # app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/stage.ts
2 parents 70ae787 + 9cdfe8a commit 244c6d6

File tree

47 files changed

+1603
-474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1603
-474
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderBlockTest.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,7 @@
839839
<actionGroup ref="dragContentTypeToStage" stepKey="dragTabsIntoStage">
840840
<argument name="contentType" value="PageBuilderTabsContentType"/>
841841
</actionGroup>
842+
<actionGroup ref="addTab" stepKey="addSecondTab"/>
842843
<!-- User sees tabs displayed with 1st default tab item created by default -->
843844
<comment userInput="User sees tabs displayed with 1st default tab item created by default" stepKey="AC1"/>
844845
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditPanel1">
@@ -859,9 +860,13 @@
859860
<argument name="property" value="PageBuilderTabBackgroundColorPink"/>
860861
</actionGroup>
861862
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
863+
<seeElement selector="{{TabOnStage.tabHeaderItemActive('1')}}" stepKey="seeFirstTabActiveAdminPreview"/>
862864
<comment userInput="User updates tab settings and saves configuration" stepKey="saveBlock"/>
863865
<click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="clickSaveBlock"/>
864866
<waitForPageLoad stepKey="waitForPageToLoad"/>
867+
<!--Verify stage after save-->
868+
<comment userInput="Verify stage after save" stepKey="commentVerifyStageAfterSave"/>
869+
<seeElement selector="{{TabOnStage.tabHeaderItemActive('1')}}" stepKey="seeFirstTabActiveAdminPreviewAfterSave"/>
865870
<!--User goes to created CMS page-->
866871
<comment userInput="User goes to created CMS page" stepKey="NavigateToCMSPage"/>
867872
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage">
@@ -883,6 +888,7 @@
883888
<!--Check that tab was rendered on the stage-->
884889
<comment userInput="Check that tab was rendered on the stage" stepKey="commentCheckingThatTabAreRenderedOnTHeStage"/>
885890
<see selector="{{TabOnStorefront.tabHeader('1')}}" userInput="{{PageBuilderTabNameRandom1.value}}" stepKey="seeTab1TitleStorefront2"/>
891+
<seeElement selector="{{TabOnStorefront.tabHeaderItemActive('1')}}" stepKey="seeFirstTabActiveStorefront2"/>
886892
<seeElement selector="{{TabOnStorefront.backgroundColor('1', PageBuilderTabBackgroundColorPink.rgb)}}" stepKey="seeTab1BackgroundColor2"/>
887893
<actionGroup ref="openOptionsMenu" stepKey="openEditMenuOnStage3">
888894
<argument name="contentType" value="PageBuilderBlockContentType"/>
@@ -894,6 +900,7 @@
894900
<comment userInput="Verify Block On Store front" stepKey="commentCheckingThatImageIsNotRenderedOnTheStoreFront"/>
895901
<amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage"/>
896902
<see selector="{{TabOnStorefront.tabHeader('1')}}" userInput="{{PageBuilderTabNameRandom1.value}}" stepKey="seeTab1TitleStorefront"/>
903+
<seeElement selector="{{TabOnStorefront.tabHeaderItemActive('1')}}" stepKey="seeFirstTabActiveStorefront"/>
897904
<seeElement selector="{{TabOnStorefront.backgroundColor('1', PageBuilderTabBackgroundColorPink.rgb)}}" stepKey="seeTab1BackgroundColor"/>
898905
<see userInput="$$createPreReqBlock.content$$" stepKey="seeBlockContentOnCmsStage1"/>
899906
</test>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderSliderCommonTests.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -943,9 +943,6 @@
943943
<seeElement selector="{{SliderOnStage.padding('2', PageBuilderPaddingPropertyUnique.value)}}" stepKey="seePaddingStage"/>
944944
<!-- Show Content -->
945945
<comment userInput="Show Content" stepKey="commentShowContent"/>
946-
<!-- Must save since slide breaks after duplication -->
947-
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
948-
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
949946
<actionGroup ref="showContentType" stepKey="showContentTypeFirstSlider">
950947
<argument name="section" value="SliderOnStage"/>
951948
<argument name="contentType" value="PageBuilderSliderContentType"/>
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
## Activate and Deactivate PageBuilder
2+
3+
## Navigation
4+
5+
1. [Introduction]
6+
2. [Installation guide]
7+
3. **Activate and Deactivate PageBuilder**
8+
4. [Contribution guide]
9+
5. [Developer documentation]
10+
1. [Architecture overview]
11+
1. [BlueFoot to PageBuilder data migration]
12+
1. [Third-party content type migration]
13+
1. [Iconography]
14+
1. [Add image uploader to content type]
15+
1. [Module integration]
16+
1. [Additional data configuration]
17+
1. [Content type configuration]
18+
1. [How to add a new content type]
19+
1. [Events]
20+
1. [Bindings]
21+
1. [Master format]
22+
1. [Visual select]
23+
1. [Reuse product conditions in content types]
24+
1. [Store component master format as widget directive]
25+
1. [Use the block chooser UI component]
26+
1. [Use the inline text editing component]
27+
1. [Render a backend content type preview]
28+
1. [Custom Toolbar]
29+
1. [Full width page layouts]
30+
1. [Add custom logic to content types]
31+
6. [Roadmap and known issues]
32+
7. [How to create custom PageBuilder content type container]
33+
34+
[Introduction]: introduction.md
35+
[Contribution guide]: ../CONTRIBUTING.md
36+
[Installation guide]: install.md
37+
[Developer documentation]: developer-documentation.md
38+
[Architecture overview]: architecture-overview.md
39+
[BlueFoot to PageBuilder data migration]: bluefoot-data-migration.md
40+
[Third-party content type migration]: new-content-type-example.md
41+
[Iconography]: iconography.md
42+
[Add image uploader to content type]: image-uploader.md
43+
[Module integration]: module-integration.md
44+
[Additional data configuration]: custom-configuration.md
45+
[Content type configuration]: content-type-configuration.md
46+
[How to add a new content type]: how-to-add-new-content-type.md
47+
[Events]: events.md
48+
[Bindings]: bindings.md
49+
[Master format]: master-format.md
50+
[Visual select]: visual-select.md
51+
[Reuse product conditions in content types]: product-conditions.md
52+
[Store component master format as widget directive]: widget-directive.md
53+
[Use the block chooser UI component]: block-chooser-component.md
54+
[Use the inline text editing component]: inline-editing-component.md
55+
[Render a backend content type preview]: content-type-preview.md
56+
[Custom Toolbar]: toolbar.md
57+
[Full width page layouts]: full-width-page-layouts.md
58+
[Add custom logic to content types]: add-custom-logic.md
59+
[Roadmap and Known Issues]: roadmap.md
60+
[How to create custom PageBuilder content type container]: how-to-create-custom-content-type-container.md
61+
[Activate and Deactivate PageBuilder]: activation-deactivation.md
62+
63+
64+
## Activate PageBuilder
65+
66+
Follow these steps to activate PageBuilder in the Admin:
67+
68+
1. Navigate to the Admin section of you Magento instance.
69+
2. In the **Stores** tab, select **Configuration** under the Settings group.
70+
3. In the **General** group on the page, select **Content Management**.
71+
4. Under **Advanced Content Tools**, select **Yes** for **Enable Page Builder**.
72+
5. Click **Save Config**
73+
74+
## Deactivate PageBuilder
75+
76+
We recommend you deactivate the PageBuilder editor through the Admin instead of disabling the module itself.
77+
This allows the PageBuilder module to continue rendering the content on the storefront even if the editor is not used in the Admin.
78+
79+
If you disabled or uninstalled the entire PageBuilder module instead of just the editor, you need to do the following to continue using PageBuilder-built content:
80+
81+
1. Implement PageBuilder widgets and initialize them on dynamic blocks since JavaScript functionality provided by PageBuilder will no longer work.
82+
2. Change the layout in the database for entities that use the full width layout to prevent blank layout content.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ All events starting with `contentType:` can also be called for specific content
133133
{
134134
id: string;
135135
contentType: ContentTypeInterface & ContentTypeCollectionInterface;
136+
expectedChildren: number;
136137
}
137138
```
138139

@@ -224,6 +225,7 @@ All events starting with `contentType:` can also be called for specific content
224225
originalContentType: ContentTypeInterface & ContentTypeCollectionInterface;
225226
duplicateContentType: ContentTypeInterface & ContentTypeCollectionInterface;
226227
index: number;
228+
direct: boolean;
227229
}
228230
```
229231

Binary file not shown.

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

Lines changed: 16 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,14 @@
2323

2424
## Overview
2525

26-
PageBuilder has two installation paths, one through Composer and the other through GitHub.
27-
28-
If you want to evaluate the PageBuilder module, follow the Composer installation path.
29-
30-
If you want to contribute to the development of PageBuilder, follow the GitHub installation path.
31-
32-
## Composer installation
33-
34-
This installation method uses Composer to install PageBuilder into Magento.
35-
Use this method if you are testing and evaluating PageBuilder for your Magento store.
26+
Follow these steps to install Page Builder.
3627

3728
### Prerequisites
3829

3930
* You submitted your MAGEID and github username and received access to 2.3 alpha and PageBuilder 100.0.0 alpha.
4031
If you didn't submit this information, send us an email to request access.
4132

42-
### Installation steps
33+
### Steps
4334

4435
1. If you already have 2.3.0 alpha or Page Builder 100.0.0 alpha version installed, run the following command before installing again:
4536
``` sh
@@ -49,45 +40,23 @@ Use this method if you are testing and evaluating PageBuilder for your Magento s
4940
2. Navigate to the directory where you want to install Magento and Page Builder.
5041
3. Install the 2.3.0 alpha Commerce package using the following command:
5142
``` sh
52-
composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition=2.3.0-alpha
43+
composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition:^2.3.0-alpha72
5344
```
5445

5546
Enter the access keys for your account (Marketplace / My Profile / Access Keys)
56-
4. Install Page Builder
57-
``` sh
58-
composer require magento/module-page-builder-commerce
59-
```
60-
5. Enable Page Builder module using the following command:
61-
``` sh
62-
bin/magento setup:upgrade
63-
```
64-
65-
## GitHub installation
66-
67-
This installation method checks out the PageBuilder repository from GitHub and installs it into a development instance of Magento.
68-
Do not use this installation method for evaluation or production instances.
69-
70-
### Prerequisites
71-
72-
* A local development installation of Magento 2.3.0 alpha
73-
* Access to the PageBuilder repository
74-
* [Yarn package manager]
75-
76-
[Yarn package manager]: https://yarnpkg.com/en/
77-
78-
### Installation steps
79-
80-
1. Navigate to the root directory of your Magento application
81-
2. Clone the PageBuilder repository as a sub-directory using the following command:
47+
4. Clone Page Builder repos
8248
``` sh
83-
git clone git@github.com:magento/magento2-page-builder.git pagebuilder
49+
git clone https://github.com/magento/magento2-page-builder
50+
git clone https://github.com/magento/magento2-page-builder-ee
8451
```
85-
3. Return to the root directory of your Magento application and navigate to `app/code/Magento`
86-
4. In the Magento modules directory, link the PageBuilder module code to the application code using the following command:
52+
5. Copy dev and app directories in magento2-page-builder and magento2-page-builder-ee to the directory with Magento Commerce 2.3 alpha
8753
``` sh
88-
ln -s ../../../pagebuilder/app/code/Magento/PageBuilder
54+
cp -r magento2-page-builder/app project-enterprise-edition/
55+
cp -r magento2-page-builder/dev project-enterprise-edition/
56+
cp -r magento2-page-builder-ee/app project-enterprise-edition/
57+
cp -r magento2-page-builder-ee/dev project-enterprise-edition/
8958
```
90-
5. Return to the root directory of your Magento application and install the PageBuilder module using the following command:
59+
6. Enable Page Builder module using the following command:
9160
``` sh
9261
bin/magento setup:upgrade
9362
```
@@ -96,60 +65,13 @@ Do not use this installation method for evaluation or production instances.
9665

9766
When a new version of Page Builder is available, destroy your existing 2.3.0-alpha instance and follow the [composer](install.md#composer-installation) or [GitHub](install.md#github-installation) installation steps.
9867

99-
## Installing Node.js dependencies
100-
101-
If you plan to contribute to Page Builder, you need to install Node.js dependencies to compile TypeScript.
102-
103-
Navigate to the `pagebuilder` directory and install PageBuilder dependencies using the following command:
104-
``` sh
105-
cd pagebuilder && yarn install
106-
```
107-
108-
Then you can run `npx gulp` to watch changes to TypeScript files and compile.
109-
110-
To check for TypeScript errors, you can run `npx tslint --fix -p tsconfig.json`.
111-
112-
## Activation
113-
114-
Follow these steps to activate PageBuilder in the Admin:
115-
116-
1. Navigate to the Admin section of you Magento instance.
117-
2. In the **Stores** tab, select **Configuration** under the Settings group.
118-
3. In the **General** group on the page, select **Content Management**.
119-
4. Under **Advanced Content Tools**, select **Yes** for **Enable Page Builder**.
120-
5. Click **Save Config**
121-
122-
## Disable PageBuilder
123-
124-
We recommend you deactivate the PageBuilder editor through the Admin instead of disabling the module itself.
125-
This allows the PageBuilder module to continue rendering the content on the storefront even if the editor is not used in the Admin.
126-
127-
If you disabled or uninstalled the entire PageBuilder module instead of just the editor, you need to do the following to continue using PageBuilder-built content:
128-
129-
1. Implement PageBuilder widgets and initialize them on dynamic blocks since JavaScript functionality provided by PageBuilder will no longer work.
130-
2. Change the layout in the database for entities that use the full width layout to prevent blank layout content.
131-
13268
## Troubleshooting
13369

134-
### Common access problems
135-
136-
If you are having trouble installing PageBuilder, please verify that the `MAGEID` account you provided for the Early Access Program (EAP) belongs to an active Magento partner account.
137-
138-
**Note:**
139-
*Your company may have multiple Magento accounts, and only one or two may be active.*
140-
*Ask your company to provide you with an active Magento account.*
141-
142-
Log into www.magento.com and see if the **Support** and **Downloads** tabs are available.
143-
144-
![Support and downloads tabs](images/support-downloads-tab.png)
145-
146-
If these tabs do not appear in your Magento account, it is not an active Magento partner account, and
147-
you will not be able to access PageBuilder.
70+
### Page Builder repositories access problems
14871

149-
If you provided incorrect `MAGEID` by mistake and have another one that is valid, please resubmit this form:
150-
https://goo.gl/forms/unvuDikl9wydmKt12
72+
If you are having trouble accessing PageBuilder repositories, please contact [Igor Melnykov] or [Olena Tkacheva].
15173

152-
### Errors
74+
### 2.3 alpha installation problems
15375

15476
If you run into any of the following errors:
15577

@@ -161,6 +83,6 @@ Could not find a matching version of package magento/module-page-builder-commerc
16183
```
16284
16385
Check your composer keys in the `auth.json` file.
164-
If these keys are correct and you still encounter these errors, please contact [Olena Tkacheva].
86+
If these keys are correct and you still encounter these errors, please contact [Igor Melnykov] or [Olena Tkacheva].
16587
16688
[Olena Tkacheva]: https://magentocommeng.slack.com/messages/@UAFV915FB

app/code/Magento/PageBuilder/view/adminhtml/requirejs-config.js

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,20 @@
44
*/
55

66
var config = {
7-
paths: {
8-
'pagebuilder/async': 'Magento_PageBuilder/js/resource/requirejs/async',
9-
10-
/* Extra Resources Needed */
11-
'pagebuilder/html2canvas': 'Magento_PageBuilder/js/resource/html2canvas',
12-
'hyperscript': 'Magento_PageBuilder/js/resource/hyperscript/hyperscript',
13-
'xyperscript': 'Magento_PageBuilder/js/resource/xyperscript/xyperscript',
14-
'google-map': 'Magento_PageBuilder/js/utils/map',
15-
16-
/* Include our Knockout Sortable wrapper */
17-
'pagebuilder/ko-dropzone': 'Magento_PageBuilder/js/resource/dropzone/knockout-dropzone',
18-
'pagebuilder/ko-redactor': 'Magento_PageBuilder/js/resource/redactor/knockout-redactor',
19-
'pagebuilder/ko-liveedit': 'Magento_PageBuilder/js/resource/live-edit/knockout-liveedit'
20-
},
217
map: {
228
'*': {
23-
/* Map the abstract widget to the input type widget */
24-
'pagebuilder/widget/abstract': 'pagebuilder/field/abstract',
9+
/* Include our Knockout Sortable wrapper */
10+
'pagebuilder/ko-dropzone': 'Magento_PageBuilder/js/resource/dropzone/knockout-dropzone',
2511

2612
/* Utilities */
27-
'pagebuilder/utils': 'Magento_PageBuilder/js/utils',
28-
'pagebuilder/config': 'Magento_PageBuilder/js/component/config'
13+
'google-map': 'Magento_PageBuilder/js/utils/map'
2914
}
3015
},
3116
shim: {
3217
'pagebuilder/ko-sortable': {
33-
deps: ['jquery', 'jquery/ui', 'Magento_PageBuilder/js/resource/jquery-ui/jquery.ui.touch-punch.min']
18+
deps: ['jquery', 'jquery/ui', 'Magento_PageBuilder/js/resource/jquery-ui/jquery.ui.touch-punch']
3419
},
35-
'Magento_PageBuilder/js/resource/jquery/ui/jquery.ui.touch-punch.min': {
20+
'Magento_PageBuilder/js/resource/jquery/ui/jquery.ui.touch-punch': {
3621
deps: ['jquery/ui']
3722
}
3823
},

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/_preview.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
transition: opacity 200ms, top 200ms, visibility 200ms;
178178
visibility: hidden;
179179
width: 100%;
180-
z-index: 15;
180+
z-index: 20;
181181
}
182182
}
183183

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/tabs/_default.less

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,12 @@ div[data-role='tabs'],
154154
min-height: inherit;
155155
padding: 0;
156156

157-
> .pagebuilder-content-type-wrapper:not(:first-child) {
158-
display: none;
157+
> .pagebuilder-content-type-wrapper {
158+
display: block;
159+
160+
~ .pagebuilder-content-type-wrapper {
161+
display: none;
162+
}
159163
}
160164
}
161165
}

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type-factory.js

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)