Jan Lysý
2ca611bacb
Reset default margin and set default padding-left
...
Because we want to have the best user experience for most of email client,
we reset the margin and set padding-left for the same look.
[MAILPOET-5645]
2023-11-11 09:38:35 +04:00
Jan Lysý
1b73e0f4db
Allow core/list, core/list-item blocks in email editor
...
[MAILPOET-5645]
2023-11-11 09:38:35 +04:00
Rostislav Wolny
219a12578a
Simplify API for registering email block renderers
...
This commit makes the cleanup of filters for block rendering in emails automatic.
[MAILPOET-5645]
2023-11-10 08:44:08 +01:00
Rostislav Wolny
4705079877
Add a simple guide for adding a new block
...
[MAILPOET-5645]
2023-11-10 08:44:08 +01:00
Jan Lysý
5644cab9e3
Refactor BlocksRegistry to pass dependencies as an argument
...
For better extensibility of 3rd party developers, I refactored to pass Settings Controller as an argument.
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
6e1a08d60b
Fix typo in a method name
...
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
a0b57b3f3f
Unify columns height
...
Because we prefer the identical height of core/column with different content lengths,
I used a wrapper layer that helps to solve it.
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
5800830d71
Improve columns width calculation
...
Because there exist more variants when the column width is not defined, we needed to improve this behavior.
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
2ce6fd8688
Remove BlocksRenderer and fix tests
...
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
c2cb18ef37
Use render_block_* hooks for rendering changed blocks
...
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
4f9e3723c9
Implement rendering column, columns and paragraph
...
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
0ac72d43e6
Merge StylesController to SettingsController
...
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
1626cf2ad9
Add TypographyPreprocessor
...
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
5946884cb2
Refactor email content styles from string to array
...
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
1250d81670
Refactor BlocksWidth preprocessor to set string including units
...
I added pixels to calculated width for easier work with it in block rendering.
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
2b69acf0d5
Add preprocessor for calculating block width
...
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
62ea18f8be
Fix email template header
...
Missing head tag caused an incorrect rendering in Gmail apps on mobiles.
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
fe5eabfe49
Add Preprocessor for removing unwanted blocks
...
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
c1768fd0b2
Refactor Preprocessor to more classes
...
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Jan Lysý
125b0dfe82
Add email layout padding
...
[MAILPOET-5591]
2023-11-09 09:06:33 +01:00
Rostislav Wolny
9f0e015f44
Load core editor setting as the base settings for the email editor
...
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
399ed61503
Introduce SettingsController for managing editor settings
...
[MAILPOET-5637]
2023-10-17 16:06:06 +02:00
Rostislav Wolny
e9a5658be5
Cleanup post editor approach code
...
[MAILPOET-5637]
2023-10-17 16:06:06 +02:00
Rostislav Wolny
ca40766c2f
Allow null for WP_Block_Editor_Context in email editor callbacks
...
There are cases when the second parameter is null.
[MAILPOET-5624]
2023-10-09 11:33:11 +02:00
Rostislav Wolny
398a313d54
Pass styles controller into block renders
...
When rendering blocks, we need to access global styles settings.
This will be done via the StylesController
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
46d8cb38a0
Apply layout styles defined in StylesController and also to editor
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
fd96b4afad
Add email background and width into StylesController and apply in redering
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
77eab47357
Refactor email styles from constant to service and move to core
...
I envision the StylesController as the source of information about
styles settings in both the editor and renderer.
We will add email styles settings and these will be accessed in PHP via this service.
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
3835a91163
Fix columns rendering after testing in Litmus
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
7233a9cb2b
Remove unnecessary service in email renderer
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
6fe71e2298
Update mail template layout to match MJML and add default content
...
padding
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
d594bb4739
Add simple columns rendering
...
Add rendering of columns with fixed width computed by number of columns.
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
968ff6754e
Add blocks preprocessor
...
Currently, we need to wrap top-level non-column blocks into a single
column. This is done in the preprocessor.
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
69a87e8146
Apply editor content styles in the email renderer
...
Add proof of concept for applying additional CSS in renderer
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
3c7a9f0a48
Strip theme CSS from the editor and add custom basic styles
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
36e83f81ec
Temporarily hardcode background color for body and content
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
bd539e386b
Add initialization for core blocks renderers
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
a1869249e0
Add code handling block rendering
...
The idea is that anyone can register specialized renderers for
blocks.
The render will skip unknown blocks.
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
46a481ec24
Add email renderer and template to the renderer engine
...
In this commit, I copied the code for processing the rendering of emails
from the current renderer.
This will allow us to use different base templates and styles.
Ideally, we should be able to add hooks and reuse the renderer from the engine namespace in
the current renderer.
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
b70ad064c7
Refactor initialization of the email editor
...
This changes how the editor is initialized. The integration initialization class
doesn't get the engine class anymore, but integration is initialized via
mailpoet_email_editor_initialized action triggered from the engine.
This allows multiple integrations to hook into the engine.
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
dcdd1c8cdb
Fix checking hooks registered using a class name in assets cleaner
...
The code was not expecting that the filter callback could be defined with a class name as a string.
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
19d1bb4146
Add description to EmailEditor::registerEmailPostTypes
...
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
68e833f80c
Refactor email editor PHP and JS code to follow automations namespacing
...
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00