Commit Graph

302 Commits

Author SHA1 Message Date
Jan Lysý
4dbac6ef62 Move email styles merge to engine
[MAILPOET-5640]
2024-03-22 17:19:44 +01:00
Jan Lysý
cae2ad6dc7 Move meta registration to the engine
As a part of the refactoring is making the meta field available via API.
[MAILPOET-5640]
2024-03-22 17:19:44 +01:00
Jan Lysý
b4bf9c7476 Use VariablesPostprocessor in Renderer
Because the layout wrapper HTML is not post-processed after moving content rendering, I needed to use VariablesPostprocessor because padding can be configured by a CSS variable.
[MAILPOET-5640]
2024-03-22 17:19:44 +01:00
Jan Lysý
a0c1a87e81 Remove redundant code
[MAILPOET-5640]
2024-03-22 17:19:44 +01:00
Jan Lysý
95f3766b4d Add theme styles component for email editor
[MAILPOET-5640]
2024-03-22 17:19:44 +01:00
Jan Lysý
be4f517d39 Add theme metadata to mailpoet_email post
[MAILPOET-5640]
2024-03-22 17:19:44 +01:00
Pavel Dohnal
4050127a29 Add a note about rendering issues
[MAILPOET-5945]
2024-03-22 15:46:57 +01:00
Pavel Dohnal
fea141d1bd Fix rendering of columns width
[MAILPOET-5945]
2024-03-22 15:46:57 +01:00
Mike Jolley
d336262b31 Spacing 2024-03-21 16:57:59 +01:00
Mike Jolley
435f638011 Apply rules on lib dir 2024-03-21 16:57:59 +01:00
Mike Jolley
a1b146a2ec Remove trailing comma 2024-03-20 10:57:26 +01:00
Mike Jolley
33cb92a779 Conditionally show footer 2024-03-20 10:57:26 +01:00
Mike Jolley
762b050e85 Alternative footer logo 2024-03-20 10:57:26 +01:00
Jan Lysý
6f87dd6b01 Move layout background colors to theme.json
[MAILPOET-5640]
2024-03-15 16:57:41 +01:00
Jan Lysý
6181d8a683 Change default values for block gap and padding
[MAILPOET-5640]
2024-03-15 16:57:41 +01:00
Jan Lysý
5ceef236bf Use the same format for styles as it is in theme.json
This should be the first step to using theme.json format in DB and merging more style configurations to the final one.
[MAILPOET-5640]
2024-03-15 16:57:41 +01:00
Jan Lysý
c415f1efce Move heading styles from CSS file to theme.json
Because we want to have all editor configurations in theme.json, I moved heading font sized to theme.json and removed redundant filters.
[MAILPOET-5640]
2024-03-15 16:57:41 +01:00
Rostislav Wolny
3bbb7b71a1 Fix border radius issues in the button
When only the radius was defined, we set border solid and it caused
that sometimes it was rendered even when the width was not defined.
Overflow hidden ensures that inner link element doesn't break the border radius.
[MAILPOET-5907
2024-03-15 14:43:01 +01:00
Rostislav Wolny
39aa76d4d0 Improve typehints and use typed properties in ContentRenderer and test
[MAILPOET-5798]
2024-03-15 10:28:48 +01:00
Rostislav Wolny
4071175178 Move ContentRenderer to the Renderer/ContentRenderer namespace
[MAILPOET-5798]
2024-03-15 10:28:48 +01:00
Rostislav Wolny
da87807330 Split CSS for inlining to a file for content and for the HTML template
This is a continuation of the idea of separating content rendering
and adding content to the HTML template.
I assume that in the future, we may move more parts from the renderer
to the content render (e.g. we may introduce a block for layout wrap).
[MAILPOET-5798]
2024-03-15 10:28:48 +01:00
Rostislav Wolny
2c5857e89b Split renderer into content renderer and renderer
Content renderer - renders the content of the email post
Renderer - places the content into the email HTML template and generates text version
[MAILPOET-5798]
2024-03-15 10:28:48 +01:00
Mike Jolley
3defeec415 Rename tableWidth variable 2024-03-13 10:02:00 +01:00
Mike Jolley
9e25796d66 IE column widths 2024-03-13 10:02:00 +01:00
Mike Jolley
3e8edcdc8f Fix border styles 2024-03-13 10:02:00 +01:00
Mike Jolley
bc500812ed Remove max width so table fills full width of layout 2024-03-13 10:02:00 +01:00
Mike Jolley
a922714154 Correctly set default alignment to stretched 2024-03-13 10:02:00 +01:00
Mike Jolley
c75367b996 Merge borders to ensure defaults are set 2024-03-13 10:02:00 +01:00
Mike Jolley
86a9de0df5 Fix extra borders in columns 2024-03-13 10:02:00 +01:00
Mike Jolley
44d95d9e6b Fixing tests and adding debug information to show generated HTML 2024-03-13 10:02:00 +01:00
Mike Jolley
880f157fb0 Update tests due to moving some classnames and styles 2024-03-13 10:02:00 +01:00
Mike Jolley
250f4ad929 Tidy markup 2024-03-13 10:02:00 +01:00
Mike Jolley
27414dfc55 Padding from block styles 2024-03-13 10:02:00 +01:00
Mike Jolley
c4deea8b48 Add background support for columns 2024-03-13 10:02:00 +01:00
Mike Jolley
3abcb581c9 Add background image support to column/columns 2024-03-13 10:02:00 +01:00
Mike Jolley
035f3097ca Move image to CDN 2024-03-12 11:29:04 +00:00
Mike Jolley
3ad932a17e Define default content blocks 2024-03-12 11:29:04 +00:00
Rostislav Wolny
970b321de5 Fix border color fallback for button block
When the border color is not set, a block uses text color as a fallback.
This was not working properly for the button block when the font color was picked from the color palette.
This PR fixes the issue and adds the proper border color class.

[MAILPOET-5919]
2024-03-12 08:38:56 +01:00
Rostislav Wolny
1eb0c07fed Add border color classes to CSS for the renderer
[MAILPOET-5919]
2024-03-12 08:38:56 +01:00
Rostislav Wolny
fc7ecaa0b1 Add missing escaping to Variables postprocessor
[MAILPOET-5918]
2024-03-05 16:03:49 +01:00
Rostislav Wolny
8faaa174bc Add post processor for replacing CSS variables with values
[MAILPOET-5918]
2024-03-05 16:03:49 +01:00
Rostislav Wolny
a7153d70c3 Add getVariablesValuesMap to the theme controller
This commit adds a method that returns map of CSS variables and their values defined based on the theme.json
It is a preparation step for a postprocessor that will use this map to replace variables with values in final HTML.
There are many clients that don't support CSS variables
[MAILPOET-5918]
2024-03-05 16:03:49 +01:00
Rostislav Wolny
c545dc4967 Refactor applying padding in block renderers
Instead of using our own logic for building padding style definition,
we switch to wp_style_engine_get_styles which generates the styles definitions for us.
It also handles value variable formatting to valid CSS (var:preset|spacing|50 to var(--wp--preset--spacing--50)).
[MAILPOET-5918]
2024-03-05 16:03:49 +01:00
Jan Lysý
698c41b77b Use styles from settings controller in preview
[MAILPOET-5638]
2024-03-01 16:36:52 +01:00
Jan Lysý
db8dac03d2 Prepare styles in store for sidebar
[MAILPOET-5638]
2024-03-01 16:36:52 +01:00
Jan Lysý
075eaab28a Change image caption align to center
We don't need to set the caption align by image alignment. It should be always center.
[MAILPOET-5821]
2024-02-29 11:05:55 +01:00
Jan Lysý
3a2573bb5b Fix column and columns width when border is set
[MAILPOET-5821]
2024-02-29 11:05:55 +01:00
Jan Lysý
4caa2f0723 Use WP native function for border style preparation
[MAILPOET-5821]
2024-02-29 11:05:55 +01:00
Jan Lysý
a693c6f4ae Fix width for full-width blocks with borders
[MAILPOET-5821]
2024-02-29 11:05:55 +01:00
Jan Lysý
76e3a20c24 Improve border compatibility across email clients
[MAILPOET-5821]
2024-02-29 11:05:55 +01:00