Commit Graph

23 Commits

Author SHA1 Message Date
Jan Lysý
db8dac03d2 Prepare styles in store for sidebar
[MAILPOET-5638]
2024-03-01 16:36:52 +01:00
Rostislav Wolny
b724ef4ac2 Extract Theme related methods from SettingsController as ThemeController
I want to avoid the SettingsController becoming some kind of a god class
so in this step, I extracted themejson-related stuff to an extra class.

In the future, we should also move methods for manipulating CSS to a helper.
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Jan Lysý
1338554c41 Change property name to better fit to new classname
[MAILPOET-5809]
2024-02-19 11:18:58 +01:00
Jan Lysý
dc96fa2b1c Add postprocessor for replacing mark tag to span
[MAILPOET-5809]
2024-02-19 11:18:58 +01:00
Jan Lysý
9b54217049 Rename PreprocessManager class to ProcessManager
As we want to add rendering postprocessing, it's better to use a different name for this class.
[MAILPOET-5809]
2024-02-19 11:18:58 +01:00
Jan Lysý
a671a88956 Remove replacing space in image URL
This fix should not be used anymore.
[MAILPOET-5809]
2024-02-19 11:18:58 +01:00
Rostislav Wolny
d62f3c1938 Render email main font family CSS rules in the content wrapper
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
Rostislav Wolny
e8bb1b5ac0 Refactor font family rendering using CSS inlining
We don't reset font family on any level, so there is no need to
bubble the setting using a preprocessor and render the inline styles
explicitly in every block.

In this commit, I change how font-family settings are distributed/rendered
in the email renderer. In the new approach, we rely on class names defining font-family
and a generated CSS sheet with font-family definitions.
We apply the font-family CSS by inlining CSS rules for families in the later phase of
rendering after all individual blocks are processed.
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
Rostislav Wolny
9b05e46690 Use theme.json defined background in renderer
[MAILPOET-5644]
2024-01-08 09:21:16 +01: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ý
2ce6fd8688 Remove BlocksRenderer and fix tests
[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ý
5946884cb2 Refactor email content styles from string to array
[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
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
7233a9cb2b Remove unnecessary service in email renderer
[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
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