Closed tkacheva closed 4 years ago
Hi @tkacheva. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.
Please, add a comment to assign the issue: @magento I am working on this
Sub-tasks:
To @bluemwhitew, @omiroshnichenko, @lbvaimo: Can one of you add 2 or 3 use cases for how this changes what developers can do with CSS vs what they had to do before. From that, I can develop all the specific docs for Page Builder. And document the more general specificity rules and what has changed with this story. Thanks!
@bdenham We have 3 levels of styling. They are applying in the order:
.less
stylesBefore this story, we had the next specificity level:
After this story, we will have the next specificity level:
More explanations about CSS specificity https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
Batch conversion test results per 0c3aa56c4015dec9741d4fe53245727bec79c542 and implementing the patch included above:
Real (Seconds) | User (Seconds) | Sys (Seconds) | Profile | page_builder_templates | cms_pages | cms_blocks | dynamic_blocks
-- | -- | -- | -- | -- | -- | -- | --
32.157 | 23.551 | 2.208 | Small | 10 | 40 | 20 | 20
26.7 | 19.422 | 1.95 | Small | 10 | 40 | 20 | 20
34.23 | 26.133 | 2.479 | Small | 10 | 40 | 20 | 20
26.939 | 19.076 | 1.892 | Small | 20 | 80 | 40 | 40
28.592 | 21.736 | 2.005 | Small | 20 | 80 | 40 | 40
27.195 | 19.154 | 1.846 | Small | 20 | 80 | 40 | 40
27.402 | 19.422 | 2.02 | Small | 40 | 160 | 80 | 80
27.63 | 19.577 | 1.969 | Small | 40 | 160 | 80 | 80
24.716 | 18.617 | 1.546 | Small | 40 | 160 | 80 | 80
29.989 | 20.295 | 2.105 | Small | 80 | 320 | 160 | 160
27.952 | 19.605 | 2.003 | Small | 80 | 320 | 160 | 160
30.742 | 21.371 | 2.166 | Small | 80 | 320 | 160 | 160
35.218 | 19.893 | 2.314 | Small | 400 | 1600 | 800 | 800
38.077 | 21.094 | 2.391 | Small | 400 | 1600 | 800 | 800
29.263 | 18.732 | 1.68 | Small | 400 | 1600 | 800 | 800
36.885 | 19.874 | 2.067 | Small | 800 | 3200 | 1600 | 1600
40.181 | 19.777 | 2.403 | Small | 800 | 3200 | 1600 | 1600
40.193 | 20.687 | 2.45 | Small | 800 | 3200 | 1600 | 1600
48.571 | 20.585 | 2.25 | Medium | 10 | 40 | 20 | 20
46.627 | 20.205 | 1.961 | Medium | 10 | 40 | 20 | 20
45.311 | 20.172 | 1.945 | Medium | 10 | 40 | 20 | 20
47.764 | 19.9 | 1.911 | Medium | 20 | 80 | 40 | 40
57.912 | 22.444 | 2.965 | Medium | 20 | 80 | 40 | 40
55.087 | 22.886 | 2.712 | Medium | 20 | 80 | 40 | 40
62.22 | 21.649 | 2.719 | Medium | 40 | 160 | 80 | 80
54.25 | 23.507 | 2.873 | Medium | 40 | 160 | 80 | 80
53.927 | 21.675 | 2.434 | Medium | 40 | 160 | 80 | 80
63.329 | 23.72 | 2.886 | Medium | 80 | 320 | 160 | 160
56.759 | 20.729 | 2.642 | Medium | 80 | 320 | 160 | 160
47.709 | 20.467 | 2.055 | Medium | 80 | 320 | 160 | 160
56.801 | 21.372 | 2.171 | Medium | 400 | 1600 | 800 | 800
54.378 | 22.532 | 2.452 | Medium | 400 | 1600 | 800 | 800
54.944 | 20.859 | 2.651 | Medium | 400 | 1600 | 800 | 800
54.193 | 20.162 | 2.062 | Medium | 800 | 3200 | 1600 | 1600
72.746 | 24.815 | 3.046 | Medium | 800 | 3200 | 1600 | 1600
73.793 | 25.788 | 3.287 | Medium | 800 | 3200 | 1600 | 1600
135.859 | 25.754 | 5.211 | Large | 10 | 40 | 20 | 20
128.923 | 24.232 | 4.701 | Large | 10 | 40 | 20 | 20
116.248 | 24.504 | 4.58 | Large | 10 | 40 | 20 | 20
125.958 | 24.007 | 4.635 | Large | 20 | 80 | 40 | 40
114.061 | 24.626 | 4.767 | Large | 20 | 80 | 40 | 40
120.952 | 24.327 | 4.566 | Large | 20 | 80 | 40 | 40
117.224 | 23.832 | 4.568 | Large | 40 | 160 | 80 | 80
114.009 | 23.979 | 4.66 | Large | 40 | 160 | 80 | 80
116.945 | 23.463 | 4.495 | Large | 40 | 160 | 80 | 80
112.454 | 24.512 | 4.753 | Large | 80 | 320 | 160 | 160
119.145 | 23.991 | 4.847 | Large | 80 | 320 | 160 | 160
116.214 | 24.406 | 4.686 | Large | 80 | 320 | 160 | 160
149.195 | 38.856 | 6.582 | Large | 400 | 1600 | 800 | 800
123.006 | 25.647 | 4.783 | Large | 400 | 1600 | 800 | 800
131.025 | 26.974 | 4.818 | Large | 400 | 1600 | 800 | 800
173.643 | 32.308 | 5.589 | Large | 800 | 3200 | 1600 | 1600
118.768 | 23.996 | 4.583 | Large | 800 | 3200 | 1600 | 1600
146.792 | 25.899 | 5.258 | Large | 800 | 3200 | 1600 | 1600
164.808 | 28.389 | 7.417 | Extra Large | 10 | 40 | 20 | 20
162.64 | 28.661 | 7.799 | Extra Large | 10 | 40 | 20 | 20
175.533 | 39.321 | 9.509 | Extra Large | 10 | 40 | 20 | 20
171.979 | 27.547 | 6.781 | Extra Large | 20 | 80 | 40 | 40
171.98 | 27.507 | 7.049 | Extra Large | 20 | 80 | 40 | 40
172.59 | 27.569 | 6.938 | Extra Large | 20 | 80 | 40 | 40
217.556 | 29.771 | 7.069 | Extra Large | 40 | 160 | 80 | 80
239.41 | 29.476 | 7.801 | Extra Large | 40 | 160 | 80 | 80
220.093 | 29.183 | 7.419 | Extra Large | 40 | 160 | 80 | 80
172.383 | 27.534 | 6.799 | Extra Large | 80 | 320 | 160 | 160
173.321 | 27.537 | 6.968 | Extra Large | 80 | 320 | 160 | 160
173.33 | 27.469 | 7.044 | Extra Large | 80 | 320 | 160 | 160
220.286 | 36.888 | 8.67 | Extra Large | 400 | 1600 | 800 | 800
175.64 | 27.516 | 7.101 | Extra Large | 400 | 1600 | 800 | 800
201.97 | 28.532 | 7.376 | Extra Large | 400 | 1600 | 800 | 800
190.75 | 28.385 | 7.011 | Extra Large | 800 | 3200 | 1600 | 1600
183.461 | 28.572 | 7.194 | Extra Large | 800 | 3200 | 1600 | 1600
226.562 | 34.163 | 8.728 | Extra Large | 800 | 3200 | 1600 | 1600
Tested using the following:
cd ~/www/magento/magento2-page-builder
git checkout develop
sh ~/scripts/install.sh pb-b2b # Install Script
cd ~/www/magento/magento2ce
bin/magento setup:upgrade
composer require phpgt/dom:dev-master
cd ~/www/magento/magento2-page-builder
git checkout 558_1_content-type-style-attribute-removal
cd ~/www/magento/magento2ce
time bin/magento setup:upgrade --keep-generated # Conversion Test Results
558.xlsx XLS included (see attached).
/cc @omiroshnichenko
Update working as expected.
No visual differences, and no inline styles after conversion to csso-alternative
branch.
Page: https://588-manual-tests-dg3iscy-vzsrtettsztvg.us-4.magentosite.cloud/issue-558
Ghost Inspector: https://ghostinspector-prod.s3.amazonaws.com/screenshots/bdf4afb7-bf2b-40f7-81d3-2c74cfa143a3-compareOriginal.png
Page: https://588-manual-tests-dg3iscy-vzsrtettsztvg.us-4.magentosite.cloud/css-specificity
Page: https://588-manual-tests-dg3iscy-vzsrtettsztvg.us-4.magentosite.cloud/css-responsive-styling
[x] Custom Content Types
Content Type | Label | Value |
---|---|---|
Heading | Heading Type | H2 |
Heading Text | Custom Content Types | |
Alignment | Left | |
Border | None | |
Border Color | Default | |
Border Width | Default | |
Border Radius | Default | |
CSS Classes | Default | |
Margins and Padding | Default | |
Quote | Quote | Use the Force, Harry |
Quote Color | Blue | |
Author | Gandalf | |
WYSIWYG | Default | |
Background Image | Select from Gallery | |
Background Mobile Image | Select from Gallery | |
Background Size | Contain | |
Background Position | Center | |
Background Attachment | Default | |
Background Repeat | Default | |
Alignment | Center | |
Border | Default | |
Border Color | Default | |
Border Width | Default | |
Border Radius | Default | |
CSS Classes | Default | |
Margins and Padding | Default |
[x] Inline Styles in PWA Studio (Requires PWA Studio)
Content Type | Label | Value |
---|---|---|
Heading | Heading Type | H2 |
Heading Text | Inline Styles in PWA Studio | |
Alignment | Center | |
Border | Solid | |
Border Color | 00aaff |
|
Border Width | 1 | |
Border Radius | Default | |
CSS Classes | Default | |
Margins and Padding | 20 20 20 20 10 10 10 10 |
Before:
After:
Story
As a developer I want to easily create themes and customizations to existing Page Builder content types to enable me align their visual output with my desired theme
Business Value
ability to style content with CSS classes not using !important
Acceptance Criteria
Technical Vision
Test Plan
Manual Testing Scenarios
develop
branch of Page Buildercsso-alternative
branch of Page Builderbin/magento setup:upgrade
and re-deployUpdate working as expected. No visual differences, and no inline styles after conversion to
csso-alternative
branch.Page: https://588-manual-tests-dg3iscy-vzsrtettsztvg.us-4.magentosite.cloud/issue-558
Ghost Inspector: https://ghostinspector-prod.s3.amazonaws.com/screenshots/bdf4afb7-bf2b-40f7-81d3-2c74cfa143a3-compareOriginal.png
[x] CSS Specificity
Click Save
Browse to your newly created CMS Page
Confirm Heading ("CSS Specificity") is aligned to the left
Edit the Page created in Step 1.
Click Edit with Page Builder
Replace HTML Code contents with:
Click Save
Browse to your newly created CMS Page again
Confirm Heading ("CSS Specificity") is aligned to the center
Page: https://588-manual-tests-dg3iscy-vzsrtettsztvg.us-4.magentosite.cloud/css-specificity
[x] CSS Responsive Styling
#00aaff
#ffaa00
[x] Custom Content Types
Click Save
Browse to your newly created CMS Page
Confirm Quote appears centred, converted styles (to internal CSS)
Create a new Page (Content » Pages » Add New Page)
Click Edit with Page Builder
Add Heading and HTML Code content types, and configure with the following:
00aaff
Click Save
Browse to your newly created CMS Page within PWA Studio
Confirm Heading appears centred, and contains inline styles (not internal CSS)
Copy database field from Migration of Existing Page Builder Content Manual Test and verify each content type in Venia
Before:
After:
Automated MFTF Tests
N/A
Note: This list doesn't include modifications to existing Data, Action Groups, or Sections.
Manual Hip Tests
N/A