Skip to content

Commit 6ca72a9

Browse files
committed
Merge remote-tracking branch 'mainline/1.0-develop' into MC-15977
2 parents ddfbca0 + 52aa959 commit 6ca72a9

File tree

98 files changed

+1150
-588
lines changed

Some content is hidden

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

98 files changed

+1150
-588
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# CODEOWNERS file for /docs/ folder.
2+
# Forces a review from other writers for anything within /docs/.
3+
/docs/ @magento/devdocs-admins

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderMapSection.xml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919
<!-- Location Pin Configuration -->
2020
<element name="latitude" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(@data-locations,'&quot;position&quot;:{&quot;latitude&quot;:{{arg2}},')]" parameterized="true"/>
2121
<element name="longitude" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(@data-locations,',&quot;longitude&quot;:{{arg2}}}')]" parameterized="true"/>
22-
<element name="tooltipWindow" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[@class='gm-style-iw']" parameterized="true"/>
23-
<element name="tooltipWindowClose" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[@class='gm-style-iw']//..//button[@title='Close']" parameterized="true"/>
24-
<element name="locationName" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[@class='gm-style-iw']//h3/b[.='{{arg2}}']" parameterized="true"/>
25-
<element name="comment" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[@class='gm-style-iw']//p[.='{{arg2}}']" parameterized="true"/>
26-
<element name="phoneNumber" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[@class='gm-style-iw']//p[.='Phone: {{arg2}}']" parameterized="true"/>
27-
<element name="noPhoneNumber" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[@class='gm-style-iw']//p[.='{{arg2}}']" parameterized="true"/>
28-
<element name="addressCityStateZipCountry" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[@class='gm-style-iw']//span[.='{{arg2}}{{arg3}}{{arg4}}{{arg5}}{{arg6}}']" parameterized="true"/>
29-
<element name="locationNameElement" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[@class='gm-style-iw']//h3/b" parameterized="true"/>
30-
<element name="commentElement" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[@class='gm-style-iw']//p" parameterized="true"/>
31-
<element name="phoneNumberElement" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[@class='gm-style-iw']//p" parameterized="true"/>
32-
<element name="addressCityStateZipCountryElement" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[@class='gm-style-iw']//span" parameterized="true"/>
22+
<element name="tooltipWindow" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]" parameterized="true"/>
23+
<element name="tooltipWindowClose" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//..//button[@title='Close']" parameterized="true"/>
24+
<element name="locationName" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//h3/b[.='{{arg2}}']" parameterized="true"/>
25+
<element name="comment" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//p[.='{{arg2}}']" parameterized="true"/>
26+
<element name="phoneNumber" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//p[.='Phone: {{arg2}}']" parameterized="true"/>
27+
<element name="noPhoneNumber" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//p[.='{{arg2}}']" parameterized="true"/>
28+
<element name="addressCityStateZipCountry" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//span[.='{{arg2}}{{arg3}}{{arg4}}{{arg5}}{{arg6}}']" parameterized="true"/>
29+
<element name="locationNameElement" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//h3/b" parameterized="true"/>
30+
<element name="commentElement" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//p" parameterized="true"/>
31+
<element name="phoneNumberElement" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//p" parameterized="true"/>
32+
<element name="addressCityStateZipCountryElement" type="text" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//span" parameterized="true"/>
3333
<!-- Map Settings Configuration -->
3434
<element name="height" type="button" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(@data-bind,'renderMap') and contains(@style,'height: {{arg2}}px;')]" parameterized="true"/>
3535
<element name="noHeight" type="button" selector="(//div[contains(@class,'pagebuilder-map')])[{{arg1}}]//div[contains(@data-bind,'renderMap') and not(contains(@style,'height:'))]" parameterized="true"/>
@@ -68,17 +68,17 @@
6868
<!-- Location Pin Configuration -->
6969
<element name="latitude" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][contains(@data-locations,'&quot;position&quot;:{&quot;latitude&quot;:{{arg2}},')]" parameterized="true"/>
7070
<element name="longitude" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}][contains(@data-locations,',&quot;longitude&quot;:{{arg2}}}')]" parameterized="true"/>
71-
<element name="tooltipWindow" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[@class='gm-style-iw']" parameterized="true"/>
72-
<element name="tooltipWindowClose" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[@class='gm-style-iw']//..//button[@title='Close']" parameterized="true"/>
73-
<element name="locationName" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[@class='gm-style-iw']//h3/b[.='{{arg2}}']" parameterized="true"/>
74-
<element name="comment" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[@class='gm-style-iw']//p[.='{{arg2}}']" parameterized="true"/>
75-
<element name="phoneNumber" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[@class='gm-style-iw']//p[.='Phone: {{arg2}}']" parameterized="true"/>
76-
<element name="noPhoneNumber" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[@class='gm-style-iw']//p[.='{{arg2}}']" parameterized="true"/>
77-
<element name="addressCityStateZipCountry" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[@class='gm-style-iw']//span[.='{{arg2}}{{arg3}}{{arg4}}{{arg5}}{{arg6}}']" parameterized="true"/>
78-
<element name="locationNameElement" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[@class='gm-style-iw']//h3/b" parameterized="true"/>
79-
<element name="commentElement" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[@class='gm-style-iw']//p" parameterized="true"/>
80-
<element name="phoneNumberElement" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[@class='gm-style-iw']//p" parameterized="true"/>
81-
<element name="addressCityStateZipCountryElement" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[@class='gm-style-iw']//span" parameterized="true"/>
71+
<element name="tooltipWindow" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]" parameterized="true"/>
72+
<element name="tooltipWindowClose" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//..//button[@title='Close']" parameterized="true"/>
73+
<element name="locationName" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//h3/b[.='{{arg2}}']" parameterized="true"/>
74+
<element name="comment" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//p[.='{{arg2}}']" parameterized="true"/>
75+
<element name="phoneNumber" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//p[.='Phone: {{arg2}}']" parameterized="true"/>
76+
<element name="noPhoneNumber" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//p[.='{{arg2}}']" parameterized="true"/>
77+
<element name="addressCityStateZipCountry" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//span[.='{{arg2}}{{arg3}}{{arg4}}{{arg5}}{{arg6}}']" parameterized="true"/>
78+
<element name="locationNameElement" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//h3/b" parameterized="true"/>
79+
<element name="commentElement" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//p" parameterized="true"/>
80+
<element name="phoneNumberElement" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//p" parameterized="true"/>
81+
<element name="addressCityStateZipCountryElement" type="text" selector="(//div[@data-content-type='map'])[{{arg1}}]//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]//span" parameterized="true"/>
8282
<!-- Map Settings Configuration -->
8383
<element name="height" type="button" selector="(//div[@data-content-type='map'])[{{arg1}}][contains(@style,'height: {{arg2}}px;')]" parameterized="true"/>
8484
<element name="noHeight" type="button" selector="(//div[@data-content-type='map'])[{{arg1}}][not(contains(@style,'height:'))]" parameterized="true"/>
@@ -122,7 +122,7 @@
122122
<element name="clickablePin" type="button" selector="//div[@data-index='position']//div[@class='map-field']//map//area"/>
123123
<element name="allPins" type="button" selector="//div[@data-index='position']//div[@class='map-field']//img[not(@usemap) and contains(@src,'spotlight-poi2_hdpi.png')]|//div[@data-index='position']//div[@class='map-field']//img[not(@usemap) and contains(@src,'spotlight-poi2.png')]"/>
124124
<element name="pinLocations" type="text" selector="(//div[@data-index='position']//div[contains(@style,'transform: matrix(1, 0, 0, 1, ')])[{{arg1}}]" parameterized="true"/>
125-
<element name="tooltipWindow" type="text" selector="//div[@data-index='position']//div[@class='map-field']//div[@class='gm-style-iw']"/>
125+
<element name="tooltipWindow" type="text" selector="//div[@data-index='position']//div[@class='map-field']//div[contains(concat(' ', normalize-space(@class), ' '), ' gm-style-iw ')]"/>
126126
<element name="helperText" type="button" selector="//div[@data-index='position']//span[.='You can move the pin by clicking or dragging it where you want. To alter the zoom please use the controls.']"/>
127127
<element name="renderedMap" type="button" selector="//div[@data-index='position']//div[@class='map-field']//div[contains(@class, 'gm-style')]"/>
128128
<element name="googleMapsLink" type="button" selector="//div[@data-index='position']//div[@class='map-field' and not(contains(@style,'display: none;'))]//a//img[{{arg1}}]" parameterized="true"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
<annotations>
152152
<features value="PageBuilder"/>
153153
<stories value="Map"/>
154-
<title value="Google Maps API Key - Invalid API Key Warning Message"/>
154+
<title value="Google Maps API Key - Invalid API Key Warning Message (MC-5723)"/>
155155
<description value="A user should see an invalid key overlay on map on stage and add location form, a warning message on the configuration panel, and a google error on the Storefront when an invalid Google Maps API key is set."/>
156156
<severity value="CRITICAL"/>
157157
<useCaseId value="MC-5723"/>
Loading

