Skip to content

Commit 428c61f

Browse files
committed
Merge branch '2.3-develop' into MAGETWO-86867-cleanup
# Conflicts: # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/_var.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/_preview.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/accordion/_default.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/anchor/_default.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/anchor/_import.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/block/_default.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/block/_import.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/children/_default.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/children/_import.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/column-group/_default.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/column/_default.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/html/_default.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/html/_import.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/map/_default.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/map/_import.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/slider/_default.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/tabs/_default.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/text/_default.less # app/code/Magento/PageBuilder/view/adminhtml/web/css/source/form/element/_margins-and-padding.less # app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/button-item/default/master.html # app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/button-item/default/preview.html # app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/map/default/preview.html # app/code/Magento/PageBuilder/view/adminhtml/web/template/form/element/map.html # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/anchor/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/anchor/_import.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/banner/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/block/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/block/_import.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/buttons/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/buttons/_import.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/children/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/children/_import.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/divider/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/divider/_import.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/heading/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/heading/_import.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/html/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/html/_import.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/map/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/map/_import.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/newsletter/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/newsletter/_import.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/product-list/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/product-list/_import.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/product/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/product/_import.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/row/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/row/_import.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/tab-item/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/tab-item/_import.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/tabs/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/text/_default.less # app/code/Magento/PageBuilder/view/frontend/web/css/source/content-type/text/_import.less
2 parents 1c37c2d + fc1f1b9 commit 428c61f

File tree

196 files changed

+10092
-2638
lines changed

Some content is hidden

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

196 files changed

+10092
-2638
lines changed

