Jan Lysý
ecbd2f150d
Migrate email editor Contaienr to WP Coding Standard
...
[MAILPOET-6240]
2024-11-08 14:06:45 +01:00
Jan Lysý
554adccce3
Change coding style in email editor package to WordPress
...
This commit contains automated changes made with phpcbf command from CodeSniffer package.
[MAILPOET-6240]
2024-11-08 14:06:45 +01:00
Jan Lysý
b6103b4581
Rename files in email editor package by WP Coding Standard
...
[MAILPOET-6240]
2024-11-08 14:06:45 +01:00
Oluwaseun Olorunsola
4f3209b670
Remove unnecessary renderer block
...
We don't need a special renderer for the spacer block as the fallback renderer can handle its functionality
MAILPOET-6237
2024-11-05 19:35:34 +01:00
Oluwaseun Olorunsola
ad58f6213e
Add Spacer block support
...
MAILPOET-6237
2024-11-05 19:35:34 +01:00
Oluwaseun Olorunsola
7b750ece51
Update readme documentations
...
MAILPOET-6255
2024-11-05 09:09:44 +01:00
Rostislav Wolny
e77f075d75
Fix border-radius support in the group block.
...
[MAILPOET-6280]
2024-11-04 11:30:35 +01:00
Rostislav Wolny
2d0621d386
Render caption html conditionally
...
In case the image has no caption we don't need to render the markup wrapping the caption.
[MAILPOET-6280]
2024-11-04 11:30:35 +01:00
Rostislav Wolny
9829c96caa
Add border support to the image renderer
...
This commit fixes how the border is applied in an image block.
- the border is applied to the wrapping table cell instead of the image
- we need to move classes related to border styles to the cell so that related styles are inlined in the proper place
- the caption is put in an additional table so that it doesn't extend the border when it is longer than the image
- rounded image styles are now applied to the wrapper and the image
[MAILPOET-6280]
2024-11-04 11:30:35 +01:00
Rostislav Wolny
10ad46239d
Fix border rendering on mobiles for columns
...
[MAILPOET-6280]
2024-11-04 11:30:35 +01:00
Rostislav Wolny
5044f8f276
Add border support for paragraph and heading blocks
...
[MAILPOET-6280]
2024-11-04 11:30:35 +01:00
Rostislav Wolny
b83ecbbe70
Disable margin globally
...
We don't support margin in the renderer.
[MAILPOET-6280]
2024-11-04 11:30:35 +01:00
Rostislav Wolny
3f6ca7517a
Fix unit tests and potential ensure email_attrs being set
...
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
c2ef0ac2ea
Remove EMAIL_WIDTH constant from SettingsController
...
Email width is set in theme JSON so this was a duplicity.
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
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