docs/comp-status2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Component status
22

3-
**Last Updated: February 14, 2019**
3+
**Last Updated: March 26, 2019**
44

55
<style type="text/css" style="display: none">
66
.status {

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

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ And the same three Quote controls are shown rendered here on a mock testimonial
1616

1717
## Quote module
1818

19-
As with most things in Magento, content types for Page Builder are housed in modules. The convention for naming modules that are solely dedicated to Page Builder, such as our Quote content type, is to prefix all the content type name with `PageBuilder`. This helps visually group content type modules within your vendor directory. Of course, this convention doesn't apply If you are adding a content type as part of an existing module.
19+
As with most things in Magento, content types for Page Builder are housed in modules. The convention for naming modules that are solely dedicated to Page Builder, such as our Quote content type, is to prefix all content type names with `PageBuilder`. This helps visually group content type modules within your vendor directory. Of course, this convention does not apply if you are adding a content type as part of an existing module.
2020

2121
Applying this convention to the module for our Quote content type, we get the name `PageBuilderQuote`, and can set up our module as shown here:
2222

@@ -28,7 +28,7 @@ After registering your module (`bin/magento setup:upgrade`) you will be ready to
2828

2929
The steps for creating the Quote content type are illustrated and described below. The reality is not quite this linear, but these steps do represent the basic phases and flow for building new Page Builder content types.
3030

31-
![Creating Custom Content Types](../images/content-type-overview.png)
31+
![Creating Custom Content Types](../images/content-type-overview.svg)
3232

3333
1. **Add configuration**: Create an XML file to define your content type and reference the other files that control the appearance and behavior of your content type.
3434
2. **Add templates**: Create HTML templates that define the appearance of your content types on the Admin stage (`preview.html`) and the storefront (`master.html`).

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,15 @@ The `type` element defines the key properties of your content type. The attribut
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. |
6565
| `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](../how-to/how-to-customize-panel.md) for more details. |
66-
| `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. |
67-
| `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`. |
68-
| `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`. |
66+
| `component` | View model responsible for rendering the preview and master format. The component does not need to specify the `.js` extension. 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. |
67+
| `preview_component` | JavaScript file (`preview.js` or `preview-collection.js`) that provides rendering logic within the Admin UI. The preview component does not need to specify the `.js` extension. <br/><br/>For _collection_ content types, you need to either reference your own `preview-collection` component or reference Page Builder's `preview-collection` (`preview_component="Magento_PageBuilder/js/content-type/preview-collection"`). If you don't specify the `preview_component`, Page Builder uses the base `Preview` component shown in the code: `Magento_PageBuilder/js/content-type/preview`. |
68+
| `master_component` | JavaScript file (`master.js` or `master-collection.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. <br/><br/>For _collection_ content types, you need to either reference your own `master-collection` component or reference Page Builder's `master-collection` (`master_component="Magento_PageBuilder/js/content-type/master-collection"`). If you don't specify 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. |
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. |
7373

74+
7475
## The `children` element
7576

7677
The `children` element determines if your content type can contain other content types as children. In the Admin UI, it either allows or prevents you from dragging and dropping *other* content types from the panel into *your* content type.

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

0 commit comments

Comments
 (0)