Rostislav Wolny
a472df257a
Replace font size slugs with values in typography preprocessor
...
[MAILPOET-5740]
2024-01-23 16:47:48 +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
c4586d60e9
Move the default font family and font size settings to the theme.json
...
[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
a7aaf97070
Improve typography preprocessor to get font family value from slugs
...
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
Rostislav Wolny
890050fdc8
Fix font-family processing in the typography preprocessor.
...
The font-family property is not included under styles but at the top level
of block attributes.
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
Jan Lysý
b68df77aee
Simplify ListBlock renderer
...
Because for nesting is better to doesn't have any wrapper, we add configured styles directly to the list tag
[MAILPOET-5790]
2024-01-11 14:39:08 +01:00
Rostislav Wolny
9c87ec233f
Add comment about numeric values in BlocksWidthPreprocessor
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
7cbc130893
Pass default font-size in email attrs in TypographyPreprocessor
...
It is convenient to always know font-size in nested blocks so that we don't
have to read it from the settings controller.
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
327a23ca81
Improve typography preprocessor to distribute font color from theme.json
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
9b05e46690
Use theme.json defined background in renderer
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
c5ad2405aa
Add Flex Renderer test
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
820af6454b
Extract flex layout rendering functionality to an extra class
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
b626252b39
Add support for text decoration to typography preprocessor
2024-01-08 09:21:16 +01:00
Rostislav Wolny
bfa7b509cc
Add buttons block rendering
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
f907f574ea
Fix block width preprocessor for blocks with percentage width
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Jan Lysý
28a3d40bda
Fix column with calculation when missing
...
In specific cases could defining padding for columns without width looked differently in preview.
[MAILPOET-5739]
2024-01-05 11:17:46 +01:00
Jan Lysý
4b306dbca1
Remove unused constant
...
[MAILPOET-5642]
2024-01-05 10:17:23 +01:00
Jan Lysý
6aca73ff2e
Remove exception in width block width calculation
...
[MAILPOET-5642]
2024-01-05 10:17:23 +01:00
Jan Lysý
52e8fc3a12
Add exception for subtracting padding for full-width blocks
...
[MAILPOET-5688]
2023-12-21 13:04:10 +01:00
Jan Lysý
1b94347bb4
Add wrapping full-width blocks into core/column block
...
[MAILPOET-5688]
2023-12-21 13:04:10 +01:00
Rostislav Wolny
91b8ed9dde
Fix displaying columns full width in the gmail app
...
The content wrapping table was not set width 100%.
However, the table is not needed since each column block adds its own table.
So removing the incorrect table fixes the issue.
[MAILPOET-5753]
2023-12-07 16:56:40 +01:00
Jan Lysý
abf1ef9d7f
Implements image block renderer
...
[MAILPOET-5705]
2023-11-27 12:54:30 +01:00
Jan Lysý
477044b462
Add small improvements to the renderer readme
...
[MAILPOET-5705]
2023-11-27 12:54:30 +01:00
Oluwaseun Olorunsola
667da710b1
Merge updates in trunk
...
MAILPOET-5643
2023-11-17 09:49:06 +01:00
Oluwaseun Olorunsola
d05b38bf89
Fix failing test
...
MAILPOET-5643
2023-11-17 09:49:06 +01:00
Oluwaseun Olorunsola
1528b2e9ec
Add Base CSS resets
...
MAILPOET-5643
2023-11-17 09:49:06 +01:00
Jan Lysý
38c099be20
Reset heading margins in emails
...
[MAILPOET-5645]
2023-11-11 09:38:35 +04:00
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
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
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
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