Commit Graph

131 Commits

Author SHA1 Message Date
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
6368496de1 Render font size on button instead of buttons wrapper
Font size on the wrapper was causing whitespace below the buttons block.
[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
0e10e6ed24 Use isset instead ?? operator in button renderer
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
9522a55460 Apply font color from the preprocessor in the button block
[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
280ad2e159 Add base text and background color to theme.json
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
16da082c42 Add schema to email editor theme.json
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
70273c626d Add Button renderer test
This commit adds a button renderer test and fixes a couple of issues
found when working on the test
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
8054088852 Unify styles processing in button renderer with other blocks
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
7329826d39 Skip rendering of empty buttons
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
becb5243d5 Remove witdh:100% from columns wrapper
This was causing incorrect width in cases when $layoutPaddingLeft
and $layoutPaddingRight were set. Box-sizing doesn't have proper
support in clients, so I tried to fix it by removing 100% of the width.
According to tests in AcidEmail, this shouldn't break anything.

This was introduced when we added full-width alignment.
[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
486f497290 Apply text-decoration in the button renderer from preprocessor
[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
9d35863fd0 Render buttons with borders with the correct width
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
2032370f03 Add default core editor styles
We accidentally removed them when adding layout styles.
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
499db0034c Remove forgotten bdumps from image block
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
a359c1e392 Improve font styles rendering in button
[MAILPOET-5644]
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
4dd273b429 Add reduced flex layout for buttons block
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
195756c0c7 Add renderer for core/button block
[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
Rostislav Wolny
6807189df3 Enable border-related settings in the email editor
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
3a74c1c4a0 Enable blocks and register dummy button/buttons renderers
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
d54847ce83 Refactor construction of NewsletterEntity when creating an email in the new editor
When we create a new email in the new editor we ensure there is
also an associated NewsletterEntity.
This commit improves this functionality by replacing custom code with
 NewsletterSaveController, which ensures that the sender name and address are set.
[MAILPOET-5646]
2024-01-08 12:04:06 +05:00
Rostislav Wolny
8be034822e Add minimalistic WpPostEntity for fetching basic post data for listing
[MAILPOET-5646]
2024-01-08 12:04:06 +05:00
Rostislav Wolny
f9a7ffc337 Allow title for the email custom post
[MAILPOET-5646]
2024-01-08 12:04:06 +05: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ý
df9c3f5890 Add comments about color variables conversion
[MAILPOET-5642]
2024-01-05 10:17:23 +01:00
Jan Lysý
4b306dbca1 Remove unused constant
[MAILPOET-5642]
2024-01-05 10:17:23 +01:00
Jan Lysý
d4e2836a9d Unify typehint by BlockRenderer interface
[MAILPOET-5642]
2024-01-05 10:17:23 +01:00
Jan Lysý
61892595ee Fix blocks width across email clients
[MAILPOET-5642]
2024-01-05 10:17:23 +01:00
Jan Lysý
efd9abcf76 Skip width style setting in blocks paragraph and heading
[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ý
61e8d2d200 Implement rendering block core/paragraph
[MAILPOET-5642]
2024-01-05 10:17:23 +01:00
Jan Lysý
3228ae5794 Fix stretch alignment for the column/core block
[MAILPOET-5642]
2024-01-05 10:17:23 +01:00
Jan Lysý
37d893ff47 Disable fontWeight settings for Paragraphs
[MAILPOET-5642]
2024-01-05 10:17:23 +01:00
Jan Lysý
52214962a6 Disable dropCap settings for Paragraphs
[MAILPOET-5642]
2024-01-05 10:17:23 +01:00
Jan Lysý
445f7545a1 Reuse function from SettingsController in Heading renderer
[MAILPOET-5642]
2024-01-05 10:17:23 +01:00
Jan Lysý
832ffc1568 Add layout left and right padding to columns block
Because side paddings were removed from template.html it was necessary add them to the columns block to correct compatibility across different email client.
[MAILPOET-5688]
2023-12-21 13:04:10 +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ý
2ce746a156 Fix getting style attribute in the image block
In some cases wasn't the style attribute set and it caused type error in calling method for parsing styles.
[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
Jan Lysý
6ec1a46492 Add theme.json containing padding and email width
I used theme.json for generating classes useful for full-width in the email editor.
[MAILPOET-5688]
2023-12-21 13:04:10 +01:00
Jan Lysý
a854c3407a Enable alignWide in BlockEditor
[MAILPOET-5688]
2023-12-21 13:04:10 +01:00
Jan Lysý
aa40d7eb7b Set BlockList layout
[MAILPOET-5688]
2023-12-21 13:04:10 +01:00