Rostislav Wolny
85da4d0659
Adjust renderer tests to cover styles added to wrapper
...
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
e3d5b7a7e0
Disable block gap rendering between root-level blocks.
...
Top level blocks are post content and header and footer wrapping blocks.
Disabling the gap between these blocks prevents rendering a gap between
post-content blocks and header and footer.
[MAILPOET-6088]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
4a04744d1c
Use default layout in general template
...
The default layout disables align-full, which is now not supported.
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
77455c6e42
Use different patterns for the general email template and the rest
...
The general email template is a blank template without a header and footer.
This commit reintroduces the content pattern with a header and footer content
and uses it as the default for the general template.
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
355c144dc9
Simplify the DefaultContent pattern
...
This removes the header and footer from the content pattern.
The header and footer should be part of the template
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
f842ed4b33
Remove old demo templates
...
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
2a251e70f7
Add a new template with more meaningful content
...
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
324fedecbf
Get rid of duplicate CSS for template preview
...
We can reuse the same CSS we pass to editor
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
b6d75410cf
Render proper content width in template previews
...
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
801f586b00
Prevent block gap for list item
...
The list item gets spacing via the fallback renderer.
To prevent this, I created a renderer that skips spacing.
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
af0b4f37bc
Add class for detection of text blocks
...
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
95f7049bd9
Introduce file for sharing CSS for content between editor and renderer
...
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
b87eb3edd3
Remove unused CSS for alingfull for post content
...
The align full is currently disabled and the CSS was working only for the hardcoded value.
Probably a leftover from some testing
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
000bbd993b
Move styles for content in email editor to one place
...
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
1c2078d698
Remove unnecessary CSS code for global padding
...
The top and bottom padding seems to be generated properly on the client side.
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
7b6bf1f4b4
Remove srcset from images
...
The srcset breaks the rendering of images in some clients (observed on iOS and MacOS clients in Email on Acid tester).
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
7bef08f7e1
Fix email width in desktop Outlook
...
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
254e598627
Fix columns rendering for Gmail and desktop Outlook
...
The issue was that the code for block spacing was wrapping the column into an additional div and conditional table.
We don't need spacing for columns as they are rendered side by side, and the spacing is applied to the wrapping columns block.
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
0c87131812
Fix that horizontally aligned image breaks mobile rendering
...
We set the width to wrappers of horizontally aligned images to have correctly positioned captions.
We need to resize these wrappers on mobile otherwise, they keep the width and make the email wider than the screen.
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
5c1796eb2a
Apply global padding on wrapper in renderer
...
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
d949f2ce1b
Fix block spacing for group blocks
...
This is the same fix that we applied for the column block
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
e9d6658b20
Add configuration for alignment options for blocks.
...
This configuration allow none, left, center and right alignment options
for blocks in containers with default layout.
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
224eb51b25
Unify padding rendering between editor and renderer
...
This commit removes "padding bubbling" to children.
The bubling was added because of full width alignment.
The full aligment is currently not supported and this bubbling was causing issues with rendering multiple paddings.
The main padding is applied around the content.
[MAILPOET-6249]
# Conflicts:
# mailpoet/assets/js/src/email-editor/engine/components/block-editor/visual-editor/visual-editor.tsx
# packages/php/email-editor/src/Engine/SettingsController.php
2024-10-25 17:47:58 +02:00
Rostislav Wolny
60525198c5
Always replace vars when getting email styles
...
We use the styles in preprocessors, so we always need to access
values (e.g. spacing) instead of variables.
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
a40eb3e554
Respect layout content size set in theme.json in the renderer
...
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
06067b36f6
Introduce ThemeController::getLayoutSettings()
...
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
cec9175c5d
Make sure all compressed vars are decompressed when getting theme styles
...
The previous implementation was keeping compressed vars (e.g. var:preset|spacing|10)
in styles settings and value replacing was able to process only
those prefixed var|preset|color.
This refactor adds extraction of all compressed values to valid css variables,
which can be replaced immediately or later by variables postprocessor.
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
84dab903d7
Fix layout block-gap settings to be applied to all blocks
...
Prior this change it was not applied to blocks that have no
renderer registered.
The block gap rendering is added applied in AbstractBlockRenderer
so adding a Fallback renderer that extends the AbstractBlockRenderer
for all blocks that don't have specific renderer solves the issue.
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
45eeadf000
Use fixed layout width in editor
...
The settings in theme prevent users from changing layout and it's width in UI.
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
6af7711e3a
Update schema version in the core integration
...
[MAILPOET-6105]
2024-09-24 12:07:24 +02:00
Rostislav Wolny
3b81924625
Reintroduce support for default font sizes
...
[MAILPOET-6015]
2024-09-24 12:07:24 +02:00
Jan Lysý
a4e063f8fc
Improve annotation in EmailEditor\Container
...
[MAILPOET-6216]
2024-09-23 15:16:59 +02:00
Jan Lysý
7a793f11f1
Remove redundant methods from email editor IntegrationTester
...
[MAILPOET-6216]
2024-09-23 15:16:59 +02:00
Jan Lysý
8dc9c28fdf
Fix namespace in integration tests
...
This commit also removed the redundant directory EmailEditor from integration tests directory.
[MAILPOET-6216]
2024-09-23 15:16:59 +02:00
Jan Lysý
99a6541ffb
Fix namespace in unit tests
...
[MAILPOET-6216]
2024-09-23 15:16:59 +02:00
Jan Lysý
246a10f058
Copy Validator to email-editor package
...
Because the email-editor package should be independent. We copy Validator to the package, at least for now.
[MAILPOET-6216]
2024-09-23 15:16:59 +02:00
Jan Lysý
b2e8a9c82b
Remove usage of constant from NewsletterEntity
...
[MAILPOET-6216]
2024-09-23 15:16:59 +02:00
Jan Lysý
45a8233a1e
Copy CdnAssetUrl to email-editor package
...
For independence of the email-editor package, I copied the class to the package.
[MAILPOET-6216]
2024-09-23 15:16:59 +02:00
Jan Lysý
4424a33624
Add Container class
...
This class is used as DI Container for easier injecting classes in integration tests.
It can be also reused during a standalone usage.
[MAILPOET-6216]
2024-09-23 15:16:59 +02:00
Jan Lysý
1af3c09422
Bootstrap email-editor integration tests
...
I tried to minimize the code repetition.
[MAILPOET-6216]
2024-09-23 15:16:59 +02:00
Jan Lysý
d38e6bb1b9
Bootstrap email-editor unit tests
...
I also replaced using verify function by asserts, which will be removed in the higher version of phpunit.
[MAILPOET-6216]
2024-09-23 15:16:59 +02:00
Jan Lysý
98712db36d
Add composer files for email-editor package
...
[MAILPOET-6216]
2024-09-23 15:16:59 +02:00
Jan Lysý
d0c1ad4aba
Move email editor integration tests
...
[MAILPOET-6216]
2024-09-23 15:16:59 +02:00
Jan Lysý
0860f7c45f
Move email editor unit tests
...
[MAILPOET-6216]
2024-09-23 15:16:59 +02:00
Jan Lysý
ea71b6c967
Move EmailEditor PHP files into a packages directory
...
[MAILPOET-6216]
2024-09-23 15:16:59 +02:00