Commit Graph

236 Commits

Author SHA1 Message Date
Jan Lysý
93674929b0 Add spacing at end of the paragraph when next element is heading
[MAILPOET-3474]
2021-10-04 10:19:39 +02:00
Pavel Dohnal
21839fc30b Fix indentation of multiline function declarations
[MAILPOET-3732]
2021-09-17 12:17:36 +02:00
Pavel Dohnal
cdda3480ca Make all constructor signatures multiline
[MAILPOET-3732]
2021-09-16 14:19:40 +02:00
Jan Lysý
a9621875bd Fix phpstan errors from new version
[MAILPOET-3725]
2021-08-16 15:56:39 +02:00
Rodrigo Primo
55dc8ac902 Protect against fatal error when rendering e-mail styles
This commit protects the code that renders styles for e-mails against a
fatal error that could happen if the variable $styles passed to Renderer::renderStyles()
is not an array of arrays. To do that, the code will now check if each value
of the array is an array. If not, we move on to the next value instead of
calling StylesHelper::setStyle(). I also added type hints to
StylesHelper::setStyle() and some of the methods that it calls to make
it more explicit what it expects to receive and what it returns.

[MAILPOET-3731]
2021-08-16 14:36:15 +02:00
Jan Lysý
f6a881da98 Remove redundant important from style
We test stripping redundant from rendered emails. I removed redundant important option.
It is based on this article:
https://www.litmus.com/blog/a-guide-to-bulletproof-buttons-in-email-design/

[MAILPOET-3468]
2021-08-16 11:44:41 +02:00
Jan Lysý
dfa0d03a67 Replace incorrect opening mso if in postProcessTemplate
[MAILPOET-3468]
2021-08-16 11:44:41 +02:00
Jan Lysý
75690d7a45 Add non mso condition around button
[MAILPOET-3468]
2021-08-16 11:44:41 +02:00
Rodrigo Primo
e59992cc16 Fix checkGenericClassInNonGenericObjectType PHPStan errors
This commit removes the checkGenericClassInNonGenericObjectType flag
from PHPStan configuration files and fixes all associated errors in our
code base.

[MAILPOET-3236]
2021-08-09 12:58:56 +02:00
Jan Lysý
f3586dfe2e Create WC content preprocessor
[MAILPOET-3638]
2021-06-14 09:46:19 +02:00
Jan Lysý
c1ffc12e1a Use placeholder block for WooCommerce preprocessing
[MAILPOET-3638]
2021-06-14 09:46:19 +02:00
Jan Lysý
4d5801caa3 Create block placeholder
[MAILPOET-3638]
2021-06-14 09:46:19 +02:00
Pavel Dohnal
7857b95fde Add a comment about unsupported blocks
[MAILPOET-3437]
2021-06-01 10:02:30 +02:00
Pavel Dohnal
df7b961768 Fix 1px line rendering bug in Outlook 2016
[MAILPOET-3448]
2021-05-26 09:34:58 +02:00
Rodrigo Primo
030bd8c1c8 Fix PHPStan parameter type error introduced after update to version 0.12.83
This commit fixes the following PHPStan errors introduced after the update to version 0.12.83:

```
 ------ ----------------------------------------------------------------------
  Line   lib/Newsletter/Renderer/Blocks/Footer.php
 ------ ----------------------------------------------------------------------
  18     Parameter #1 $html of method MailPoet\Util\pQuery\pQuery::parseStr()
         expects string, array|string|null given.
 ------ ----------------------------------------------------------------------

 ------ ----------------------------------------------------------------------
  Line   lib/Newsletter/Renderer/Blocks/Header.php
 ------ ----------------------------------------------------------------------
  18     Parameter #1 $html of method MailPoet\Util\pQuery\pQuery::parseStr()
         expects string, array|string|null given.
 ------ ----------------------------------------------------------------------
```

[MAILPOET-3491]
2021-04-12 08:55:14 +02:00
Pavel Dohnal
deb4d7833d Fix text align
[MAILPOET-3473]
2021-03-15 09:54:46 +01:00
Jan Lysý
9e9270f13b Use email heading from Woo for email header
We want to use email heading from Woo in title of rendered email for
WooCommerce Transactional Email.

