Commit Graph

22779 Commits

Author SHA1 Message Date
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
df350427ed Fix UI issues in the editor in WP6.7
[MAILPOET-6280]
2024-11-04 11:30:35 +01:00
Oluwaseun Olorunsola
483639713f Minor performance improvements: cache and reduce WP translate function call
MAILPOET-6298
2024-10-31 15:54:28 +02:00
Oluwaseun Olorunsola
86fb7f2cdb Fix failing test
MAILPOET-6298
2024-10-31 15:54:28 +02:00
Oluwaseun Olorunsola
6ea5074649 Move WP translation function from __construct
According to this post https://make.wordpress.org/core/2024/10/21/i18n-improvements-6-7/, we are currently doing_it_wrong

MAILPOET-6298
2024-10-31 15:54:28 +02:00
Oluwaseun Olorunsola
1f21add146 Add skip-plugins support for acceptance tests
MAILPOET-6298
2024-10-31 15:54:28 +02:00
Oluwaseun Olorunsola
d13c2a82e2 Ensure translation is not loaded when fetching woocommerce version
MAILPOET-6298
2024-10-31 15:54:28 +02:00
alex-mpoet
7259d8cda2 Release 5.3.5 2024-10-30 19:22:45 +03:00
David Remer
c80416a802 Use post_date_gmt instead of post_date
This commit ensures we are querying posts after a UTC date.

[MAILPOET-6234]
2024-10-30 18:03:04 +03:00
David Remer
d00ba69fb3 Test that the correct post is fetched
This test ensures we are comparing the right dates against each other when fetching posts.
We used to compare a UTC time against post_date, which represents the publication date of
the post in the local timezone.

[MAILPOET-6234]
2024-10-30 18:03:04 +03:00
 Ján Mikláš
fbd9d9ba83 Release 5.3.4 2024-10-29 15:28:02 +02:00
Oluwaseun Olorunsola
8dcb2ef3d2 Add bool type cast to the return value
MAILPOET-6299
2024-10-29 01:45:49 +03:00
Pavel Dohnal
a511307305 Make sure the running tasks are paused
[MAILPOET-6259]
2024-10-28 11:09:57 +01:00
Pavel Dohnal
55f21e8cd7 Fix inactive notifications clog sending queue
[MAILPOET-6259]
2024-10-28 11:09:57 +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
8c1c6f1136 Update email content validation to look also in template code
The unsubscribe link might be present in template so we need to
look in both email and template.
[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
cf47919d53 Fix mobile preview styles in the editor
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
efa290c41c Add comment to CSS for border-box for columns
[MAILPOET-6249]
2024-10-25 17:47:58 +02:00
Rostislav Wolny
b0507bca9e Fix alignment and block gap settings for columns and groups
In this commit, I disabled the layout for both groups and columns.
This allows using our custom css for alignment of images (left, right and center).
The CSS for constrained layout uses floats and it breaks spacing in the editor.
[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
3ef305facd Simplify the VisualEditor component
We don't support post-only mode for emails, so I was able to remove
more core related to that mode.
The post-only mode is used in the template-mode, but it is a designPostType
so the code was not used anyway.
[MAILPOET-6249]
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
fca191c6f4 Remove layout settings from the editor state
The layout is set in theme JSON and passed via editor settings
[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