Skip to content

Commit 6fd8d65

Browse files
committed
Merge remote-tracking branch 'origin/MC-394-duplication-names' into cms-team-2-sprint-15-bugs
2 parents 50ebc89 + f436637 commit 6fd8d65

File tree

5 files changed

+16
-34
lines changed

5 files changed

+16
-34
lines changed

app/code/Magento/PageBuilder/etc/content_type.xsd

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,13 @@
8989
<xs:complexType name="elements">
9090
<xs:sequence>
9191
<xs:element type="element" name="element" minOccurs="1" maxOccurs="unbounded">
92-
<xs:unique name="uniqueStyleName">
92+
<xs:unique name="uniqueNames">
9393
<xs:annotation>
9494
<xs:documentation>
95-
Style name must be unique
95+
Attribute and Style names must be unique
9696
</xs:documentation>
9797
</xs:annotation>
98-
<xs:selector xpath="style"/>
99-
<xs:field xpath="@name"/>
100-
</xs:unique>
101-
<xs:unique name="uniqueAttributeName">
102-
<xs:annotation>
103-
<xs:documentation>
104-
Attribute name must be unique
105-
</xs:documentation>
106-
</xs:annotation>
107-
<xs:selector xpath="attribute"/>
98+
<xs:selector xpath="attribute|style"/>
10899
<xs:field xpath="@name"/>
109100
</xs:unique>
110101
</xs:element>

app/code/Magento/PageBuilder/etc/content_type_merged.xsd

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,13 @@
8989
<xs:complexType name="elements">
9090
<xs:sequence>
9191
<xs:element type="element" name="element" minOccurs="1" maxOccurs="unbounded">
92-
<xs:unique name="uniqueStyleName">
92+
<xs:unique name="uniqueName">
9393
<xs:annotation>
9494
<xs:documentation>
95-
Style name must be unique
95+
Attribute and Style names must be unique
9696
</xs:documentation>
9797
</xs:annotation>
98-
<xs:selector xpath="style"/>
99-
<xs:field xpath="@name"/>
100-
</xs:unique>
101-
<xs:unique name="uniqueAttributeName">
102-
<xs:annotation>
103-
<xs:documentation>
104-
Attribute name must be unique
105-
</xs:documentation>
106-
</xs:annotation>
107-
<xs:selector xpath="attribute"/>
98+
<xs:selector xpath="attribute|style"/>
10899
<xs:field xpath="@name"/>
109100
</xs:unique>
110101
</xs:element>

dev/tests/integration/testsuite/Magento/PageBuilder/_files/content_type/expected_merged_array.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,23 +342,23 @@
342342
'reader' => 'Magento_PageBuilder/js/property/attribute-reader'
343343
],
344344
3 => [
345-
'var' => 'original_complex',
345+
'var' => 'original_complex_attribute',
346346
'name' => null,
347347
'converter' => null,
348348
'preview_converter' => null,
349349
'persistence_mode' => 'readwrite',
350350
'reader' => 'Path/to/reader'
351351
],
352352
4 => [
353-
'var' => 'complex_style_attributes_change',
353+
'var' => 'complex_attribute_change',
354354
'name' => null,
355355
'converter' => 'Path/to/custom/converter',
356356
'preview_converter' => 'Path/to/preview/custom/converter',
357357
'persistence_mode' => 'write',
358358
'reader' => 'Path/to/custom/reader'
359359
],
360360
5 => [
361-
'var' => 'complex_style_attributes_add',
361+
'var' => 'complex_attribute_add',
362362
'name' => null,
363363
'converter' => 'Path/to/custom/converter',
364364
'preview_converter' => 'Path/to/preview/custom/converter',
@@ -374,7 +374,7 @@
374374
'reader' => 'Magento_PageBuilder/js/property/attribute-reader'
375375
],
376376
7 => [
377-
'var' => 'new_complex',
377+
'var' => 'new_complex_attribute',
378378
'name' => null,
379379
'converter' => null,
380380
'preview_converter' => null,

dev/tests/integration/testsuite/Magento/PageBuilder/_files/content_type/type2_content_type1.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
<attribute name="name" source="data-role"/>
3232
<attribute name="attribute_change" source="data-change" converter="Path/to/converter" preview_converter="Path/to/preview/converter" persistence_mode="read"/>
3333
<attribute name="attribute_add" source="attribute_add"/>
34-
<attribute name="original_complex" reader="Path/to/reader"/>
35-
<attribute name="complex_style_attributes_change" converter="Path/to/converter" preview_converter="Path/to/preview/converter" reader="Path/to/reader" persistence_mode="read"/>
36-
<attribute name="complex_style_attributes_add" reader="Path/to/reader"/>
34+
<attribute name="original_complex_attribute" reader="Path/to/reader"/>
35+
<attribute name="complex_attribute_change" converter="Path/to/converter" preview_converter="Path/to/preview/converter" reader="Path/to/reader" persistence_mode="read"/>
36+
<attribute name="complex_attribute_add" reader="Path/to/reader"/>
3737
<static_attribute source="original_static" value="original_value"/>
3838
<static_attribute source="static_attribute_change" value="value"/>
3939
<tag name="tag" converter="Path/to/converter"/>

dev/tests/integration/testsuite/Magento/PageBuilder/_files/content_type/type2_content_type2.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
<attribute name="attribute_change" source="data-custom" converter="Path/to/custom/converter" preview_converter="Path/to/preview/custom/converter" persistence_mode="write"/>
3535
<attribute name="attribute_add" source="attribute_add" converter="Path/to/custom/converter" preview_converter="Path/to/preview/custom/converter" persistence_mode="write"/>
3636
<attribute name="new_attribute" source="data-new" converter="Path/to/custom/converter" preview_converter="Path/to/preview/custom/converter" persistence_mode="write"/>
37-
<attribute name="complex_style_attributes_change" converter="Path/to/custom/converter" preview_converter="Path/to/preview/custom/converter" reader="Path/to/custom/reader" persistence_mode="write"/>
38-
<attribute name="complex_style_attributes_add" converter="Path/to/custom/converter" preview_converter="Path/to/preview/custom/converter" reader="Path/to/custom/reader" persistence_mode="write"/>
39-
<attribute name="new_complex" reader="Path/to/reader"/>
37+
<attribute name="complex_attribute_change" converter="Path/to/custom/converter" preview_converter="Path/to/preview/custom/converter" reader="Path/to/custom/reader" persistence_mode="write"/>
38+
<attribute name="complex_attribute_add" converter="Path/to/custom/converter" preview_converter="Path/to/preview/custom/converter" reader="Path/to/custom/reader" persistence_mode="write"/>
39+
<attribute name="new_complex_attribute" reader="Path/to/reader"/>
4040
<static_attribute source="static_attribute_change" value="custom_value"/>
4141
<static_attribute source="new_static" value="new-value"/>
4242
<tag name="tag" converter="Path/to/custom/converter"/>

0 commit comments

Comments
 (0)