[MAILPOET-3329]
2021-01-25 11:08:00 +01:00
wxa
0dffed35e9 Extract ALC and ACC block classes out of block renderer [MAILPOET-2979] 2020-10-07 11:48:50 +02:00
wxa
fd6ff25cd9 Make render preview call more readable [MAILPOET-2979] 2020-10-07 11:48:50 +02:00
wxa
52b84296b3 Add abandoned cart block rendering in email [MAILPOET-2979] 2020-10-07 11:48:50 +02:00
Rostislav Wolny
6cf0a1c04f Update block renderer to be reusable for multiple emails
[MAILPOET-2961]
2020-06-04 10:40:02 +02:00
Rostislav Wolny
36e3d2cae4 Change visibility of setPosts,getPosts in blocks renderer.
[MAILPOET-2961]
2020-06-04 10:40:02 +02:00
Rostislav Wolny
9f37ee4811 Use post notifications history parent to fetch latest sent post
[MAILPOET-2960]
2020-06-03 14:14:12 +02:00
Pavel Dohnal
c63c49af89 Use doctrine for latest post fetching
[MAILPOET-2899]
2020-05-28 11:28:51 +02:00
Pavel Dohnal
7b0c5e61fe Use Newsletter entity in renderer
[MAILPOET-2899]
2020-05-28 11:28:51 +02:00
Pavel Dohnal
f8a16b5e5a Remove public properties from renderer
[MAILPOET-2899]
2020-05-28 11:28:51 +02:00
Pavel Dohnal
7e0b536ff4 Use Di for newsletter renderer
[MAILPOET-2899]
2020-05-28 11:28:51 +02:00
Pavel Dohnal
c3686d9973 Move data from constructor
[MAILPOET-2899]
2020-05-28 11:28:51 +02:00
Pavel Dohnal
be631bd549 Use DI for blocks rendering
[MAILPOET-2899]
2020-05-28 11:28:51 +02:00
Pavel Dohnal
5f73f9ee3e Use DI in block renderer
[MAILPOET-2899]
2020-05-28 11:28:51 +02:00
Pavel Dohnal
7561730407 Use DI in ALC
[MAILPOET-2899]
2020-05-28 11:28:51 +02:00
Pavel Dohnal
93e574da4e Fix typo
[MAILPOET-2887]
2020-05-28 09:35:20 +02:00
Pavel Dohnal
96199cc586 Use the correct type when rendering newsletter
[MAILPOET-2716]
2020-04-24 11:44:09 +02:00
Pavel Dohnal
658aa6a1d7 Use the correct type
[MAILPOET-2716]
2020-04-24 11:44:09 +02:00
Rostislav Wolny
6f4ad78536 Fix coding style in Text block renderer
[MAILPOET-2821]
2020-03-29 21:39:01 +02:00
Jan Jakeš
eae5c5010d Fix properties with missing visibility
[MAILPOET-2715]
2020-02-19 19:12:53 +00:00
Jan Jakeš
b39dac75d6 Autofix number of newlines between methods
[MAILPOET-2715]
2020-02-19 19:12:53 +00:00
Jan Jakeš
0dcdf6e9f1 Autofix line endings
[MAILPOET-2715]
2020-02-19 19:12:53 +00:00
Jan Jakeš
d0292f8624 Convert variable names to camel case in PHPDoc
[MAILPOET-1796]
2020-01-14 15:22:42 +01:00
Jan Jakeš
8c848cfa28 Convert property names to camel case
[MAILPOET-1796]
2020-01-14 15:22:42 +01:00
Jan Jakeš
54549ff037 Convert variable names to camel case
[MAILPOET-1796]
2020-01-14 15:22:42 +01:00
Amine Ben hammou
43df66d162 Add public keyword to methods
[MAILPOET-2413]
2019-12-26 18:09:45 +03:00
wxa
9fdd37dbd8 Fix WC heading padding in rendering [MAILPOET-2569] 2019-12-23 21:55:40 +03:00
wxa
d84c45e5f1 Fix colors in rendering [MAILPOET-2569] 2019-12-23 21:55:40 +03:00
Jan Jakeš
b22d9e1550 Fix conditional font-include comment for Outlook
[MAILPOET-2562]
2019-12-12 19:07:38 +00:00
Amine Ben hammou
2c0f16b0dd Fix tests and default values
[MAILPOET-2286]
2019-11-28 14:07:38 +00:00
Amine Ben hammou
e1a8883935 Preprocess transactional email newsletter
[MAILPOET-2286]
2019-11-28 14:07:38 +00:00
Amine Ben hammou
f34128d91b Add WC blocks preprocessing
[MAILPOET-2286]
2019-11-28 14:07:38 +00:00
Amine Ben hammou
5f5a254548 Move preprocessing logic into Preprocessor class
[MAILPOET-2286]

Additional preprocessing logic is needed to handle WooCommerce
blocks, so instead of making the Renderer class even bigger,
I am creating a new Preprocessor class. I wanted to move the
`addMailpoetLogoContentBlock` logic as well but it will break
tests and require a lot of refactor to fix them so I am leaving
it here for now.
2019-11-28 14:07:38 +00:00
Jan Jakeš
9166f280d0 Move CSS to MailPoetVendor namespace
[MAILPOET-2545]
2019-11-27 12:38:20 +00:00