README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# magento2-page-builder
2+
3+
## PageBuilder Early Access Program
4+
5+
The PageBuilder Early Access Program (EAP) gives partners the following perks:
6+
7+
* Explore PageBuilder extension points to build custom modules and integrations for 3rd party services, such as Facebook, Instagram, etc.
8+
* Try out PageBuilder customization options and extend its functionality beyond its default features.
9+
* Preview PageBuilder to prepare a migration plan from BlueFoot 1.0 to PageBuilder.
10+
11+
**Note:**
12+
*This program should not be used to design and launch a production website using early code.*
13+
14+
## Installation
15+
16+
We offer two methods for installing PageBuilder:
17+
18+
* As a [Composer package] - use this option if you do not plan to contribute to the PageBuilder code repository
19+
* Using the [GitHub repository] - use this option to install PageBuilder from the GitHub repository and contribute to the code
20+
21+
[Composer package]: app/code/Magento/PageBuilder/docs/install.md#composer-installation
22+
[GitHub repository]: app/code/Magento/PageBuilder/docs/install.md#github-installation
23+
24+
## Developer documentation
25+
26+
This project repository contains PageBuilder developer documentation on the following topics:
27+
28+
1. [Architecture overview]
29+
1. [BlueFoot to PageBuilder data migration]
30+
1. [Third-party content type migration]
31+
1. [Iconography]
32+
1. [Module integration]
33+
1. [Additional data configuration]
34+
1. [Content type configuration]
35+
1. [How to add a new content type]
36+
1. [Events]
37+
1. [Master format]
38+
1. [Visual select]
39+
40+
[Architecture overview]: app/code/Magento/PageBuilder/docs/architecture-overview.md
41+
[BlueFoot to PageBuilder data migration]: app/code/Magento/PageBuilder/docs/bluefoot-data-migration.md
42+
[Third-party content type migration]: app/code/Magento/PageBuilder/docs/new-content-type-example.md
43+
[Iconography]: app/code/Magento/PageBuilder/docs/iconography.md
44+
[Module integration]: app/code/Magento/PageBuilder/docs/module-integration.md
45+
[Additional data configuration]: app/code/Magento/PageBuilder/docs/custom-configuration.md
46+
[Content type configuration]: app/code/Magento/PageBuilder/docs/content-type-configuration.md
47+
[How to add a new content type]: app/code/Magento/PageBuilder/docs/how-to-add-new-content-type.md
48+
[Events]: app/code/Magento/PageBuilder/docs/events.md
49+
[Master format]: app/code/Magento/PageBuilder/docs/master-format.md
50+
[Visual select]: app/code/Magento/PageBuilder/docs/visual-select.md
51+
52+
## Contribute to PageBuilder
53+
54+
We appreciate any and all contributions to PageBuilder.
55+
A good place to start is by looking at our [features roadmap] and list of [known issues].
56+
57+
If you are interested in contributing to this repository, please see our [Contribution Guide].
58+
59+
[Contribution Guide]: app/code/Magento/PageBuilder/docs/CONTRIBUTING.md
60+
[features roadmap]: app/code/Magento/PageBuilder/docs/roadmap.md#planned-features-and-functionality
61+
[known issues]: app/code/Magento/PageBuilder/docs/roadmap.md#known-issues
62+
63+
## PageBuilder updates from the Magento core team
64+
65+
The PageBuilder team updates the code every 2 weeks.
66+
**These changes may introduce breaking changes.**
67+
68+
To help you prepare for these changes, we are publishing a [roadmap] of features and issues that we are going to work on in the following months.
69+
70+
[roadmap]: app/code/Magento/PageBuilder/docs/roadmap.md
71+
72+
## Provide feedback
73+
74+
We want to hear what you think of PageBuilder!
75+
We are particularly interested on your thoughts on the following:
76+
77+
* [How would you customize PageBuilder and what do you need to accomplish this task?](https://github.com/magento/magento2-page-builder/issues/57)
78+
* [What web content API do you use or would like to see in PageBuilder?](https://github.com/magento/magento2-page-builder/issues/58)
79+
80+
To participate in technical discussions and ask questions, join us in [Slack].
81+
82+
For all other questions or requests, contact [Olena Tkacheva].
83+
84+
[Slack]: https://magentocommeng.slack.com/
85+
[Olena Tkacheva]: https://magentocommeng.slack.com/messages/@UAFV915FB
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace Magento\PageBuilder\Model\Config\Source;
10+
11+
/**
12+
* Options provider for countries list
13+
*
14+
* @api
15+
*/
16+
class Country implements \Magento\Framework\Option\ArrayInterface
17+
{
18+
/**
19+
* @var \Magento\Directory\Model\ResourceModel\Country\Collection
20+
*/
21+
private $countryCollection;
22+
23+
/**
24+
* @var array
25+
*/
26+
private $options;
27+
28+
/**
29+
* @param \Magento\Directory\Model\ResourceModel\Country\Collection $countryCollection
30+
*/
31+
public function __construct(\Magento\Directory\Model\ResourceModel\Country\Collection $countryCollection)
32+
{
33+
$this->countryCollection = $countryCollection;
34+
}
35+
36+
/**
37+
* Return options array
38+
*
39+
* @return array
40+
*/
41+
public function toOptionArray(): array
42+
{
43+
if (!$this->options) {
44+
$this->options = $this->countryCollection->loadData()->toOptionArray(false);
45+
foreach ($this->options as $optionIndex => $optionData) {
46+
$this->options[$optionIndex]['value'] = $optionData['label'];
47+
}
48+
}
49+
50+
return $this->options;
51+
}
52+
}

app/code/Magento/PageBuilder/Setup/DataConverter/Renderer/AdvancedSliderItem.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,15 @@ public function render(array $itemData, array $additionalData = [])
7575
$overlayDivElementAttributes['class'] = 'pagebuilder-overlay pagebuilder-poster-overlay';
7676
$style = $this->styleExtractor->extractStyle($formData, ['padding']);
7777

78+
$overlayColor = 'transparent';
7879
if (isset($eavData['has_overlay']) && $eavData['has_overlay'] == 1) {
79-
$overlayDivElementAttributes['data-overlay-color'] = 'rgba(0,0,0,0.5)'; // default overlay style
80+
$overlayColor = 'rgba(0,0,0,0.5)';
8081
if ($style) {
8182
$style .= ' ';
8283
}
8384
$style .= 'background-color: rgba(0,0,0,0.5);';
8485
}
86+
$overlayDivElementAttributes['data-overlay-color'] = $overlayColor;
8587
if ($style) {
8688
$overlayDivElementAttributes['style'] = $style;
8789
}

app/code/Magento/PageBuilder/Setup/DataConverter/Renderer/Map.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,21 @@ public function render(array $itemData, array $additionalData = [])
4646
'data-role' => 'map',
4747
'data-appearance' => 'default',
4848
'class' => $eavData['css_classes'] ?? '',
49-
'data-markers' => '[]',
49+
'data-show-controls' => 'true',
50+
'data-position' => '{}',
5051
];
5152

5253
if (isset($eavData['map'])) {
5354
$map = explode(',', $eavData['map']);
54-
$rootElementAttributes['data-markers'] = '[{&quot;lat&quot;:'
55+
$rootElementAttributes['data-position'] = '{&quot;lat&quot;:'
5556
. $map[0]
5657
. ',&quot;lng&quot;:'
5758
. $map[1]
58-
. '}]';
59-
$rootElementAttributes['data-zoom'] = $map[2];
59+
. '}';
6060
}
6161

6262
if (isset($itemData['formData'])) {
6363
$formData = $itemData['formData'];
64-
$formData['width'] = $eavData['map_width'] ?? '100%';
6564
$formData['height'] = $eavData['map_height'] ?? '300px';
6665

6766
$style = $this->styleExtractor->extractStyle($formData);

app/code/Magento/PageBuilder/Setup/DataConverter/Renderer/SliderItem.php

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

app/code/Magento/PageBuilder/Setup/Patch/Data/MigrateToPageBuilder.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ class MigrateToPageBuilder implements DataPatchInterface
2424
*/
2525
private $moduleDataSetup;
2626

27+
/**
28+
* @var \Magento\Framework\App\State
29+
*/
30+
private $appState;
31+
2732
/**
2833
* @var MoveImages $moveImages
2934
*/
@@ -34,15 +39,18 @@ class MigrateToPageBuilder implements DataPatchInterface
3439
*
3540
* @param \Magento\PageBuilder\Setup\ConvertBlueFootToPageBuilderFactory $convertBlueFootToPageBuilderFactory
3641
* @param ModuleDataSetupInterface $moduleDataSetup
42+
* @param \Magento\Framework\App\State $appState
3743
* @param MoveImages $moveImages
3844
*/
3945
public function __construct(
4046
\Magento\PageBuilder\Setup\ConvertBlueFootToPageBuilderFactory $convertBlueFootToPageBuilderFactory,
4147
ModuleDataSetupInterface $moduleDataSetup,
48+
\Magento\Framework\App\State $appState,
4249
MoveImages $moveImages
4350
) {
4451
$this->convertBlueFootToPageBuilderFactory = $convertBlueFootToPageBuilderFactory;
4552
$this->moduleDataSetup = $moduleDataSetup;
53+
$this->appState = $appState;
4654
$this->moveImages = $moveImages;
4755
}
4856

@@ -55,6 +63,13 @@ public function apply()
5563
{
5664
if ($this->moduleDataSetup->tableExists('gene_bluefoot_entity')) {
5765
$this->updateEavConfiguration();
66+
$convertBlueFootToPageBuilder = $this->convertBlueFootToPageBuilderFactory->create(
67+
['setup' => $this->moduleDataSetup]
68+
);
69+
$this->appState->emulateAreaCode(
70+
\Magento\Framework\App\Area::AREA_ADMINHTML,
71+
[$convertBlueFootToPageBuilder, 'convert']
72+
);
5873
$this->convertBlueFootToPageBuilderFactory->create(['setup' => $this->moduleDataSetup])->convert();
5974
$this->moveImages->move();
6075
}

app/code/Magento/PageBuilder/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"magento/module-search": "*",
1414
"magento/module-newsletter": "*",
1515
"magento/module-wishlist": "*",
16+
"magento/module-directory": "*",
1617
"php": "~7.1.3||~7.2.0"
1718
},
1819
"type": "magento2-module",

0 commit comments

Comments
 (0)