Compare commits
563 Commits
Author | SHA1 | Date | |
---|---|---|---|
d3ee265122 | |||
10dcc4f45d | |||
3237351450 | |||
8d57e81b99 | |||
e37daa6c66 | |||
ad4247a241 | |||
8a4f5c13da | |||
1161e6f3f6 | |||
e5d5e20efd | |||
9fcb9afa9d | |||
b24b7b86fd | |||
ddca94891d | |||
9f14f3cc08 | |||
6b3fc309cc | |||
60d933b39a | |||
ea57fd9c11 | |||
a9788b04d4 | |||
46c45d9bef | |||
3282e2f063 | |||
05e941e449 | |||
6a14a3f7b1 | |||
b858f1159a | |||
f3d73aae03 | |||
494723c818 | |||
93af9d491d | |||
b07d34ee23 | |||
4b2b94db9e | |||
77b9cea62c | |||
e2dc137b59 | |||
2da4f5f3b9 | |||
7549ed7f0f | |||
0719f3c4e3 | |||
ba055b4278 | |||
0b5a809883 | |||
a4f7a05bff | |||
1730578a23 | |||
f88623e48d | |||
46fdd8eeb3 | |||
40f4216ff8 | |||
fe536fcdd0 | |||
62cff7b388 | |||
b24beb1dae | |||
b52c53f7f5 | |||
f66be1b947 | |||
5d3b26bb58 | |||
55b64d0354 | |||
7ce1b6eb6c | |||
97b42a4a91 | |||
bedde323bd | |||
0cf2787937 | |||
f0bc53766b | |||
f7fc2c16c1 | |||
f6d80b6e8b | |||
17d3f66316 | |||
23e08ecb44 | |||
4dfdfc8423 | |||
5cdce529b5 | |||
522b8a87db | |||
6e8660dcc4 | |||
936b7fed74 | |||
d87794aa1f | |||
8675aaef6e | |||
824e097639 | |||
dce8e94f8e | |||
e22ffcb5e3 | |||
8f94096cdd | |||
faa17b0d5c | |||
c4d4a6e594 | |||
9937bcc2d5 | |||
031c7d9866 | |||
0e84ddb957 | |||
5672823472 | |||
d03e11f938 | |||
3dbd91bfef | |||
d0ff2a9eae | |||
78314944aa | |||
872bf07b25 | |||
17b79ee29f | |||
f5b411e2ae | |||
e3e865eac5 | |||
6b7ffbc4ad | |||
4ddcc14eee | |||
7bca78e268 | |||
82159dd4c5 | |||
1e76b214ea | |||
8c44364dab | |||
7aea3528c4 | |||
b7809608d1 | |||
19bb957ae7 | |||
6e5ba84aab | |||
1a20f53916 | |||
57d364d142 | |||
89f76f67ca | |||
5e589cd5e3 | |||
139fb2f1ad | |||
5e7ece1e87 | |||
47a4e3b4e9 | |||
0019ad110e | |||
62325dc096 | |||
290aceb0e9 | |||
a9f4e47fe0 | |||
ede135c2b4 | |||
8ba6739356 | |||
cef5959fff | |||
9f81b2c787 | |||
5885bd7f84 | |||
f1d8ba51df | |||
39a9bf8e4c | |||
8dfb36cc3c | |||
fdbd25c513 | |||
ef5ec6367e | |||
c5b181949b | |||
03d7306611 | |||
fd5e8b6855 | |||
47e46aeebe | |||
56aae5cc99 | |||
84df282c0a | |||
a95c5bd1e9 | |||
c1b552b5ff | |||
18c2e53af8 | |||
e3808f7a61 | |||
68187a0fb6 | |||
f50dcd3bd1 | |||
ce8191ad6c | |||
5fe02fcc3e | |||
f31086f790 | |||
be20537587 | |||
708813c6cb | |||
3b3cd055df | |||
4b438242ab | |||
722e6f9d27 | |||
7b431d9291 | |||
30c6e6f769 | |||
8b2b8c3d48 | |||
0b5c65d568 | |||
49b2f5528f | |||
6bc58e23c9 | |||
7e66adcc0b | |||
24b906a738 | |||
ddbce0d636 | |||
277f870178 | |||
4be7f37bbc | |||
9ac18ab69e | |||
1bec3b4637 | |||
33e74bb0dd | |||
89d5f108e4 | |||
e4d00171b4 | |||
9f070f1914 | |||
94b5803337 | |||
9a2d4e83b2 | |||
59d91ff7ef | |||
bfe658fc86 | |||
7ced42a494 | |||
6164a92b9f | |||
7b11962bf2 | |||
3c7f1021b6 | |||
644412998a | |||
c1afee57e9 | |||
ac1d014562 | |||
71322ee512 | |||
dc2638a3ab | |||
41b23b24b9 | |||
9c8afa85d4 | |||
18c3424f03 | |||
1b1ee34acf | |||
d963bb4e7d | |||
b1f42bbeba | |||
dcdb447578 | |||
39d22bdd62 | |||
e4c9d037b1 | |||
d1ad7fecd7 | |||
4b92a9a4a5 | |||
9d65fe8d5e | |||
c353830163 | |||
6dd87b0dec | |||
fa3216be9b | |||
31201eb3cc | |||
48c075b730 | |||
14c85e3380 | |||
f551d4388c | |||
751dc539f6 | |||
d305680ba5 | |||
bb7775f87b | |||
54d9b517dd | |||
199910a52f | |||
983102c094 | |||
0d330e08b4 | |||
ccd1a5363d | |||
c368b130b8 | |||
3ffe99d5ab | |||
339068c086 | |||
dad40e262f | |||
0bbd65ac61 | |||
1a7b7d1936 | |||
2bbaa246d7 | |||
296ec54c3e | |||
579de1cc86 | |||
da88250fe1 | |||
ad831316ab | |||
2e97cb6924 | |||
c79787c677 | |||
07954dd968 | |||
2ace6da75b | |||
982568445b | |||
a53e446583 | |||
b033d7d92f | |||
1190d61ca3 | |||
7da5cc847f | |||
2778244faf | |||
3789379084 | |||
72e3c87190 | |||
38640e65e4 | |||
e0718f11ea | |||
eb7cc97ca2 | |||
24d3c0b13b | |||
ec0b1d4de8 | |||
56c90ef452 | |||
5f0ac0ec7e | |||
8c767af5c6 | |||
b0e8263e2f | |||
be592dbf9b | |||
3679320483 | |||
51ab4523f8 | |||
60abe14c7a | |||
f58b5e61b0 | |||
dbb972ec3f | |||
1930410754 | |||
539df2a994 | |||
ad41ef2f5e | |||
7ed0a92eda | |||
9471314917 | |||
69440ec2a6 | |||
0bbdf4b47f | |||
f11aca925f | |||
e4029a607a | |||
eb53973799 | |||
aab8281af0 | |||
3df00548ab | |||
ada346f4ef | |||
b3691a4625 | |||
e02b631172 | |||
2200411455 | |||
b0ab2f404f | |||
4195428643 | |||
1692c9bef5 | |||
cb25cf2944 | |||
794c5ce2d5 | |||
974d2d5a59 | |||
2ebcad1468 | |||
671c7eed7d | |||
72de76fe9b | |||
53cc357632 | |||
47d3472fef | |||
05c5b46089 | |||
f85bd8622f | |||
503cf61c0f | |||
d9eca55189 | |||
e850eaa90c | |||
478eab61e4 | |||
ea53728799 | |||
914d0d37c0 | |||
c1aae2c192 | |||
03cdcb30f8 | |||
a462e72b30 | |||
83db3db90d | |||
9495a40900 | |||
dbc2c9c240 | |||
d6bd1a5527 | |||
c5cd863f15 | |||
8ef1bfaf24 | |||
abac8d7147 | |||
367bcaf233 | |||
fdbb9428d9 | |||
bd047a0108 | |||
05202d572f | |||
a698e416ad | |||
1efc417f82 | |||
4dc31bbdb0 | |||
12dc727fda | |||
6602103d0f | |||
f3e8fb8ae2 | |||
a205d4d7f4 | |||
1783ca6e42 | |||
6555833fb6 | |||
ce3b9b2b7b | |||
1a653c5676 | |||
85a8d8aedb | |||
5c453fcd54 | |||
ec9adf8a6c | |||
b5064ca46f | |||
84b97ead76 | |||
4e578238f7 | |||
bb6d6137aa | |||
74c7728e3a | |||
e13113e38b | |||
68db0dbefe | |||
e015302a94 | |||
20fcf23f8f | |||
11beebf74d | |||
5a53406d33 | |||
ee83e4d748 | |||
970db8f0d8 | |||
71828f9f6e | |||
0525dd0f56 | |||
e3ba525195 | |||
1eed55cbce | |||
fd1331e602 | |||
02b82c04f3 | |||
ad5ef6ebbc | |||
3c5bc5b384 | |||
f229df0383 | |||
9092f892d0 | |||
9c3fb0856f | |||
2a8c665e12 | |||
9b1942ce48 | |||
932b4532f0 | |||
6533a1444d | |||
05a109dcf4 | |||
5b5b7856c6 | |||
4ceb508218 | |||
3afc7dc140 | |||
1c1058667b | |||
129aed2ae9 | |||
f8c7adf5a6 | |||
6346d39507 | |||
1b76f3b862 | |||
40c140a631 | |||
7fd11d4fb5 | |||
7fa694314b | |||
080e385b02 | |||
7c0b625793 | |||
f0b858b1f8 | |||
b218663e7e | |||
d8ea29423d | |||
ff038a1c56 | |||
588e8fca6b | |||
8d9f23d5f8 | |||
ea4637c740 | |||
c0e56a4f92 | |||
53a4722e91 | |||
d175870adf | |||
a64229f688 | |||
cd69e1e7b9 | |||
321db0b004 | |||
aaf01475b0 | |||
1cd38a396e | |||
1f1c9dd077 | |||
0da6d84309 | |||
3a05598166 | |||
5035d64298 | |||
56f6d20244 | |||
650d730c3f | |||
decaa0f636 | |||
c2b9e33b79 | |||
34347f241d | |||
5802f2132d | |||
8e502e5f50 | |||
0187f0cede | |||
8457aa7e2b | |||
67156b7c6f | |||
f9250b66a9 | |||
1fcdccaa33 | |||
5b93b88f46 | |||
cbd41cd1be | |||
95a8943b7e | |||
dd363370f6 | |||
1027a6a676 | |||
0fd93b0ff9 | |||
bfade87b62 | |||
26d9030544 | |||
5688a0daea | |||
92996ac781 | |||
1f471782ab | |||
320459eaab | |||
e65b2cce02 | |||
520ee981d3 | |||
f100ef72da | |||
146e1c871f | |||
669367c9c6 | |||
77d62c431a | |||
4a5fc507ca | |||
06f59dd320 | |||
4367f44449 | |||
856e0f69d3 | |||
c4bd2acd84 | |||
210c240aab | |||
d19f5dc732 | |||
6541c20466 | |||
3952484848 | |||
7d918604c3 | |||
ffaf5b88b6 | |||
eca4a9e923 | |||
1cee4e67e8 | |||
b1c35b60d8 | |||
1e5cfb4eaf | |||
5e5956420f | |||
78446d174a | |||
917d64a3e3 | |||
a3d51b2b08 | |||
3ffbd6e236 | |||
9753331d52 | |||
b266edb8e7 | |||
f1899055b8 | |||
c3f0a36665 | |||
88efb1f3d1 | |||
146f5881f7 | |||
3279fb1154 | |||
5f5efbe876 | |||
12afcfb656 | |||
0aac9e9d60 | |||
4e3b1527cd | |||
b27dcdd40a | |||
7b584dd482 | |||
5e71d94b62 | |||
8bb4338627 | |||
4bcd4a2cf2 | |||
ea7971cb3b | |||
9036b210a0 | |||
f337ac388b | |||
b0ae21ec60 | |||
7d11eeeddd | |||
4577ca5476 | |||
846794b60d | |||
5757af95aa | |||
b8c3b38652 | |||
3d21e4f35e | |||
73ce89d051 | |||
49d9dd666b | |||
53dda33c02 | |||
9b9f61bf13 | |||
651e2d3c56 | |||
0bd627d3b1 | |||
99d0eede80 | |||
d09b4ca409 | |||
caa76983e4 | |||
7b6bbb0bc3 | |||
cdf7c81a94 | |||
86812c5259 | |||
657302b720 | |||
172b5215d2 | |||
52a9d9f76c | |||
8eb7a48d3e | |||
a8bceffc9c | |||
2c728c793a | |||
8d974d8147 | |||
8fbc5c270a | |||
92dc5921df | |||
3c3ce37720 | |||
f369e399ed | |||
01aa1e1e52 | |||
2bbc1b7063 | |||
04b8a0ed73 | |||
761f7c6537 | |||
723dc2c9d3 | |||
d66fbb1c20 | |||
c2107b8d59 | |||
926620e8f8 | |||
82aeb89854 | |||
c67c58709b | |||
75b5958a53 | |||
bba5101669 | |||
b9c5dddbaf | |||
0566b3f5fa | |||
ac4adac1ab | |||
33a9097719 | |||
08c74cdf8b | |||
8c5222d850 | |||
08c76a46af | |||
3d24cb1deb | |||
a151f93be1 | |||
bce6a06c15 | |||
10a6e387f3 | |||
b6a37f274c | |||
2cdbc68643 | |||
7db40b27b5 | |||
b1760ff676 | |||
293eef2c78 | |||
299c6b779e | |||
842f435976 | |||
11faf925cc | |||
1295aa21cc | |||
84cd137c76 | |||
37067dff67 | |||
c7f850e1ba | |||
b25f2cd5f4 | |||
af95080b67 | |||
6b8c35d5fe | |||
a35e0dced4 | |||
c6259eb185 | |||
670017b342 | |||
ce7b210da9 | |||
1a2d8b8d40 | |||
fe2df00a8c | |||
20577d974f | |||
7369465a3a | |||
5769fa45f5 | |||
193b4cbf98 | |||
461df1a560 | |||
d5f78680eb | |||
96dde7107b | |||
3e756bfadd | |||
82c755200e | |||
735d33d05b | |||
90c8e5b2c9 | |||
cd1f06b116 | |||
173f347431 | |||
353d3389cd | |||
fe364978a1 | |||
cd512bbb01 | |||
f5193df721 | |||
25b5d24867 | |||
1d99ff0943 | |||
99d6d96b05 | |||
6ddfe2c605 | |||
d2ec7bba42 | |||
2557171953 | |||
0d7e45ea03 | |||
e677169a51 | |||
e268eac378 | |||
375f2b13c5 | |||
34406a2f72 | |||
cc658bcc3d | |||
973aefe7ae | |||
34e91251e8 | |||
882402645d | |||
d9d4dccc09 | |||
9d2fcccbf5 | |||
c4fdd881e6 | |||
83f7eee8ae | |||
dc1f63d8bb | |||
3e2425abd8 | |||
65e78c7990 | |||
2bdc5d3683 | |||
1de276378f | |||
cc76fe77f0 | |||
c8636aac6f | |||
a09f41143e | |||
8b29694446 | |||
5e0e89408c | |||
86076547c3 | |||
b1bbabe14d | |||
f5c678ec2d | |||
223625bd9b | |||
fbd7cf8cc7 | |||
26c7e4d1cc | |||
4832771185 | |||
7fb8d64628 | |||
36fed3bbf8 | |||
8ab738b315 | |||
b84b9606e9 | |||
aa68b7e148 | |||
ca44339512 | |||
91f5376dfc | |||
d51ef70db6 | |||
c164268c20 | |||
4c7c94c75d | |||
ccf141b279 | |||
e42808f22d | |||
75a4b2c538 | |||
f1d64c0572 | |||
25c57bf9fe | |||
079c90dbba | |||
0fc342ee4c |
@ -312,6 +312,7 @@ jobs:
|
|||||||
working_directory: /home/circleci/mailpoet/mailpoet
|
working_directory: /home/circleci/mailpoet/mailpoet
|
||||||
machine:
|
machine:
|
||||||
image: ubuntu-2204:2022.10.2
|
image: ubuntu-2204:2022.10.2
|
||||||
|
docker_layer_caching: false
|
||||||
parameters:
|
parameters:
|
||||||
multisite:
|
multisite:
|
||||||
type: integer
|
type: integer
|
||||||
@ -322,7 +323,7 @@ jobs:
|
|||||||
mysql_command:
|
mysql_command:
|
||||||
type: string
|
type: string
|
||||||
default: ''
|
default: ''
|
||||||
mysql_image_version:
|
mysql_image:
|
||||||
type: string
|
type: string
|
||||||
default: ''
|
default: ''
|
||||||
codeception_image_version:
|
codeception_image_version:
|
||||||
@ -351,7 +352,7 @@ jobs:
|
|||||||
default: 0
|
default: 0
|
||||||
environment:
|
environment:
|
||||||
MYSQL_COMMAND: << parameters.mysql_command >>
|
MYSQL_COMMAND: << parameters.mysql_command >>
|
||||||
MYSQL_IMAGE_VERSION: << parameters.mysql_image_version >>
|
MYSQL_IMAGE: << parameters.mysql_image >>
|
||||||
CODECEPTION_IMAGE_VERSION: << parameters.codeception_image_version >>
|
CODECEPTION_IMAGE_VERSION: << parameters.codeception_image_version >>
|
||||||
WORDPRESS_IMAGE_VERSION: << parameters.wordpress_image_version >>
|
WORDPRESS_IMAGE_VERSION: << parameters.wordpress_image_version >>
|
||||||
steps:
|
steps:
|
||||||
@ -411,6 +412,12 @@ jobs:
|
|||||||
circleci tests glob "tests/acceptance/**/*Cest.php" | circleci tests split --split-by=timings > tests/acceptance/_groups/circleci_split_group
|
circleci tests glob "tests/acceptance/**/*Cest.php" | circleci tests split --split-by=timings > tests/acceptance/_groups/circleci_split_group
|
||||||
fi
|
fi
|
||||||
cat tests/acceptance/_groups/circleci_split_group
|
cat tests/acceptance/_groups/circleci_split_group
|
||||||
|
- run:
|
||||||
|
name: Create docker containers for test
|
||||||
|
# We experienced some failures when creating containers so we do it explicitly with one retry
|
||||||
|
command: |
|
||||||
|
cd tests/docker
|
||||||
|
docker-compose create || docker-compose create
|
||||||
- run:
|
- run:
|
||||||
name: Run acceptance tests
|
name: Run acceptance tests
|
||||||
command: |
|
command: |
|
||||||
@ -477,8 +484,11 @@ jobs:
|
|||||||
working_directory: /home/circleci/mailpoet/mailpoet
|
working_directory: /home/circleci/mailpoet/mailpoet
|
||||||
machine:
|
machine:
|
||||||
image: ubuntu-2204:2022.10.2
|
image: ubuntu-2204:2022.10.2
|
||||||
|
docker_layer_caching: false
|
||||||
environment:
|
environment:
|
||||||
CODECEPTION_IMAGE_VERSION: << parameters.codeception_image_version >>
|
CODECEPTION_IMAGE_VERSION: << parameters.codeception_image_version >>
|
||||||
|
MYSQL_COMMAND: << parameters.mysql_command >>
|
||||||
|
MYSQL_IMAGE: << parameters.mysql_image >>
|
||||||
parameters:
|
parameters:
|
||||||
codeception_image_version:
|
codeception_image_version:
|
||||||
type: string
|
type: string
|
||||||
@ -501,6 +511,12 @@ jobs:
|
|||||||
multisite:
|
multisite:
|
||||||
type: integer
|
type: integer
|
||||||
default: 0
|
default: 0
|
||||||
|
mysql_command:
|
||||||
|
type: string
|
||||||
|
default: ''
|
||||||
|
mysql_image:
|
||||||
|
type: string
|
||||||
|
default: ''
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: /home/circleci
|
at: /home/circleci
|
||||||
@ -508,6 +524,12 @@ jobs:
|
|||||||
name: 'Pull test docker images'
|
name: 'Pull test docker images'
|
||||||
# Pull docker images with 3 retries
|
# Pull docker images with 3 retries
|
||||||
command: i='0';while ! docker-compose -f tests/docker/docker-compose.yml pull && ((i < 3)); do sleep 3 && i=$[$i+1]; done
|
command: i='0';while ! docker-compose -f tests/docker/docker-compose.yml pull && ((i < 3)); do sleep 3 && i=$[$i+1]; done
|
||||||
|
- run:
|
||||||
|
name: Create docker containers for test
|
||||||
|
# We experienced some failures when creating containers so we do it explicitly with one retry
|
||||||
|
command: |
|
||||||
|
cd tests/docker
|
||||||
|
docker-compose create || docker-compose create
|
||||||
- run:
|
- run:
|
||||||
name: 'PHP Integration tests'
|
name: 'PHP Integration tests'
|
||||||
command: |
|
command: |
|
||||||
@ -618,7 +640,7 @@ workflows:
|
|||||||
- build
|
- build
|
||||||
- acceptance_tests:
|
- acceptance_tests:
|
||||||
<<: *slack-fail-post-step
|
<<: *slack-fail-post-step
|
||||||
name: acceptance_tests
|
name: acceptance_tests_base_and_woo_cot_off
|
||||||
requires:
|
requires:
|
||||||
- unit_tests
|
- unit_tests
|
||||||
- static_analysis_php8
|
- static_analysis_php8
|
||||||
@ -646,28 +668,10 @@ workflows:
|
|||||||
- static_analysis_php8
|
- static_analysis_php8
|
||||||
- qa_js
|
- qa_js
|
||||||
- qa_php
|
- qa_php
|
||||||
- acceptance_tests:
|
|
||||||
<<: *slack-fail-post-step
|
|
||||||
name: acceptance_tests_woo_cot_off
|
|
||||||
group: woo
|
|
||||||
requires:
|
|
||||||
- unit_tests
|
|
||||||
- static_analysis_php8
|
|
||||||
- qa_js
|
|
||||||
- qa_php
|
|
||||||
- js_tests:
|
- js_tests:
|
||||||
<<: *slack-fail-post-step
|
<<: *slack-fail-post-step
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
- integration_tests:
|
|
||||||
<<: *slack-fail-post-step
|
|
||||||
group: woo
|
|
||||||
name: integration_test_woocommerce
|
|
||||||
requires:
|
|
||||||
- unit_tests
|
|
||||||
- static_analysis_php8
|
|
||||||
- qa_js
|
|
||||||
- qa_php
|
|
||||||
- integration_tests:
|
- integration_tests:
|
||||||
<<: *slack-fail-post-step
|
<<: *slack-fail-post-step
|
||||||
group: woo
|
group: woo
|
||||||
@ -728,15 +732,13 @@ workflows:
|
|||||||
<<: *slack-fail-post-step
|
<<: *slack-fail-post-step
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
- acceptance_tests
|
- acceptance_tests_base_and_woo_cot_off
|
||||||
- js_tests
|
- js_tests
|
||||||
- integration_test_woocommerce
|
|
||||||
- integration_test_base
|
- integration_test_base
|
||||||
- integration_test_woo_cot_no_sync
|
- integration_test_woo_cot_no_sync
|
||||||
- integration_test_woo_cot_off
|
- integration_test_woo_cot_off
|
||||||
- integration_test_woo_cot_sync
|
- integration_test_woo_cot_sync
|
||||||
- acceptance_tests_woo_cot_sync
|
- acceptance_tests_woo_cot_sync
|
||||||
- acceptance_tests_woo_cot_off
|
|
||||||
- acceptance_tests_woo_cot_no_sync
|
- acceptance_tests_woo_cot_no_sync
|
||||||
|
|
||||||
nightly:
|
nightly:
|
||||||
@ -766,8 +768,8 @@ workflows:
|
|||||||
woo_subscriptions_version: 4.3.0
|
woo_subscriptions_version: 4.3.0
|
||||||
woo_memberships_version: 1.21.0
|
woo_memberships_version: 1.21.0
|
||||||
woo_blocks_version: 6.8.0
|
woo_blocks_version: 6.8.0
|
||||||
mysql_command: --max_allowed_packet=100M
|
mysql_command: --max_allowed_packet=100M --default-storage-engine=MYISAM
|
||||||
mysql_image_version: 5.7.36
|
mysql_image: mysql:5.5
|
||||||
codeception_image_version: 7.4-cli_20220605.0
|
codeception_image_version: 7.4-cli_20220605.0
|
||||||
wordpress_image_version: wp-5.8_php7.3_20221104.1
|
wordpress_image_version: wp-5.8_php7.3_20221104.1
|
||||||
requires:
|
requires:
|
||||||
@ -792,6 +794,8 @@ workflows:
|
|||||||
<<: *slack-fail-post-step
|
<<: *slack-fail-post-step
|
||||||
name: integration_oldest
|
name: integration_oldest
|
||||||
codeception_image_version: 7.2-cli_20220605.0
|
codeception_image_version: 7.2-cli_20220605.0
|
||||||
|
mysql_command: --max_allowed_packet=100M --default-storage-engine=MYISAM
|
||||||
|
mysql_image: mysql:5.5
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
- build_premium:
|
- build_premium:
|
||||||
|
15
README.md
15
README.md
@ -126,23 +126,24 @@ You can access this help in your command line running `./do` without parameters.
|
|||||||
|
|
||||||
[Read the article.](https://mailpoet.atlassian.net/wiki/spaces/MAILPOET/pages/629374977/Adding+new+templates+to+the+plugin)
|
[Read the article.](https://mailpoet.atlassian.net/wiki/spaces/MAILPOET/pages/629374977/Adding+new+templates+to+the+plugin)
|
||||||
|
|
||||||
## 🚥 Testing with PHP 7.4 or PHP 8.0
|
## 🚥 Testing with different PHP versions
|
||||||
|
|
||||||
To switch the environment to PHP 7.4/8.0:
|
To switch the environment to a different PHP version:
|
||||||
|
|
||||||
1. Configure the `wordpress` service in `docker-compose.override.yml` to build from the php74 Dockerfile:
|
1. Check https://github.com/mailpoet/mailpoet/tree/trunk/dev for a list of available PHP versions. Each directory starting with `php` corresponds to a available version.
|
||||||
|
2. Configure the `wordpress` service in `docker-compose.override.yml` to build from the desired PHP version Dockerfile (replace {PHP_VERSION} with the name of the directory that corresponds to the version that you want to use):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
wordpress:
|
wordpress:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: dev/php74/Dockerfile # OR dev/php80/Dockerfile
|
dockerfile: dev/{PHP_VERSION}/Dockerfile
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Run `docker-compose build wordpress`.
|
3. Run `docker-compose build wordpress`.
|
||||||
3. Start the stack with `./do start`.
|
4. Start the stack with `./do start`.
|
||||||
|
|
||||||
To switch back to PHP 8.1 remove what was added in 1) and, run `docker-compose build wordpress` for application container and `docker-compose build test_wordpress` for tests container,
|
To switch back to the default PHP version remove what was added in 2) and, run `docker-compose build wordpress` for application container and `docker-compose build test_wordpress` for tests container,
|
||||||
and start the stack using `./do start`.
|
and start the stack using `./do start`.
|
||||||
|
|
||||||
## ✅ TODO
|
## ✅ TODO
|
||||||
|
46
dev/php82/Dockerfile
Normal file
46
dev/php82/Dockerfile
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
FROM php:8.2.0RC6-apache
|
||||||
|
|
||||||
|
ARG UID=1000
|
||||||
|
ARG GID=1000
|
||||||
|
|
||||||
|
# additinal extensions
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y git zlib1g-dev libzip-dev zip wget gnupg msmtp libpng-dev gettext subversion \
|
||||||
|
&& \
|
||||||
|
# Install NodeJS, enable Corepack
|
||||||
|
curl -sL https://deb.nodesource.com/setup_17.x | bash - && \
|
||||||
|
apt-get install -y nodejs build-essential && \
|
||||||
|
corepack enable && \
|
||||||
|
\
|
||||||
|
# Install WP-CLI
|
||||||
|
curl -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
|
||||||
|
chmod +x /usr/local/bin/wp && \
|
||||||
|
\
|
||||||
|
# Clean up
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
COPY dev/php.ini /usr/local/etc/php/conf.d/php_user.ini
|
||||||
|
|
||||||
|
# msmtp config
|
||||||
|
RUN printf "account default\nhost smtp\nport 1025" > /etc/msmtprc
|
||||||
|
|
||||||
|
# xdebug build an config
|
||||||
|
ENV XDEBUGINI_PATH=/usr/local/etc/php/conf.d/xdebug.ini
|
||||||
|
RUN git clone -b "3.2.0RC2" --depth 1 https://github.com/xdebug/xdebug.git /usr/src/php/ext/xdebug \
|
||||||
|
&& docker-php-ext-configure xdebug --enable-xdebug-dev \
|
||||||
|
&& docker-php-ext-install xdebug \
|
||||||
|
&& mkdir /tmp/debug
|
||||||
|
COPY dev/xdebug.ini /tmp/xdebug.ini
|
||||||
|
RUN cat /tmp/xdebug.ini >> $XDEBUGINI_PATH
|
||||||
|
|
||||||
|
# php extensions
|
||||||
|
RUN docker-php-ext-install pdo_mysql
|
||||||
|
RUN docker-php-ext-install mysqli
|
||||||
|
|
||||||
|
# allow .htaccess files (between <Directory /var/www/> and </Directory>, which is WordPress installation)
|
||||||
|
RUN sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
|
||||||
|
|
||||||
|
# ensure existing content in /var/www/html respects UID and GID, give Node permissions for Corepack
|
||||||
|
RUN chown -R ${UID}:${GID} /var/www/html && \
|
||||||
|
mkdir -p /.node && chown -R ${UID}:${GID} /.node
|
@ -15,6 +15,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- my-datavolume:/var/lib/mysql
|
- my-datavolume:/var/lib/mysql
|
||||||
- ./dev/database/create_test_db.sh:/docker-entrypoint-initdb.d/10-create_test_db.sh
|
- ./dev/database/create_test_db.sh:/docker-entrypoint-initdb.d/10-create_test_db.sh
|
||||||
|
command: --sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,ANSI,ONLY_FULL_GROUP_BY
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: somewordpress
|
MYSQL_ROOT_PASSWORD: somewordpress
|
||||||
MYSQL_DATABASE: wordpress
|
MYSQL_DATABASE: wordpress
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||||
|
|
||||||
// phpcs:disable PSR1.Classes.ClassDeclaration
|
// phpcs:disable PSR1.Classes.ClassDeclaration
|
||||||
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
|
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
|
||||||
@ -297,6 +297,29 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
return $this->runTestsInContainer($opts);
|
return $this->runTestsInContainer($opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testPerformance($path = null, $opts = ['url' => null, 'head' => false, 'scenario' => null]) {
|
||||||
|
// run WordPress setup
|
||||||
|
$this->taskExec('COMPOSE_HTTP_TIMEOUT=200 docker-compose run --rm -it setup')
|
||||||
|
->dir(__DIR__ . '/tests/performance')
|
||||||
|
->run();
|
||||||
|
|
||||||
|
// run performance tests
|
||||||
|
$dir = __DIR__;
|
||||||
|
return $this->taskExec("php $dir/tools/xk6browser.php")
|
||||||
|
->arg('run')
|
||||||
|
->option('env', 'URL=' . $opts['url'])
|
||||||
|
->option('env', 'HEADLESS=' . ($opts['head'] ? 'false' : 'true'))
|
||||||
|
->option('env', 'SCENARIO=' . $opts['scenario'])
|
||||||
|
->arg($path ?? "$dir/tests/performance/scenarios.js")
|
||||||
|
->dir($dir)->run();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testPerformanceClean() {
|
||||||
|
$this->taskExec('COMPOSE_HTTP_TIMEOUT=200 docker-compose down --remove-orphans -v')
|
||||||
|
->dir(__DIR__ . '/tests/performance')
|
||||||
|
->run();
|
||||||
|
}
|
||||||
|
|
||||||
public function testAcceptanceMultisite($opts = ['file' => null, 'skip-deps' => false, 'group' => null, 'timeout' => null, 'enable-cot' => false, 'enable-cot-sync' => false]) {
|
public function testAcceptanceMultisite($opts = ['file' => null, 'skip-deps' => false, 'group' => null, 'timeout' => null, 'enable-cot' => false, 'enable-cot-sync' => false]) {
|
||||||
return $this->runTestsInContainer(array_merge($opts, ['multisite' => true]));
|
return $this->runTestsInContainer(array_merge($opts, ['multisite' => true]));
|
||||||
}
|
}
|
||||||
@ -425,6 +448,9 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
$collection->addCode(function() {
|
$collection->addCode(function() {
|
||||||
return $this->qaCodeSniffer([]);
|
return $this->qaCodeSniffer([]);
|
||||||
});
|
});
|
||||||
|
$collection->addCode(function() {
|
||||||
|
return $this->qaMinimalPluginStandard([]);
|
||||||
|
});
|
||||||
return $collection->run();
|
return $collection->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -501,7 +527,56 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
'./tasks/code_sniffer/vendor/bin/phpcs',
|
'./tasks/code_sniffer/vendor/bin/phpcs',
|
||||||
'--extensions=php',
|
'--extensions=php',
|
||||||
$severityFlag,
|
$severityFlag,
|
||||||
'--standard=tasks/code_sniffer/MailPoet',
|
'--standard=tasks/code_sniffer/MailPoet/free-ruleset.xml',
|
||||||
|
'-s',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$ignorePaths = [
|
||||||
|
'.mp_svn',
|
||||||
|
'assets',
|
||||||
|
'doc',
|
||||||
|
'generated',
|
||||||
|
'lib/Config/PopulatorData/Templates',
|
||||||
|
'lib-3rd-party',
|
||||||
|
'node_modules',
|
||||||
|
'plugin_repository',
|
||||||
|
'prefixer/build',
|
||||||
|
'prefixer/vendor',
|
||||||
|
'tasks/code_sniffer/vendor',
|
||||||
|
'tasks/phpstan/vendor',
|
||||||
|
'tasks/makepot',
|
||||||
|
'tools/vendor',
|
||||||
|
'temp',
|
||||||
|
'tests/_data',
|
||||||
|
'tests/_output',
|
||||||
|
'tests/_support/_generated',
|
||||||
|
'vendor',
|
||||||
|
'vendor-prefixed',
|
||||||
|
'views',
|
||||||
|
];
|
||||||
|
|
||||||
|
// the "--ignore" arg takes a list of regexes, we need to anchor and escape them
|
||||||
|
$ignorePatterns = array_map(function (string $path): string {
|
||||||
|
return '^' . preg_quote(__DIR__ . DIRECTORY_SEPARATOR . $path);
|
||||||
|
}, $ignorePaths);
|
||||||
|
|
||||||
|
$stringFilesToCheck = !empty($filesToCheck) ? implode(' ', $filesToCheck) : '.';
|
||||||
|
|
||||||
|
return $this->taskExec($task)
|
||||||
|
->arg('--ignore=' . implode(',', $ignorePatterns))
|
||||||
|
->rawArg($stringFilesToCheck)
|
||||||
|
->run();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function qaMinimalPluginStandard(array $filesToCheck, $opts = ['severity' => 'all']) {
|
||||||
|
$severityFlag = $opts['severity'] === 'all' ? '-w' : '-n';
|
||||||
|
|
||||||
|
$task = implode(' ', [
|
||||||
|
'php -d memory_limit=-1',
|
||||||
|
'./tasks/code_sniffer/vendor/bin/phpcs',
|
||||||
|
'--extensions=php',
|
||||||
|
$severityFlag,
|
||||||
|
'--standard=tasks/code_sniffer/vendor/wporg/plugin-directory/MinimalPluginStandard',
|
||||||
'-s',
|
'-s',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
BIN
mailpoet/assets/audio/0.mp3
Normal file
BIN
mailpoet/assets/audio/0.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/1.mp3
Normal file
BIN
mailpoet/assets/audio/1.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/2.mp3
Normal file
BIN
mailpoet/assets/audio/2.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/3.mp3
Normal file
BIN
mailpoet/assets/audio/3.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/4.mp3
Normal file
BIN
mailpoet/assets/audio/4.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/5.mp3
Normal file
BIN
mailpoet/assets/audio/5.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/6.mp3
Normal file
BIN
mailpoet/assets/audio/6.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/7.mp3
Normal file
BIN
mailpoet/assets/audio/7.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/8.mp3
Normal file
BIN
mailpoet/assets/audio/8.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/9.mp3
Normal file
BIN
mailpoet/assets/audio/9.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/a.mp3
Normal file
BIN
mailpoet/assets/audio/a.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/b.mp3
Normal file
BIN
mailpoet/assets/audio/b.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/c.mp3
Normal file
BIN
mailpoet/assets/audio/c.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/d.mp3
Normal file
BIN
mailpoet/assets/audio/d.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/e.mp3
Normal file
BIN
mailpoet/assets/audio/e.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/f.mp3
Normal file
BIN
mailpoet/assets/audio/f.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/g.mp3
Normal file
BIN
mailpoet/assets/audio/g.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/h.mp3
Normal file
BIN
mailpoet/assets/audio/h.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/i.mp3
Normal file
BIN
mailpoet/assets/audio/i.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/j.mp3
Normal file
BIN
mailpoet/assets/audio/j.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/k.mp3
Normal file
BIN
mailpoet/assets/audio/k.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/l.mp3
Normal file
BIN
mailpoet/assets/audio/l.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/m.mp3
Normal file
BIN
mailpoet/assets/audio/m.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/n.mp3
Normal file
BIN
mailpoet/assets/audio/n.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/o.mp3
Normal file
BIN
mailpoet/assets/audio/o.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/p.mp3
Normal file
BIN
mailpoet/assets/audio/p.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/q.mp3
Normal file
BIN
mailpoet/assets/audio/q.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/r.mp3
Normal file
BIN
mailpoet/assets/audio/r.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/s.mp3
Normal file
BIN
mailpoet/assets/audio/s.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/t.mp3
Normal file
BIN
mailpoet/assets/audio/t.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/u.mp3
Normal file
BIN
mailpoet/assets/audio/u.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/v.mp3
Normal file
BIN
mailpoet/assets/audio/v.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/w.mp3
Normal file
BIN
mailpoet/assets/audio/w.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/x.mp3
Normal file
BIN
mailpoet/assets/audio/x.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/y.mp3
Normal file
BIN
mailpoet/assets/audio/y.mp3
Normal file
Binary file not shown.
BIN
mailpoet/assets/audio/z.mp3
Normal file
BIN
mailpoet/assets/audio/z.mp3
Normal file
Binary file not shown.
@ -34,9 +34,10 @@
|
|||||||
.mailpoet-automation-field__error {
|
.mailpoet-automation-field__error {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
input,
|
input:not([type='radio'])
|
||||||
select,
|
select,
|
||||||
textarea {
|
textarea,
|
||||||
|
input[type='text'].components-form-token-field__input {
|
||||||
background: right top/26px no-repeat url('../../img/icons/alert.svg');
|
background: right top/26px no-repeat url('../../img/icons/alert.svg');
|
||||||
padding-right: 26px;
|
padding-right: 26px;
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
.components-panel__body-title.mailpoet-automation-panel-plain-body-title {
|
.components-panel__body-title.mailpoet-automation-panel-plain-body-title {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr auto;
|
grid-template-columns: 1fr auto;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mailpoet-automation-panel-plain-body-title-text {
|
.mailpoet-automation-panel-plain-body-title-text {
|
||||||
|
@ -23,3 +23,11 @@
|
|||||||
transform: scale(-1, -1);
|
transform: scale(-1, -1);
|
||||||
transform-origin: center 12.5px;
|
transform-origin: center 12.5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mailpoet-option-button-opener.is-busy {
|
||||||
|
animation: components-button__busy-animation 2500ms infinite linear;
|
||||||
|
background-color: var(--wp-admin-theme-color);
|
||||||
|
background-image: linear-gradient(-45deg, var(--wp-admin-theme-color) 33%, var(--wp-admin-theme-color-darker-20) 33%, var(--wp-admin-theme-color-darker-20) 70%, var(--wp-admin-theme-color) 70%);
|
||||||
|
background-size: 100px 100%;
|
||||||
|
border-color: var(--wp-admin-theme-color);
|
||||||
|
}
|
||||||
|
@ -51,4 +51,8 @@
|
|||||||
.mailpoet_form_field_block {
|
.mailpoet_form_field_block {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mailpoet_form_field_input_nowrap {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,41 @@
|
|||||||
|
.mailpoet_coupon_block {
|
||||||
|
.mailpoet_editor_coupon {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_editor_coupon_overlay {
|
||||||
|
background: rgba(255, 255, 255, .5);
|
||||||
|
color: #000;
|
||||||
|
cursor: pointer;
|
||||||
|
display: none;
|
||||||
|
font-size: 18px;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
text-align: center;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
:hover {
|
||||||
|
.mailpoet_editor_coupon {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_editor_coupon_overlay {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.coupon_amount_wrapper {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.amount_percentage_sign {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
left: 150px; // .mailpoet_input_medium width
|
||||||
|
line-height: 30px;
|
||||||
|
margin-left: 10px;
|
||||||
|
position: absolute;
|
||||||
|
}
|
@ -111,10 +111,29 @@ h2 {
|
|||||||
|
|
||||||
.edit-post-visual-editor {
|
.edit-post-visual-editor {
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
padding: 10px;
|
padding: 10px 10px 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unify padding o wp-block-columns with background with front end rendering
|
// Unify padding o wp-block-columns with background with front end rendering
|
||||||
.wp-block-columns.has-background {
|
.wp-block-columns.has-background {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Close button animation
|
||||||
|
.edit-post-header-toolbar.edit-post-header-toolbar__left > .edit-post-header-toolbar__inserter-toggle {
|
||||||
|
svg {
|
||||||
|
transition: transform cubic-bezier(.165, .84, .44, 1) .2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-pressed svg {
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hide block selector header with close button on desktops
|
||||||
|
|
||||||
|
@include respond-to(not-small-screen) {
|
||||||
|
.edit-post-editor__inserter-panel-header {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
// Override CSS for HelpScout beacon on form editor page
|
|
||||||
.admin_page_mailpoet-form-editor {
|
|
||||||
.BeaconFabButtonFrame,
|
|
||||||
.BeaconContainer {
|
|
||||||
left: 175px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.folded {
|
|
||||||
.BeaconFabButtonFrame,
|
|
||||||
.BeaconContainer {
|
|
||||||
left: 50px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@include respond-to(medium-screen) {
|
|
||||||
.BeaconFabButtonFrame,
|
|
||||||
.BeaconContainer {
|
|
||||||
left: 50px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@include respond-to(small-screen) {
|
|
||||||
.BeaconFabButtonFrame,
|
|
||||||
.BeaconContainer {
|
|
||||||
left: 15px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -123,4 +123,5 @@
|
|||||||
// This style hides the horizontal scrollbar in Firefox browser
|
// This style hides the horizontal scrollbar in Firefox browser
|
||||||
.interface-interface-skeleton__sidebar {
|
.interface-interface-skeleton__sidebar {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
padding-bottom: 100px;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
.mailpoet-homepage-section__container {
|
||||||
|
background-color: $color-white;
|
||||||
|
box-shadow: rgb(0 0 0 / 10%) 0 0 0 1px;
|
||||||
|
margin: $grid-gap-xl 0 $grid-gap-medium;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-homepage-section__heading {
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid $color-homepage-borders;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto $grid-gap-medium;
|
||||||
|
height: 60px;
|
||||||
|
padding: 0 $grid-gap-medium;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 28px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include respond-to(small-screen) {
|
||||||
|
padding: $grid-gap-half $grid-gap-medium;
|
||||||
|
}
|
||||||
|
}
|
5
mailpoet/assets/css/src/components-homepage/_layout.scss
Normal file
5
mailpoet/assets/css/src/components-homepage/_layout.scss
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.mailpoet-homepage__container {
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-top: $grid-gap-xl;
|
||||||
|
max-width: 680px;
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
.mailpoet-homepage-product-discovery {
|
||||||
|
ul {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-product-discovery__task {
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid $color-homepage-borders;
|
||||||
|
box-sizing: border-box;
|
||||||
|
cursor: pointer;
|
||||||
|
display: grid;
|
||||||
|
font-weight: 600;
|
||||||
|
grid-template-columns: (124px + $grid-gap-medium) auto $grid-gap-xl;
|
||||||
|
margin: 0;
|
||||||
|
padding: $grid-gap-medium;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
@include respond-to(small-screen) {
|
||||||
|
grid-template-columns: auto $grid-gap-xl;
|
||||||
|
|
||||||
|
img {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: inset 5px 0 0 0 var(--wp-admin-theme-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-product-discovery__task--completed {
|
||||||
|
cursor: inherit;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-product-discovery__task-content {
|
||||||
|
h3 {
|
||||||
|
color: var(--wp-admin-theme-color);
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
color: $color-text-light;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 3px 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-product-discovery__task-after {
|
||||||
|
.mailpoet-task-list__task-icon {
|
||||||
|
background-color: var(--wp-admin-theme-color);
|
||||||
|
|
||||||
|
svg {
|
||||||
|
fill: $color-white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
126
mailpoet/assets/css/src/components-homepage/_task-list.scss
Normal file
126
mailpoet/assets/css/src/components-homepage/_task-list.scss
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
$task-icon-size: 32px;
|
||||||
|
|
||||||
|
.mailpoet-task-list__task {
|
||||||
|
background-color: $color-white;
|
||||||
|
border-bottom: 1px solid $color-homepage-borders;
|
||||||
|
box-sizing: border-box;
|
||||||
|
cursor: pointer;
|
||||||
|
display: grid;
|
||||||
|
font-weight: 600;
|
||||||
|
grid-template-columns: $grid-gap-xl auto $grid-gap-xl;
|
||||||
|
margin: 0;
|
||||||
|
padding: $grid-gap $grid-gap-medium;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $color-grey-0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-task-list__task-content {
|
||||||
|
align-content: center;
|
||||||
|
color: var(--wp-admin-theme-color);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
font-size: 14px;
|
||||||
|
justify-content: center;
|
||||||
|
line-height: 20px;
|
||||||
|
|
||||||
|
p {
|
||||||
|
color: $color-text-light;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 3px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--wp-admin-theme-color);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: var(--wp-admin-theme-color-darker-20);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-task-list__task-before {
|
||||||
|
color: var(--wp-admin-theme-color);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-task-list__task-icon {
|
||||||
|
border: 1px solid var(--wp-admin-theme-color);
|
||||||
|
border-radius: 50%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: $task-icon-size;
|
||||||
|
line-height: $task-icon-size;
|
||||||
|
text-align: center;
|
||||||
|
width: $task-icon-size;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
fill: var(--wp-admin-theme-color);
|
||||||
|
margin: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-task-list__task--completed {
|
||||||
|
cursor: inherit;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $color-white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-task-list__task-icon {
|
||||||
|
background-color: var(--wp-admin-theme-color);
|
||||||
|
|
||||||
|
svg {
|
||||||
|
fill: $color-white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-task-list__task--active {
|
||||||
|
box-shadow: inset 5px 0 0 0 var(--wp-admin-theme-color);
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
background-color: var(--wp-admin-theme-color);
|
||||||
|
content: '';
|
||||||
|
height: 100%;
|
||||||
|
left: 0;
|
||||||
|
opacity: .1;
|
||||||
|
pointer-events: none;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-task-list__heading p,
|
||||||
|
.mailpoet-task-list__all-set {
|
||||||
|
color: $color-text-light;
|
||||||
|
font-size: $heading-font-size-h4;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin-top: $grid-gap-large;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-task-list__heading {
|
||||||
|
margin-bottom: $grid-gap-large;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-top: $grid-gap-half;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.components-dropdown {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 6px;
|
||||||
|
}
|
||||||
|
}
|
@ -122,3 +122,21 @@ body .components-modal__screen-overlay {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
margin-top: $grid-gap-half;
|
margin-top: $grid-gap-half;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mailpoet-locked-badge {
|
||||||
|
align-items: center;
|
||||||
|
background: #fcf9e8;
|
||||||
|
border: .5px solid #f5e6ab;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #bd8600;
|
||||||
|
display: flex;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 500;
|
||||||
|
gap: 4px;
|
||||||
|
height: 20px;
|
||||||
|
letter-spacing: .2px;
|
||||||
|
line-height: 16px;
|
||||||
|
padding: 2px 8px 2px 4px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
width: 82px;
|
||||||
|
}
|
||||||
|
196
mailpoet/assets/css/src/components-plugin/_landingpage.scss
Normal file
196
mailpoet/assets/css/src/components-plugin/_landingpage.scss
Normal file
@ -0,0 +1,196 @@
|
|||||||
|
#mailpoet_landingpage_container {
|
||||||
|
$content-padding: 32px 65px;
|
||||||
|
$mobile-content-padding: 25px;
|
||||||
|
|
||||||
|
.mailpoet-content-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-content-padding {
|
||||||
|
padding: $content-padding;
|
||||||
|
|
||||||
|
@include respond-to(small-screen) {
|
||||||
|
padding: $mobile-content-padding
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.landing-header {
|
||||||
|
padding: $content-padding;
|
||||||
|
|
||||||
|
@include respond-to(small-screen) {
|
||||||
|
padding: $mobile-content-padding
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.landing-footer {
|
||||||
|
background-color: $color-landingpage-background-light;
|
||||||
|
padding: $content-padding;
|
||||||
|
|
||||||
|
.landing-footer-content {
|
||||||
|
box-shadow: 0 -1px 0 0 $color-tertiary-light;
|
||||||
|
padding: 25px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.landing-faq {
|
||||||
|
background-color: $color-landingpage-background-light;
|
||||||
|
padding: $content-padding;
|
||||||
|
|
||||||
|
.mailpoet-faq-accordion {
|
||||||
|
margin: 25px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.landing-faq-mobile {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include respond-to(small-screen) {
|
||||||
|
padding: $mobile-content-padding;
|
||||||
|
|
||||||
|
.landing-faq-header {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.landing-faq-mobile {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.landing-content {
|
||||||
|
.hero-section {
|
||||||
|
$hero-image-offset: 6rem;
|
||||||
|
background-color: $color-landingpage-background-light;
|
||||||
|
margin-top: $hero-image-offset;
|
||||||
|
padding: $content-padding;
|
||||||
|
|
||||||
|
.hero-image {
|
||||||
|
margin-top: -($hero-image-offset + 2rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
@include respond-to(small-screen) {
|
||||||
|
padding: $mobile-content-padding
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.landingpage-images {
|
||||||
|
@include respond-to(medium-screen) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.landingpage-general-features {
|
||||||
|
p:last-child {
|
||||||
|
margin: 10px auto;
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.landingpage-feature-icon {
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include respond-to(medium-screen) {
|
||||||
|
p:last-child {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.landingpage-wooCommerce-features {
|
||||||
|
margin-top: 30px;
|
||||||
|
padding: 2rem 10rem;
|
||||||
|
|
||||||
|
.landingpage-wooCommerce-feature-item {
|
||||||
|
padding: 30px;
|
||||||
|
|
||||||
|
@media screen and (min-width: 960px) and (max-width: 1460px) {
|
||||||
|
.landingpage-images {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
div:last-child {
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@include respond-to(small-screen) {
|
||||||
|
padding: $mobile-content-padding;
|
||||||
|
|
||||||
|
.landingpage-wooCommerce-feature-item {
|
||||||
|
padding: 25px 0;
|
||||||
|
|
||||||
|
div:last-child {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet-faq-accordion {
|
||||||
|
details {
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
&:not(:first-child) {
|
||||||
|
border-top: 1px solid $color-editor-border-structure;
|
||||||
|
}
|
||||||
|
|
||||||
|
summary {
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 20px 5px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::-webkit-details-marker { // remove default marker
|
||||||
|
content: '';
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::marker { // remove default marker
|
||||||
|
content: '';
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
content: '›';
|
||||||
|
font-size: 30px;
|
||||||
|
position: absolute;
|
||||||
|
right: 20px;
|
||||||
|
top: 0;
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transform-origin: center;
|
||||||
|
transition: .2s transform ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include respond-to(small-screen) {
|
||||||
|
&:after {
|
||||||
|
right: -1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
max-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 10px 5px;
|
||||||
|
transition: max-height .3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
// when accordion is opened
|
||||||
|
&[open] {
|
||||||
|
summary:after {
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
transition: .5s transform ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
max-height: 400px;
|
||||||
|
transition: max-height .5s ease-in;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -4,6 +4,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fix for 3rd party plugins icons in menu that might display broken because we block loading 3rd party CSS on mailepoet pages
|
// Fix for 3rd party plugins icons in menu that might display broken because we block loading 3rd party CSS on mailepoet pages
|
||||||
#adminmenu .wp-menu-image img {
|
#adminmenu :not(.toplevel_page_site-card) .wp-menu-image img {
|
||||||
max-width: 20px;
|
max-width: 20px;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#mailpoet-wizard-container {
|
||||||
|
.mailpoet-top-bar {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.mailpoet-wizard-logo {
|
.mailpoet-wizard-logo {
|
||||||
margin-bottom: 100px;
|
margin-bottom: 100px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -35,6 +41,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
margin-top: 8px;
|
||||||
|
|
||||||
@include respond-to(medium-screen) {
|
@include respond-to(medium-screen) {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -42,7 +49,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mailpoet-wizard-step-illustration {
|
.mailpoet-wizard-step-illustration {
|
||||||
margin-right: $grid-gap;
|
margin-right: $grid-gap-xl;
|
||||||
max-width: $grid-column;
|
max-width: $grid-column;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -63,12 +70,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mailpoet-wizard-step-content {
|
.mailpoet-wizard-step-content {
|
||||||
max-width: $grid-column-small + $grid-gap + $grid-column;
|
max-width: 480px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
@include respond-to(medium-screen) {
|
@include respond-to(medium-screen) {
|
||||||
max-width: $grid-column;
|
max-width: $grid-column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mailpoet-button {
|
||||||
|
height: 36px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mailpoet-wizard-label {
|
.mailpoet-wizard-label {
|
||||||
@ -111,12 +122,16 @@
|
|||||||
|
|
||||||
.mailpoet-wizard-woocommerce-option {
|
.mailpoet-wizard-woocommerce-option {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-shadow: 0 -1px 0 0 $color-tertiary-light;
|
box-shadow: 0 1px 0 0 $color-tertiary-light;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row-reverse;
|
flex-direction: row-reverse;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding-bottom: 25px;
|
padding-bottom: 25px;
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
box-shadow: 0 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mailpoet-wizard-note {
|
.mailpoet-wizard-note {
|
||||||
|
12
mailpoet/assets/css/src/components-public/captcha.scss
Normal file
12
mailpoet/assets/css/src/components-public/captcha.scss
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
.mailpoet_captcha_form {
|
||||||
|
.mailpoet_icon_button {
|
||||||
|
background: transparent;
|
||||||
|
border: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 20px;
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -112,3 +112,11 @@
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.authorize-sender-email-and-domain-modal {
|
||||||
|
z-index: 30; // overlay other modals
|
||||||
|
}
|
||||||
|
|
||||||
|
.authorize-sender-email-and-domain-modal-overlay {
|
||||||
|
z-index: $modal-screen-overlay-z-index + 4; // overlay other modals
|
||||||
|
}
|
||||||
|
@ -29,7 +29,6 @@ $beamer-dot-size: 8px;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mailpoet-top-bar-logo {
|
.mailpoet-top-bar-logo {
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 2px;
|
top: 2px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@ -39,6 +38,10 @@ $beamer-dot-size: 8px;
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.mailpoet-top-bar-logo {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mailpoet-top-bar-logo-desktop {
|
.mailpoet-top-bar-logo-desktop {
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
@import 'components-editor/content-blocks/unknown_block_fallback';
|
@import 'components-editor/content-blocks/unknown_block_fallback';
|
||||||
@import 'components-editor/content-blocks/woocommerce-heading';
|
@import 'components-editor/content-blocks/woocommerce-heading';
|
||||||
@import 'components-editor/content-blocks/woocommerce-content';
|
@import 'components-editor/content-blocks/woocommerce-content';
|
||||||
|
@import 'components-editor/content-blocks/coupon';
|
||||||
|
|
||||||
// Utilities
|
// Utilities
|
||||||
// Helpers and overrides.
|
// Helpers and overrides.
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
@import './components-form-editor/custom-field';
|
@import './components-form-editor/custom-field';
|
||||||
@import './components-form-editor/form-title';
|
@import './components-form-editor/form-title';
|
||||||
@import './components-form-editor/header';
|
@import './components-form-editor/header';
|
||||||
@import './components-form-editor/helpscout';
|
|
||||||
@import './components-form-editor/form-placement';
|
@import './components-form-editor/form-placement';
|
||||||
@import './components-form-editor/preview';
|
@import './components-form-editor/preview';
|
||||||
@import './components-form-editor/block-editor';
|
@import './components-form-editor/block-editor';
|
||||||
|
23
mailpoet/assets/css/src/mailpoet-homepage.scss
Normal file
23
mailpoet/assets/css/src/mailpoet-homepage.scss
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
@import '../../../node_modules/@woocommerce/components/build-style/style'; // Needed to load WP admin themes color variables
|
||||||
|
|
||||||
|
// Settings
|
||||||
|
// Global variables, config switches. Not producing any CSS.
|
||||||
|
|
||||||
|
@import 'settings/breakpoints';
|
||||||
|
@import 'settings/colors';
|
||||||
|
@import 'settings/grid';
|
||||||
|
@import 'settings/typography';
|
||||||
|
|
||||||
|
// Tools
|
||||||
|
// Default mixins and functions. Still not producing any CSS.
|
||||||
|
|
||||||
|
@import 'mixins/breakpoints';
|
||||||
|
|
||||||
|
// Components
|
||||||
|
// Actual UI components.
|
||||||
|
|
||||||
|
@import 'components-homepage/_layout';
|
||||||
|
@import 'components-homepage/_task-list';
|
||||||
|
@import 'components-homepage/_content-section';
|
||||||
|
@import 'components-homepage/_product-discovery';
|
@ -85,3 +85,4 @@
|
|||||||
@import 'components-plugin/set-from-address-modal';
|
@import 'components-plugin/set-from-address-modal';
|
||||||
@import 'components-plugin/stats';
|
@import 'components-plugin/stats';
|
||||||
@import 'components-plugin/import-export';
|
@import 'components-plugin/import-export';
|
||||||
|
@import 'components-plugin/landingpage';
|
||||||
|
@ -19,3 +19,4 @@
|
|||||||
@import 'components-public/public';
|
@import 'components-public/public';
|
||||||
@import 'components-public/animation';
|
@import 'components-public/animation';
|
||||||
@import 'components-public/form_colors';
|
@import 'components-public/form_colors';
|
||||||
|
@import 'components-public/captcha';
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
// WordPress breakpoints
|
// WordPress breakpoints
|
||||||
$mailpoet-breakpoint-small: 782px;
|
$mailpoet-breakpoint-small: 781px;
|
||||||
$mailpoet-breakpoint-medium: 960px;
|
$mailpoet-breakpoint-medium: 960px;
|
||||||
|
@ -79,3 +79,9 @@ $color-chip-success-bg: #b8e6bf;
|
|||||||
$color-chip-success-text: #005c12;
|
$color-chip-success-text: #005c12;
|
||||||
$color-chip-danger-bg: #facfd2;
|
$color-chip-danger-bg: #facfd2;
|
||||||
$color-chip-danger-text: #8a2424;
|
$color-chip-danger-text: #8a2424;
|
||||||
|
|
||||||
|
// Landing page
|
||||||
|
$color-landingpage-background-light: #fbfbfb;
|
||||||
|
|
||||||
|
// Homepage
|
||||||
|
$color-homepage-borders: #e0e0e0;
|
||||||
|
1
mailpoet/assets/img/icons/controls-volumeon.svg
Normal file
1
mailpoet/assets/img/icons/controls-volumeon.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><path d="M2 7h4l5-4v14l-5-4H2V7zm12.69-2.46C14.82 4.59 18 5.92 18 10s-3.18 5.41-3.31 5.46c-.06.03-.13.04-.19.04-.2 0-.39-.12-.46-.31-.11-.26.02-.55.27-.65.11-.05 2.69-1.15 2.69-4.54 0-3.41-2.66-4.53-2.69-4.54-.25-.1-.38-.39-.27-.65.1-.25.39-.38.65-.27zM16 10c0 2.57-2.23 3.43-2.32 3.47-.06.02-.12.03-.18.03-.2 0-.39-.12-.47-.32-.1-.26.04-.55.29-.65.07-.02 1.68-.67 1.68-2.53s-1.61-2.51-1.68-2.53c-.25-.1-.38-.39-.29-.65.1-.25.39-.39.65-.29.09.04 2.32.9 2.32 3.47z"/></g></svg>
|
After Width: | Height: | Size: 587 B |
1
mailpoet/assets/img/icons/image-rotate.svg
Normal file
1
mailpoet/assets/img/icons/image-rotate.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><path d="M10.25 1.02c5.1 0 8.75 4.04 8.75 9s-3.65 9-8.75 9c-3.2 0-6.02-1.59-7.68-3.99l2.59-1.52c1.1 1.5 2.86 2.51 4.84 2.51 3.3 0 6-2.79 6-6s-2.7-6-6-6c-1.97 0-3.72 1-4.82 2.49L7 8.02l-6 2v-7L2.89 4.6c1.69-2.17 4.36-3.58 7.36-3.58z"/></g></svg>
|
After Width: | Height: | Size: 355 B |
@ -18,7 +18,7 @@ import _ from 'underscore';
|
|||||||
*/
|
*/
|
||||||
var eventsCache = [];
|
var eventsCache = [];
|
||||||
|
|
||||||
function track(name, data = []) {
|
function track(name, data = [], options = {}, callback = null) {
|
||||||
let trackedData = data;
|
let trackedData = data;
|
||||||
|
|
||||||
if (typeof window.mixpanel.track !== 'function') {
|
if (typeof window.mixpanel.track !== 'function') {
|
||||||
@ -33,7 +33,7 @@ function track(name, data = []) {
|
|||||||
trackedData['MailPoet Premium version'] = window.mailpoet_premium_version;
|
trackedData['MailPoet Premium version'] = window.mailpoet_premium_version;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.mixpanel.track(name, trackedData);
|
window.mixpanel.track(name, trackedData, options, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
function exportMixpanel() {
|
function exportMixpanel() {
|
||||||
@ -45,24 +45,37 @@ function exportMixpanel() {
|
|||||||
) {
|
) {
|
||||||
window.MailPoet.trackEvent = track;
|
window.MailPoet.trackEvent = track;
|
||||||
} else {
|
} else {
|
||||||
window.MailPoet.trackEvent = function emptyFunction() {};
|
window.MailPoet.trackEvent = function emptyFunction(
|
||||||
|
name,
|
||||||
|
data,
|
||||||
|
options,
|
||||||
|
callback,
|
||||||
|
) {
|
||||||
|
if (typeof callback === 'function') {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function trackCachedEvents() {
|
function trackCachedEvents() {
|
||||||
eventsCache.forEach(function trackIfEnabled(event) {
|
eventsCache.forEach(function trackIfEnabled(event) {
|
||||||
if (window.mailpoet_analytics_enabled || event.forced) {
|
if (window.mailpoet_analytics_enabled || event.forced) {
|
||||||
track(event.name, event.data);
|
track(event.name, event.data, event.options);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function cacheEvent(forced, name, data) {
|
function cacheEvent(forced, name, data, options, callback) {
|
||||||
eventsCache.push({
|
eventsCache.push({
|
||||||
name: name,
|
name: name,
|
||||||
data: data,
|
data: data,
|
||||||
|
options: options,
|
||||||
forced: forced,
|
forced: forced,
|
||||||
});
|
});
|
||||||
|
if (typeof callback === 'function') {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function initializeMixpanelWhenLoaded() {
|
function initializeMixpanelWhenLoaded() {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { Dispatch, SetStateAction, useState } from 'react';
|
||||||
import { Button, DropdownMenu } from '@wordpress/components';
|
import { Button, DropdownMenu } from '@wordpress/components';
|
||||||
import { chevronDown } from '@wordpress/icons';
|
import { chevronDown } from '@wordpress/icons';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
@ -8,7 +9,7 @@ type OptionButtonPropType = {
|
|||||||
variant: Button.ButtonVariant;
|
variant: Button.ButtonVariant;
|
||||||
controls: StepMoreControlsType;
|
controls: StepMoreControlsType;
|
||||||
title: string;
|
title: string;
|
||||||
onClick: () => void;
|
onClick: (setIsBusy: Dispatch<SetStateAction<boolean>>) => void;
|
||||||
};
|
};
|
||||||
export function OptionButton({
|
export function OptionButton({
|
||||||
controls,
|
controls,
|
||||||
@ -16,13 +17,22 @@ export function OptionButton({
|
|||||||
onClick,
|
onClick,
|
||||||
variant,
|
variant,
|
||||||
}: OptionButtonPropType): JSX.Element {
|
}: OptionButtonPropType): JSX.Element {
|
||||||
|
const [isBusy, setIsBusy] = useState(false);
|
||||||
const slots = Object.values(controls).filter((item) => item.slot);
|
const slots = Object.values(controls).filter((item) => item.slot);
|
||||||
|
const dropDownMenuClassNames = isBusy
|
||||||
|
? `mailpoet-option-button-opener is-busy`
|
||||||
|
: `mailpoet-option-button-opener`;
|
||||||
return (
|
return (
|
||||||
<div className="mailpoet-option-button">
|
<div className="mailpoet-option-button">
|
||||||
<Button
|
<Button
|
||||||
|
isBusy={isBusy}
|
||||||
|
disabled={isBusy}
|
||||||
variant={variant}
|
variant={variant}
|
||||||
className="mailpoet-option-button-main"
|
className="mailpoet-option-button-main"
|
||||||
onClick={onClick}
|
onClick={() => {
|
||||||
|
setIsBusy(true);
|
||||||
|
onClick(setIsBusy);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{title}
|
{title}
|
||||||
</Button>
|
</Button>
|
||||||
@ -32,10 +42,20 @@ export function OptionButton({
|
|||||||
))}
|
))}
|
||||||
{Object.values(controls).length > 0 && (
|
{Object.values(controls).length > 0 && (
|
||||||
<DropdownMenu
|
<DropdownMenu
|
||||||
className="mailpoet-option-button-opener"
|
className={dropDownMenuClassNames}
|
||||||
label={__('More', 'mailpoet')}
|
label={__('More', 'mailpoet')}
|
||||||
icon={chevronDown}
|
icon={chevronDown}
|
||||||
controls={Object.values(controls).map((item) => item.control)}
|
controls={Object.values(controls).map((item) => {
|
||||||
|
const control = {
|
||||||
|
...item.control,
|
||||||
|
onClick: () => {
|
||||||
|
setIsBusy(true);
|
||||||
|
item.control.onClick(setIsBusy);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return control;
|
||||||
|
})}
|
||||||
popoverProps={{ position: 'bottom left' }}
|
popoverProps={{ position: 'bottom left' }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { Fragment } from '@wordpress/element';
|
import { Fragment } from '@wordpress/element';
|
||||||
|
import { locale } from '../../config';
|
||||||
|
|
||||||
type Item = {
|
type Item = {
|
||||||
key: string;
|
key: string;
|
||||||
@ -15,7 +16,7 @@ export function Statistics({
|
|||||||
items,
|
items,
|
||||||
labelPosition = 'before',
|
labelPosition = 'before',
|
||||||
}: Props): JSX.Element {
|
}: Props): JSX.Element {
|
||||||
const intl = new Intl.NumberFormat();
|
const intl = new Intl.NumberFormat(locale.toString());
|
||||||
return (
|
return (
|
||||||
<div className="mailpoet-automation-stats">
|
<div className="mailpoet-automation-stats">
|
||||||
{items.map((item, i) => (
|
{items.map((item, i) => (
|
||||||
|
@ -4,9 +4,29 @@ declare global {
|
|||||||
root: string;
|
root: string;
|
||||||
nonce: string;
|
nonce: string;
|
||||||
};
|
};
|
||||||
|
mailpoet_locale_full: string;
|
||||||
mailpoet_automation_count: number;
|
mailpoet_automation_count: number;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const api = window.mailpoet_automation_api;
|
export const api = window.mailpoet_automation_api;
|
||||||
export const automationCount = window.mailpoet_automation_count;
|
export const automationCount = window.mailpoet_automation_count;
|
||||||
|
|
||||||
|
// export locale to use with Intl APIs
|
||||||
|
export const locale: Intl.Locale = (() => {
|
||||||
|
const tag = (
|
||||||
|
window.mailpoet_locale_full ??
|
||||||
|
document.documentElement.lang ??
|
||||||
|
'en'
|
||||||
|
).replace('_', '-');
|
||||||
|
|
||||||
|
try {
|
||||||
|
return new Intl.Locale(tag);
|
||||||
|
} catch (_) {
|
||||||
|
try {
|
||||||
|
return new Intl.Locale(tag.split('-')[0]);
|
||||||
|
} catch (__) {
|
||||||
|
return new Intl.Locale('en');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
import { useState, Fragment } from 'react';
|
import { useState, Fragment } from 'react';
|
||||||
import { DropdownMenu } from '@wordpress/components';
|
import { DropdownMenu } from '@wordpress/components';
|
||||||
import { useSelect } from '@wordpress/data';
|
|
||||||
import { moreVertical, trash } from '@wordpress/icons';
|
import { moreVertical, trash } from '@wordpress/icons';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
import { Hooks } from 'wp-js-hooks';
|
import { Hooks } from 'wp-js-hooks';
|
||||||
import { PremiumModal } from 'common/premium_modal';
|
import { PremiumModal } from 'common/premium_modal';
|
||||||
import { Step as StepData } from './types';
|
import { Step as StepData } from './types';
|
||||||
import { storeName } from '../../store';
|
|
||||||
import { StepMoreControlsType } from '../../../types/filters';
|
import { StepMoreControlsType } from '../../../types/filters';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@ -14,12 +12,6 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function StepMoreMenu({ step }: Props): JSX.Element {
|
export function StepMoreMenu({ step }: Props): JSX.Element {
|
||||||
const { stepType } = useSelect(
|
|
||||||
(select) => ({
|
|
||||||
stepType: select(storeName).getStepType(step.key),
|
|
||||||
}),
|
|
||||||
[step],
|
|
||||||
);
|
|
||||||
const [showModal, setShowModal] = useState(false);
|
const [showModal, setShowModal] = useState(false);
|
||||||
|
|
||||||
const moreControls: StepMoreControlsType = Hooks.applyFilters(
|
const moreControls: StepMoreControlsType = Hooks.applyFilters(
|
||||||
@ -53,7 +45,6 @@ export function StepMoreMenu({ step }: Props): JSX.Element {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
step,
|
step,
|
||||||
stepType,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const slots = Object.values(moreControls).filter(
|
const slots = Object.values(moreControls).filter(
|
||||||
|
@ -21,7 +21,7 @@ const Dropdown: ComponentType<
|
|||||||
}
|
}
|
||||||
> = WpDropdown;
|
> = WpDropdown;
|
||||||
|
|
||||||
export function DocumentActions({ children }): JSX.Element {
|
function DocumentActions({ children }): JSX.Element {
|
||||||
const { automationName, automationStatus, showIconLabels } = useSelect(
|
const { automationName, automationStatus, showIconLabels } = useSelect(
|
||||||
(select) => ({
|
(select) => ({
|
||||||
automationName: select(storeName).getAutomationData().name,
|
automationName: select(storeName).getAutomationData().name,
|
||||||
@ -101,3 +101,6 @@ export function DocumentActions({ children }): JSX.Element {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DocumentActions.displayName = 'DocumentActions';
|
||||||
|
export { DocumentActions };
|
||||||
|
@ -9,6 +9,7 @@ import {
|
|||||||
import { useDispatch, useSelect } from '@wordpress/data';
|
import { useDispatch, useSelect } from '@wordpress/data';
|
||||||
import { createContext } from '@wordpress/element';
|
import { createContext } from '@wordpress/element';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
|
import { ErrorBoundary } from 'common';
|
||||||
import { Chip } from '../chip';
|
import { Chip } from '../chip';
|
||||||
import { ColoredIcon } from '../icons';
|
import { ColoredIcon } from '../icons';
|
||||||
import {
|
import {
|
||||||
@ -70,6 +71,8 @@ function StepError({ stepId }: StepErrorProps): JSX.Element {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StepError.displayName = 'StepError';
|
||||||
|
|
||||||
export function Errors(): JSX.Element | null {
|
export function Errors(): JSX.Element | null {
|
||||||
const [showPopover, setShowPopover] = useState(false);
|
const [showPopover, setShowPopover] = useState(false);
|
||||||
|
|
||||||
@ -160,9 +163,11 @@ export function Errors(): JSX.Element | null {
|
|||||||
__('The following steps are not fully set:', 'mailpoet')
|
__('The following steps are not fully set:', 'mailpoet')
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
<ErrorBoundary>
|
||||||
{stepErrors.map((error) => (
|
{stepErrors.map((error) => (
|
||||||
<StepError key={error.step_id} stepId={error.step_id} />
|
<StepError key={error.step_id} stepId={error.step_id} />
|
||||||
))}
|
))}
|
||||||
|
</ErrorBoundary>
|
||||||
</Composite>
|
</Composite>
|
||||||
</ErrorsCompositeContext.Provider>
|
</ErrorsCompositeContext.Provider>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
@ -8,6 +8,7 @@ import {
|
|||||||
import { dispatch, useDispatch, useSelect } from '@wordpress/data';
|
import { dispatch, useDispatch, useSelect } from '@wordpress/data';
|
||||||
import { PinnedItems } from '@wordpress/interface';
|
import { PinnedItems } from '@wordpress/interface';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
|
import { ErrorBoundary } from 'common';
|
||||||
import { DocumentActions } from './document_actions';
|
import { DocumentActions } from './document_actions';
|
||||||
import { Errors } from './errors';
|
import { Errors } from './errors';
|
||||||
import { InserterToggle } from './inserter_toggle';
|
import { InserterToggle } from './inserter_toggle';
|
||||||
@ -227,6 +228,7 @@ export function Header({ showInserterToggle }: Props): JSX.Element {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="edit-site-header_center">
|
<div className="edit-site-header_center">
|
||||||
|
<ErrorBoundary>
|
||||||
<DocumentActions>
|
<DocumentActions>
|
||||||
{() => (
|
{() => (
|
||||||
<div className="mailpoet-automation-editor-dropdown-name-edit">
|
<div className="mailpoet-automation-editor-dropdown-name-edit">
|
||||||
@ -244,11 +246,14 @@ export function Header({ showInserterToggle }: Props): JSX.Element {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</DocumentActions>
|
</DocumentActions>
|
||||||
|
</ErrorBoundary>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="edit-site-header_end">
|
<div className="edit-site-header_end">
|
||||||
<div className="edit-site-header__actions">
|
<div className="edit-site-header__actions">
|
||||||
|
<ErrorBoundary>
|
||||||
<Errors />
|
<Errors />
|
||||||
|
</ErrorBoundary>
|
||||||
{automationStatus === AutomationStatus.DRAFT && (
|
{automationStatus === AutomationStatus.DRAFT && (
|
||||||
<>
|
<>
|
||||||
<SaveDraftButton />
|
<SaveDraftButton />
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
export * from './panel';
|
||||||
|
export * from './form-token-field';
|
@ -45,7 +45,7 @@ export function InserterPopover(): JSX.Element | null {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Inserter onInsert={onInsert} />
|
<Inserter onInsert={onInsert} showInserterHelpPanel={false} />
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
||||||
{showModal && (
|
{showModal && (
|
||||||
|
@ -20,9 +20,11 @@ const filterItems = (value: string, item: Item[]): Item[] =>
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
onInsert?: (item: Item) => void;
|
onInsert?: (item: Item) => void;
|
||||||
|
showInserterHelpPanel?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Inserter = forwardRef(({ onInsert }: Props, ref): JSX.Element => {
|
export const Inserter = forwardRef(
|
||||||
|
({ onInsert, showInserterHelpPanel = true }: Props, ref): JSX.Element => {
|
||||||
const [filterValue, setFilterValue] = useState('');
|
const [filterValue, setFilterValue] = useState('');
|
||||||
const [hoveredItem, setHoveredItem] = useState(null);
|
const [hoveredItem, setHoveredItem] = useState(null);
|
||||||
|
|
||||||
@ -147,7 +149,10 @@ export const Inserter = forwardRef(({ onInsert }: Props, ref): JSX.Element => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{hoveredItem && <StepInfoPanel item={hoveredItem} />}
|
{showInserterHelpPanel && hoveredItem && (
|
||||||
|
<StepInfoPanel item={hoveredItem} />
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
@ -3,6 +3,7 @@ import { useSelect } from '@wordpress/data';
|
|||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
import { storeName } from '../../../store';
|
import { storeName } from '../../../store';
|
||||||
import { TrashButton } from '../../actions/trash-button';
|
import { TrashButton } from '../../actions/trash-button';
|
||||||
|
import { locale } from '../../../../config';
|
||||||
|
|
||||||
export function AutomationSidebar(): JSX.Element {
|
export function AutomationSidebar(): JSX.Element {
|
||||||
const { automationData } = useSelect(
|
const { automationData } = useSelect(
|
||||||
@ -23,7 +24,7 @@ export function AutomationSidebar(): JSX.Element {
|
|||||||
<PanelRow>
|
<PanelRow>
|
||||||
<strong>Date added</strong>{' '}
|
<strong>Date added</strong>{' '}
|
||||||
{new Date(Date.parse(automationData.created_at)).toLocaleDateString(
|
{new Date(Date.parse(automationData.created_at)).toLocaleDateString(
|
||||||
undefined,
|
locale.toString(),
|
||||||
dateOptions,
|
dateOptions,
|
||||||
)}
|
)}
|
||||||
</PanelRow>
|
</PanelRow>
|
||||||
@ -31,13 +32,13 @@ export function AutomationSidebar(): JSX.Element {
|
|||||||
<strong>Activated</strong>{' '}
|
<strong>Activated</strong>{' '}
|
||||||
{automationData.status === 'active' &&
|
{automationData.status === 'active' &&
|
||||||
new Date(Date.parse(automationData.updated_at)).toLocaleDateString(
|
new Date(Date.parse(automationData.updated_at)).toLocaleDateString(
|
||||||
undefined,
|
locale.toString(),
|
||||||
dateOptions,
|
dateOptions,
|
||||||
)}
|
)}
|
||||||
{automationData.status !== 'active' &&
|
{automationData.status !== 'active' &&
|
||||||
automationData.activated_at &&
|
automationData.activated_at &&
|
||||||
new Date(Date.parse(automationData.activated_at)).toLocaleDateString(
|
new Date(Date.parse(automationData.activated_at)).toLocaleDateString(
|
||||||
undefined,
|
locale.toString(),
|
||||||
dateOptions,
|
dateOptions,
|
||||||
)}
|
)}
|
||||||
{automationData.status !== 'active' && !automationData.activated_at && (
|
{automationData.status !== 'active' && !automationData.activated_at && (
|
||||||
|
@ -3,6 +3,7 @@ import { AutomationEditorWindow, State } from './types';
|
|||||||
declare let window: AutomationEditorWindow;
|
declare let window: AutomationEditorWindow;
|
||||||
|
|
||||||
export const getInitialState = (): State => ({
|
export const getInitialState = (): State => ({
|
||||||
|
registry: { ...window.mailpoet_automation_registry },
|
||||||
context: { ...window.mailpoet_automation_context },
|
context: { ...window.mailpoet_automation_context },
|
||||||
stepTypes: {},
|
stepTypes: {},
|
||||||
automationData: { ...window.mailpoet_automation },
|
automationData: { ...window.mailpoet_automation },
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
import { dispatch } from '@wordpress/data';
|
import { dispatch } from '@wordpress/data';
|
||||||
|
import { Hooks } from 'wp-js-hooks';
|
||||||
import { storeName } from './constants';
|
import { storeName } from './constants';
|
||||||
import { StepType } from './types';
|
import { StepType } from './types';
|
||||||
|
|
||||||
export const registerStepType = (stepType: StepType): void => {
|
export const registerStepType = (stepType: StepType): void => {
|
||||||
dispatch(storeName).registerStepType(stepType);
|
dispatch(storeName).registerStepType(
|
||||||
|
Hooks.applyFilters('mailpoet.automation.register_step_type', stepType),
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,14 @@ import { createRegistrySelector } from '@wordpress/data';
|
|||||||
import { store as interfaceStore } from '@wordpress/interface';
|
import { store as interfaceStore } from '@wordpress/interface';
|
||||||
import { store as preferencesStore } from '@wordpress/preferences';
|
import { store as preferencesStore } from '@wordpress/preferences';
|
||||||
import { storeName } from './constants';
|
import { storeName } from './constants';
|
||||||
import { Context, Errors, Feature, State, StepErrors, StepType } from './types';
|
import {
|
||||||
|
Registry,
|
||||||
|
Errors,
|
||||||
|
Feature,
|
||||||
|
State,
|
||||||
|
StepErrors,
|
||||||
|
StepType,
|
||||||
|
} from './types';
|
||||||
import { Item } from '../components/inserter/item';
|
import { Item } from '../components/inserter/item';
|
||||||
import { Step, Automation } from '../components/automation/types';
|
import { Step, Automation } from '../components/automation/types';
|
||||||
|
|
||||||
@ -25,15 +32,22 @@ export function isActivationPanelOpened(state: State): boolean {
|
|||||||
return state.activationPanel.isOpened;
|
return state.activationPanel.isOpened;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getContext(state: State): Context {
|
export function getRegistry(state: State): Registry {
|
||||||
return state.context;
|
return state.registry;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getContextStep(
|
export function getRegistryStep(
|
||||||
state: State,
|
state: State,
|
||||||
key: string,
|
key: string,
|
||||||
): Context['steps'][number] | undefined {
|
): Registry['steps'][number] | undefined {
|
||||||
return state.context.steps[key];
|
return state.registry.steps[key];
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getContext<T = unknown>(
|
||||||
|
state: State,
|
||||||
|
key: string,
|
||||||
|
): T | undefined {
|
||||||
|
return state.context[key] as T | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSteps(state: State): StepType[] {
|
export function getSteps(state: State): StepType[] {
|
||||||
|
@ -2,11 +2,12 @@ import { ComponentType } from 'react';
|
|||||||
import { Step, Automation } from '../components/automation/types';
|
import { Step, Automation } from '../components/automation/types';
|
||||||
|
|
||||||
export interface AutomationEditorWindow extends Window {
|
export interface AutomationEditorWindow extends Window {
|
||||||
|
mailpoet_automation_registry: Registry;
|
||||||
mailpoet_automation_context: Context;
|
mailpoet_automation_context: Context;
|
||||||
mailpoet_automation: Automation;
|
mailpoet_automation: Automation;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Context = {
|
export type Registry = {
|
||||||
steps: Record<
|
steps: Record<
|
||||||
string,
|
string,
|
||||||
{
|
{
|
||||||
@ -20,6 +21,8 @@ export type Context = {
|
|||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type Context = Record<string, unknown>;
|
||||||
|
|
||||||
export type StepGroup = 'actions' | 'logical' | 'triggers';
|
export type StepGroup = 'actions' | 'logical' | 'triggers';
|
||||||
|
|
||||||
export type StepType = {
|
export type StepType = {
|
||||||
@ -46,6 +49,7 @@ export type Errors = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type State = {
|
export type State = {
|
||||||
|
registry: Registry;
|
||||||
context: Context;
|
context: Context;
|
||||||
stepTypes: Record<string, StepType>;
|
stepTypes: Record<string, StepType>;
|
||||||
automationData: Automation;
|
automationData: Automation;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
// exports for extensibility
|
// exports for extensibility
|
||||||
export { id } from './id';
|
export { id } from './id';
|
||||||
|
export * as config from './config';
|
||||||
export * as EditorStore from './editor/store';
|
export * as EditorStore from './editor/store';
|
||||||
|
@ -19,7 +19,7 @@ export const step: StepType = {
|
|||||||
foreground: '#7F54B3',
|
foreground: '#7F54B3',
|
||||||
background: '#f7edf7',
|
background: '#f7edf7',
|
||||||
description: __(
|
description: __(
|
||||||
'Wait some time before proceeding with the steps below',
|
'Wait some time before proceeding with the steps below.',
|
||||||
'mailpoet',
|
'mailpoet',
|
||||||
),
|
),
|
||||||
subtitle: (data): string => {
|
subtitle: (data): string => {
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
import { select } from '@wordpress/data';
|
||||||
|
import { FormTokenItem } from '../../editor/components';
|
||||||
|
import { storeName } from '../../editor/store';
|
||||||
|
|
||||||
|
type Segment = FormTokenItem & {
|
||||||
|
type: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Context = {
|
||||||
|
segments?: Segment[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getContext = (): Context =>
|
||||||
|
select(storeName).getContext('mailpoet') as Context;
|
@ -2,11 +2,21 @@ import { registerStepType } from '../../editor/store';
|
|||||||
import { step as SendEmailStep } from './steps/send_email';
|
import { step as SendEmailStep } from './steps/send_email';
|
||||||
import { step as SomeoneSubscribesTrigger } from './steps/someone-subscribes';
|
import { step as SomeoneSubscribesTrigger } from './steps/someone-subscribes';
|
||||||
import { step as WpUserRegisteredTrigger } from './steps/wp-user-registered';
|
import { step as WpUserRegisteredTrigger } from './steps/wp-user-registered';
|
||||||
|
import { step as AddTagsAction } from './steps/add_tags';
|
||||||
|
import { step as RemoveTagsAction } from './steps/remove_tags';
|
||||||
|
import { step as AddToListStep } from './steps/add_to_list';
|
||||||
|
import { step as RemoveFromListStep } from './steps/remove_from_list';
|
||||||
|
import { step as UpdateSubscriberStep } from './steps/update-subscriber';
|
||||||
import { registerStepControls } from './step-controls';
|
import { registerStepControls } from './step-controls';
|
||||||
|
|
||||||
export const initialize = (): void => {
|
export const initialize = (): void => {
|
||||||
registerStepType(SendEmailStep);
|
registerStepType(SendEmailStep);
|
||||||
registerStepType(WpUserRegisteredTrigger);
|
registerStepType(WpUserRegisteredTrigger);
|
||||||
registerStepType(SomeoneSubscribesTrigger);
|
registerStepType(SomeoneSubscribesTrigger);
|
||||||
|
registerStepType(AddTagsAction);
|
||||||
|
registerStepType(RemoveTagsAction);
|
||||||
|
registerStepType(AddToListStep);
|
||||||
|
registerStepType(RemoveFromListStep);
|
||||||
|
registerStepType(UpdateSubscriberStep);
|
||||||
registerStepControls();
|
registerStepControls();
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,6 @@ import { __ } from '@wordpress/i18n';
|
|||||||
import { chartBar } from '@wordpress/icons';
|
import { chartBar } from '@wordpress/icons';
|
||||||
import { Hooks } from 'wp-js-hooks';
|
import { Hooks } from 'wp-js-hooks';
|
||||||
import { MoreControlType, StepMoreControlsType } from '../../../types/filters';
|
import { MoreControlType, StepMoreControlsType } from '../../../types/filters';
|
||||||
import { StepType } from '../../../editor/store';
|
|
||||||
import { Step } from '../../../editor/components/automation/types';
|
import { Step } from '../../../editor/components/automation/types';
|
||||||
|
|
||||||
const emailStatisticsControl = (step: Step): MoreControlType => {
|
const emailStatisticsControl = (step: Step): MoreControlType => {
|
||||||
@ -30,12 +29,8 @@ export function registerStepControls() {
|
|||||||
Hooks.addFilter(
|
Hooks.addFilter(
|
||||||
'mailpoet.automation.step.more-controls',
|
'mailpoet.automation.step.more-controls',
|
||||||
'mailpoet',
|
'mailpoet',
|
||||||
(
|
(controls: StepMoreControlsType, step: Step): StepMoreControlsType => {
|
||||||
controls: StepMoreControlsType,
|
if (step.key === 'mailpoet:send-email') {
|
||||||
step: Step,
|
|
||||||
stepType: StepType,
|
|
||||||
): StepMoreControlsType => {
|
|
||||||
if (stepType.key === 'mailpoet:send-email') {
|
|
||||||
return {
|
return {
|
||||||
statistics: emailStatisticsControl(step),
|
statistics: emailStatisticsControl(step),
|
||||||
...controls,
|
...controls,
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
import { __ } from '@wordpress/i18n';
|
||||||
|
import { tag } from '@wordpress/icons';
|
||||||
|
import { StepType } from '../../../../editor/store';
|
||||||
|
import { LockedBadge } from '../../../../../common/premium_modal/locked_badge';
|
||||||
|
import { PremiumModalForStepEdit } from '../../../../../common/premium_modal';
|
||||||
|
|
||||||
|
export const step: StepType = {
|
||||||
|
key: 'mailpoet:add-tag',
|
||||||
|
group: 'actions',
|
||||||
|
title: __('Add tag', 'mailpoet'),
|
||||||
|
description: __('Add a tag or multiple tags to a subscriber.', 'mailpoet'),
|
||||||
|
subtitle: () => <LockedBadge text={__('Premium', 'mailpoet')} />,
|
||||||
|
foreground: '#00A32A',
|
||||||
|
background: '#EDFAEF',
|
||||||
|
icon: () => (
|
||||||
|
<div style={{ width: '100%', height: '100%', scale: '1.4' }}>{tag}</div>
|
||||||
|
),
|
||||||
|
edit: () => (
|
||||||
|
<PremiumModalForStepEdit
|
||||||
|
tracking={{
|
||||||
|
utm_medium: 'upsell_modal',
|
||||||
|
utm_campaign: 'create_automation_editor_add_tag',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{__('Adding tags is a premium feature.', 'mailpoet')}
|
||||||
|
</PremiumModalForStepEdit>
|
||||||
|
),
|
||||||
|
} as const;
|
@ -0,0 +1,28 @@
|
|||||||
|
import { __ } from '@wordpress/i18n';
|
||||||
|
import { list } from '@wordpress/icons';
|
||||||
|
import { StepType } from '../../../../editor/store/types';
|
||||||
|
import { PremiumModalForStepEdit } from '../../../../../common/premium_modal';
|
||||||
|
import { LockedBadge } from '../../../../../common/premium_modal/locked_badge';
|
||||||
|
|
||||||
|
export const step: StepType = {
|
||||||
|
key: 'mailpoet:add-to-list',
|
||||||
|
group: 'actions',
|
||||||
|
title: __('Add to list', 'mailpoet'),
|
||||||
|
description: __('Add a subscriber to a list.', 'mailpoet'),
|
||||||
|
subtitle: () => <LockedBadge text={__('Premium', 'mailpoet')} />,
|
||||||
|
foreground: '#00A32A',
|
||||||
|
background: '#EDFAEF',
|
||||||
|
icon: () => (
|
||||||
|
<div style={{ width: '100%', height: '100%', scale: '1.12' }}>{list}</div>
|
||||||
|
),
|
||||||
|
edit: () => (
|
||||||
|
<PremiumModalForStepEdit
|
||||||
|
tracking={{
|
||||||
|
utm_medium: 'upsell_modal',
|
||||||
|
utm_campaign: 'create_automation_editor_add_to_list',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{__('Adding subscribers to lists is a premium feature.', 'mailpoet')}
|
||||||
|
</PremiumModalForStepEdit>
|
||||||
|
),
|
||||||
|
} as const;
|
@ -0,0 +1,28 @@
|
|||||||
|
import { __ } from '@wordpress/i18n';
|
||||||
|
import { list } from '@wordpress/icons';
|
||||||
|
import { StepType } from '../../../../editor/store/types';
|
||||||
|
import { PremiumModalForStepEdit } from '../../../../../common/premium_modal';
|
||||||
|
import { LockedBadge } from '../../../../../common/premium_modal/locked_badge';
|
||||||
|
|
||||||
|
export const step: StepType = {
|
||||||
|
key: 'mailpoet:remove-from-list',
|
||||||
|
group: 'actions',
|
||||||
|
title: __('Remove from list', 'mailpoet'),
|
||||||
|
description: __('Remove a subscriber from a list.', 'mailpoet'),
|
||||||
|
subtitle: () => <LockedBadge text={__('Premium', 'mailpoet')} />,
|
||||||
|
foreground: '#00A32A',
|
||||||
|
background: '#EDFAEF',
|
||||||
|
icon: () => (
|
||||||
|
<div style={{ width: '100%', height: '100%', scale: '1.12' }}>{list}</div>
|
||||||
|
),
|
||||||
|
edit: () => (
|
||||||
|
<PremiumModalForStepEdit
|
||||||
|
tracking={{
|
||||||
|
utm_medium: 'upsell_modal',
|
||||||
|
utm_campaign: 'create_automation_editor_remove_from_list',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{__('Removing subscribers from lists is a premium feature.', 'mailpoet')}
|
||||||
|
</PremiumModalForStepEdit>
|
||||||
|
),
|
||||||
|
} as const;
|
@ -0,0 +1,31 @@
|
|||||||
|
import { __ } from '@wordpress/i18n';
|
||||||
|
import { tag } from '@wordpress/icons';
|
||||||
|
import { StepType } from '../../../../editor/store';
|
||||||
|
import { LockedBadge } from '../../../../../common/premium_modal/locked_badge';
|
||||||
|
import { PremiumModalForStepEdit } from '../../../../../common/premium_modal';
|
||||||
|
|
||||||
|
export const step: StepType = {
|
||||||
|
key: 'mailpoet:remove-tag',
|
||||||
|
group: 'actions',
|
||||||
|
title: __('Remove tag', 'mailpoet'),
|
||||||
|
description: __(
|
||||||
|
'Remove a tag or multiple tags from a subscriber.',
|
||||||
|
'mailpoet',
|
||||||
|
),
|
||||||
|
subtitle: () => <LockedBadge text={__('Premium', 'mailpoet')} />,
|
||||||
|
foreground: '#00A32A',
|
||||||
|
background: '#EDFAEF',
|
||||||
|
icon: () => (
|
||||||
|
<div style={{ width: '100%', height: '100%', scale: '1.4' }}>{tag}</div>
|
||||||
|
),
|
||||||
|
edit: () => (
|
||||||
|
<PremiumModalForStepEdit
|
||||||
|
tracking={{
|
||||||
|
utm_medium: 'upsell_modal',
|
||||||
|
utm_campaign: 'create_automation_editor_remove_tag',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{__('Removing tags is a premium feature.', 'mailpoet')}
|
||||||
|
</PremiumModalForStepEdit>
|
||||||
|
),
|
||||||
|
} as const;
|
@ -11,9 +11,9 @@ type ReplyToArgs = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function ReplyToPanel(): JSX.Element {
|
export function ReplyToPanel(): JSX.Element {
|
||||||
const { context, selectedStep, errors } = useSelect(
|
const { registry, selectedStep, errors } = useSelect(
|
||||||
(select) => ({
|
(select) => ({
|
||||||
context: select(storeName).getContext(),
|
registry: select(storeName).getRegistry(),
|
||||||
selectedStep: select(storeName).getSelectedStep(),
|
selectedStep: select(storeName).getSelectedStep(),
|
||||||
errors: select(storeName).getStepError(
|
errors: select(storeName).getStepError(
|
||||||
select(storeName).getSelectedStep().id,
|
select(storeName).getSelectedStep().id,
|
||||||
@ -30,10 +30,10 @@ export function ReplyToPanel(): JSX.Element {
|
|||||||
const prevValue = useRef<{ name?: string; address?: string }>();
|
const prevValue = useRef<{ name?: string; address?: string }>();
|
||||||
|
|
||||||
// defaults
|
// defaults
|
||||||
const argsContext =
|
const argsSchema =
|
||||||
context.steps['mailpoet:send-email']?.args_schema?.properties ?? {};
|
registry.steps['mailpoet:send-email']?.args_schema?.properties ?? {};
|
||||||
const defaultName = argsContext.reply_to_name?.default;
|
const defaultName = argsSchema.reply_to_name?.default;
|
||||||
const defaultAddress = argsContext.reply_to_address?.default;
|
const defaultAddress = argsSchema.reply_to_address?.default;
|
||||||
|
|
||||||
const errorFields = errors?.fields ?? {};
|
const errorFields = errors?.fields ?? {};
|
||||||
const replyToNameError = errorFields?.reply_to_name ?? '';
|
const replyToNameError = errorFields?.reply_to_name ?? '';
|
||||||
|
@ -9,7 +9,7 @@ export const step: StepType = {
|
|||||||
key: 'mailpoet:send-email',
|
key: 'mailpoet:send-email',
|
||||||
group: 'actions',
|
group: 'actions',
|
||||||
title: __('Send email', 'mailpoet'),
|
title: __('Send email', 'mailpoet'),
|
||||||
description: __('An email will be sent to subscriber', 'mailpoet'),
|
description: __('An email will be sent to subscriber.', 'mailpoet'),
|
||||||
subtitle: (data) =>
|
subtitle: (data) =>
|
||||||
(data.args.name as string) ?? __('Send email', 'mailpoet'),
|
(data.args.name as string) ?? __('Send email', 'mailpoet'),
|
||||||
foreground: '#996800',
|
foreground: '#996800',
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
import { PanelBody } from '@wordpress/components';
|
import { PanelBody } from '@wordpress/components';
|
||||||
import { dispatch, useSelect } from '@wordpress/data';
|
import { dispatch, useSelect } from '@wordpress/data';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
|
import { getContext } from '../../../context';
|
||||||
import { storeName } from '../../../../../editor/store';
|
import { storeName } from '../../../../../editor/store';
|
||||||
import { segments } from './segment';
|
import {
|
||||||
import { PlainBodyTitle } from '../../../../../editor/components/panel';
|
PlainBodyTitle,
|
||||||
import { FormTokenField } from '../../../components/form-token-field';
|
FormTokenField,
|
||||||
|
} from '../../../../../editor/components';
|
||||||
|
|
||||||
export function ListPanel(): JSX.Element {
|
export function ListPanel(): JSX.Element {
|
||||||
const { selectedStep } = useSelect(
|
const { selectedStep } = useSelect(
|
||||||
@ -18,7 +20,7 @@ export function ListPanel(): JSX.Element {
|
|||||||
? (selectedStep.args.segment_ids as number[])
|
? (selectedStep.args.segment_ids as number[])
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
const validSegments = segments.filter(
|
const validSegments = getContext().segments.filter(
|
||||||
(segment) => segment.type === 'default',
|
(segment) => segment.type === 'default',
|
||||||
);
|
);
|
||||||
const selected = validSegments.filter((segment): boolean =>
|
const selected = validSegments.filter((segment): boolean =>
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
import { FormTokenItem } from '../../../components/form-token-field';
|
|
||||||
|
|
||||||
type Segment = FormTokenItem & {
|
|
||||||
type: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
declare global {
|
|
||||||
interface Window {
|
|
||||||
mailpoet_segments: Segment[];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export const segments = window.mailpoet_segments;
|
|
@ -0,0 +1,33 @@
|
|||||||
|
import { __ } from '@wordpress/i18n';
|
||||||
|
import { postAuthor } from '@wordpress/icons';
|
||||||
|
import { StepType } from '../../../../editor/store/types';
|
||||||
|
import { PremiumModalForStepEdit } from '../../../../../common/premium_modal';
|
||||||
|
import { LockedBadge } from '../../../../../common/premium_modal/locked_badge';
|
||||||
|
|
||||||
|
export const step: StepType = {
|
||||||
|
key: 'mailpoet:update-subscriber',
|
||||||
|
group: 'actions',
|
||||||
|
title: __('Update subscriber', 'mailpoet'),
|
||||||
|
description: __(
|
||||||
|
'Update the subscriber’s custom field to a specific value.',
|
||||||
|
'mailpoet',
|
||||||
|
),
|
||||||
|
subtitle: () => <LockedBadge text={__('Premium', 'mailpoet')} />,
|
||||||
|
foreground: '#00A32A',
|
||||||
|
background: '#EDFAEF',
|
||||||
|
icon: () => (
|
||||||
|
<div style={{ width: '100%', height: '100%', scale: '1.3' }}>
|
||||||
|
{postAuthor}
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
edit: () => (
|
||||||
|
<PremiumModalForStepEdit
|
||||||
|
tracking={{
|
||||||
|
utm_medium: 'upsell_modal',
|
||||||
|
utm_campaign: 'create_automation_editor_update_subscriber',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{__('Updating subscribers is a premium feature.', 'mailpoet')}
|
||||||
|
</PremiumModalForStepEdit>
|
||||||
|
),
|
||||||
|
} as const;
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user