Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
f0b779d724 |
@ -78,16 +78,11 @@ anchors:
|
||||
- static_analysis_php8
|
||||
<<: *only_trunk_and_release
|
||||
|
||||
command_add_github_key: &command_add_github_key
|
||||
command: |
|
||||
# Add GitHub to known_hosts (for jobs without a checkout step that need to clone repos)
|
||||
echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=" >> ~/.ssh/known_hosts
|
||||
|
||||
executors:
|
||||
wpcli_php_oldest:
|
||||
<<: *default_job_config
|
||||
docker:
|
||||
- image: mailpoet/wordpress:7.3_20230518.1
|
||||
- image: mailpoet/wordpress:7.2_20220309.1
|
||||
|
||||
wpcli_php_max_wporg:
|
||||
<<: *default_job_config
|
||||
@ -97,18 +92,18 @@ executors:
|
||||
wpcli_php_latest:
|
||||
<<: *default_job_config
|
||||
docker:
|
||||
- image: mailpoet/wordpress:8.1_20230307.1
|
||||
- image: mailpoet/wordpress:8.1_20220718.1
|
||||
|
||||
wpcli_php_mysql_oldest:
|
||||
<<: *default_job_config
|
||||
docker:
|
||||
- image: mailpoet/wordpress:7.3_20230518.1
|
||||
- image: mailpoet/wordpress:7.2_20220309.1
|
||||
- image: cimg/mysql:5.7
|
||||
|
||||
wpcli_php_mysql_latest:
|
||||
<<: *default_job_config
|
||||
docker:
|
||||
- image: mailpoet/wordpress:8.1_20230307.1
|
||||
- image: mailpoet/wordpress:8.1_20220718.1
|
||||
- image: cimg/mysql:8.0
|
||||
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_520_ci
|
||||
|
||||
@ -184,11 +179,10 @@ jobs:
|
||||
- run:
|
||||
name: Download additional WP Plugins for tests
|
||||
command: |
|
||||
./do download:woo-commerce-zip latest
|
||||
./do download:woo-commerce-subscriptions-zip 4.9.1
|
||||
./do download:woo-commerce-memberships-zip 1.24.0
|
||||
./do download:woo-commerce-blocks-zip 9.6.2
|
||||
./do download:automate-woo-zip 5.6.8
|
||||
./do download:woo-commerce-zip 7.0.1
|
||||
./do download:woo-commerce-subscriptions-zip 4.6.0
|
||||
./do download:woo-commerce-memberships-zip 1.23.1
|
||||
./do download:woo-commerce-blocks-zip 8.8.2
|
||||
- run:
|
||||
name: Dump tests ENV variables for acceptance tests
|
||||
command: |
|
||||
@ -206,12 +200,11 @@ jobs:
|
||||
- attach_workspace:
|
||||
at: /home/circleci
|
||||
- add_ssh_keys
|
||||
- run:
|
||||
name: 'Add GitHub to known_hosts'
|
||||
<<: *command_add_github_key
|
||||
- run:
|
||||
name: 'Install Premium plugin'
|
||||
command: |
|
||||
# Add GitHub to known_hosts because there is no checkout step in this job
|
||||
echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==" >> ~/.ssh/known_hosts
|
||||
git clone ${MAILPOET_PREMIUM_REPO_URL} mailpoet-premium
|
||||
- restore_cache:
|
||||
key: premium-tools-{{ checksum "mailpoet-premium/tools/install.php" }}
|
||||
@ -256,26 +249,6 @@ jobs:
|
||||
- run:
|
||||
name: 'Static analysis'
|
||||
command: ./do qa:phpstan --php-version=<< parameters.php_version >>
|
||||
security_analysis:
|
||||
working_directory: /home/circleci/mailpoet/mailpoet
|
||||
machine:
|
||||
image: ubuntu-2204:2022.10.2
|
||||
docker_layer_caching: false
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/circleci
|
||||
- add_ssh_keys
|
||||
- run:
|
||||
name: 'Add GitHub to known_hosts'
|
||||
<<: *command_add_github_key
|
||||
- run:
|
||||
name: 'Set up PHP'
|
||||
command: |
|
||||
sudo apt update
|
||||
sudo apt install -y php8.1-cli
|
||||
- run:
|
||||
name: 'QA Security'
|
||||
command: ./do qa:semgrep
|
||||
qa_js:
|
||||
executor: wpcli_php_latest
|
||||
working_directory: /home/circleci/mailpoet/mailpoet
|
||||
@ -338,8 +311,7 @@ jobs:
|
||||
parallelism: 20
|
||||
working_directory: /home/circleci/mailpoet/mailpoet
|
||||
machine:
|
||||
image: ubuntu-2204:2022.10.2
|
||||
docker_layer_caching: false
|
||||
image: ubuntu-2204:2022.07.1
|
||||
parameters:
|
||||
multisite:
|
||||
type: integer
|
||||
@ -350,7 +322,7 @@ jobs:
|
||||
mysql_command:
|
||||
type: string
|
||||
default: ''
|
||||
mysql_image:
|
||||
mysql_image_version:
|
||||
type: string
|
||||
default: ''
|
||||
codeception_image_version:
|
||||
@ -371,9 +343,6 @@ jobs:
|
||||
woo_blocks_version:
|
||||
type: string
|
||||
default: ''
|
||||
automate_woo_version:
|
||||
type: string
|
||||
default: ''
|
||||
enable_cot:
|
||||
type: integer
|
||||
default: 0
|
||||
@ -382,7 +351,7 @@ jobs:
|
||||
default: 0
|
||||
environment:
|
||||
MYSQL_COMMAND: << parameters.mysql_command >>
|
||||
MYSQL_IMAGE: << parameters.mysql_image >>
|
||||
MYSQL_IMAGE_VERSION: << parameters.mysql_image_version >>
|
||||
CODECEPTION_IMAGE_VERSION: << parameters.codeception_image_version >>
|
||||
WORDPRESS_IMAGE_VERSION: << parameters.wordpress_image_version >>
|
||||
steps:
|
||||
@ -395,18 +364,6 @@ jobs:
|
||||
name: 'Pull test docker images'
|
||||
# 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
|
||||
- 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:
|
||||
# Some tools we use may need different version based on PHP version used in docker
|
||||
name: Ensure correct versions of tools
|
||||
command: |
|
||||
cd tests/docker
|
||||
docker-compose run --rm -w /project -e COMPOSER_DEV_MODE=1 --entrypoint "php tools/install.php" codeception_acceptance
|
||||
- when:
|
||||
condition: << parameters.woo_core_version >>
|
||||
steps:
|
||||
@ -439,14 +396,6 @@ jobs:
|
||||
command: |
|
||||
cd tests/docker
|
||||
docker-compose run --rm -w /project --entrypoint "./do download:woo-commerce-blocks-zip << parameters.woo_blocks_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_acceptance
|
||||
- when:
|
||||
condition: << parameters.automate_woo_version >>
|
||||
steps:
|
||||
- run:
|
||||
name: Download AutomateWoo
|
||||
command: |
|
||||
cd tests/docker
|
||||
docker-compose run --rm -w /project --entrypoint "./do download:automate-woo-zip << parameters.automate_woo_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_acceptance
|
||||
- run:
|
||||
name: Group acceptance tests
|
||||
command: |
|
||||
@ -493,67 +442,6 @@ jobs:
|
||||
path: tests/_output
|
||||
- store_test_results:
|
||||
path: tests/_output
|
||||
performance_tests:
|
||||
working_directory: /home/circleci/mailpoet/mailpoet
|
||||
machine:
|
||||
image: ubuntu-2204:2022.10.2
|
||||
docker_layer_caching: false
|
||||
parameters:
|
||||
mysql_command:
|
||||
type: string
|
||||
default: ''
|
||||
mysql_image:
|
||||
type: string
|
||||
default: ''
|
||||
wordpress_image_version:
|
||||
type: string
|
||||
default: ''
|
||||
url:
|
||||
type: string
|
||||
default: 'http://localhost:9500'
|
||||
pw:
|
||||
type: string
|
||||
default: 'password'
|
||||
scenario:
|
||||
type: string
|
||||
default: 'pullrequests'
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/circleci
|
||||
- run:
|
||||
name: 'Set up PHP'
|
||||
command: |
|
||||
sudo apt update
|
||||
sudo apt install -y php8.1-cli
|
||||
- run:
|
||||
name: 'Pull test docker images'
|
||||
# Pull docker images with 3 retries
|
||||
command: i='0';while ! docker-compose -f tests/performance/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/performance
|
||||
docker-compose create || docker-compose create
|
||||
- run:
|
||||
name: Run performance tests
|
||||
command: |
|
||||
mkdir -p tests/performance/_output
|
||||
mkdir -p tests/performance/_screenshots
|
||||
./do test:performance --url=<< parameters.url >> --pw=<< parameters.pw >> --scenario=<< parameters.scenario >>
|
||||
- run:
|
||||
name: Check exceptions
|
||||
command: |
|
||||
if [ "$(ls tests/performance/_output/exceptions/*.html)" ]; then
|
||||
echo "There were some exceptions during the tests run"
|
||||
exit 1
|
||||
fi
|
||||
- store_artifacts:
|
||||
path: tests/performance/_output
|
||||
- store_artifacts:
|
||||
path: tests/performance/_screenshots
|
||||
- store_test_results:
|
||||
path: tests/performance/_output
|
||||
unit_tests:
|
||||
working_directory: /home/circleci/mailpoet/mailpoet
|
||||
parameters:
|
||||
@ -570,10 +458,6 @@ jobs:
|
||||
- run:
|
||||
name: 'Prepare example.com for testing'
|
||||
command: echo 127.0.0.1 example.com | sudo tee -a /etc/hosts
|
||||
- run:
|
||||
# Some tools we use may need different version based on PHP version used in docker
|
||||
name: Ensure correct versions of tools
|
||||
command: COMPOSER_DEV_MODE=1 php tools/install.php
|
||||
- run:
|
||||
name: 'Set up test environment'
|
||||
command: source ../.circleci/setup.bash && setup php7
|
||||
@ -592,12 +476,9 @@ jobs:
|
||||
integration_tests:
|
||||
working_directory: /home/circleci/mailpoet/mailpoet
|
||||
machine:
|
||||
image: ubuntu-2204:2022.10.2
|
||||
docker_layer_caching: false
|
||||
image: ubuntu-2204:2022.07.1
|
||||
environment:
|
||||
CODECEPTION_IMAGE_VERSION: << parameters.codeception_image_version >>
|
||||
MYSQL_COMMAND: << parameters.mysql_command >>
|
||||
MYSQL_IMAGE: << parameters.mysql_image >>
|
||||
parameters:
|
||||
codeception_image_version:
|
||||
type: string
|
||||
@ -620,27 +501,9 @@ jobs:
|
||||
multisite:
|
||||
type: integer
|
||||
default: 0
|
||||
mysql_command:
|
||||
type: string
|
||||
default: ''
|
||||
mysql_image:
|
||||
type: string
|
||||
default: ''
|
||||
woo_core_version:
|
||||
type: string
|
||||
default: ''
|
||||
woo_subscriptions_version:
|
||||
type: string
|
||||
default: ''
|
||||
woo_memberships_version:
|
||||
type: string
|
||||
default: ''
|
||||
woo_blocks_version:
|
||||
type: string
|
||||
default: ''
|
||||
automate_woo_version:
|
||||
type: string
|
||||
default: ''
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/circleci
|
||||
@ -648,18 +511,6 @@ jobs:
|
||||
name: 'Pull test docker images'
|
||||
# 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
|
||||
- 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:
|
||||
# Some tools we use may need different version based on PHP version used in docker
|
||||
name: Ensure correct versions of tools
|
||||
command: |
|
||||
cd tests/docker
|
||||
docker-compose run --rm -w /project -e COMPOSER_DEV_MODE=1 --entrypoint "php tools/install.php" codeception_integration
|
||||
- when:
|
||||
condition: << parameters.woo_core_version >>
|
||||
steps:
|
||||
@ -667,39 +518,7 @@ jobs:
|
||||
name: Download WooCommerce Core
|
||||
command: |
|
||||
cd tests/docker
|
||||
docker-compose run --rm -w /project --entrypoint "./do download:woo-commerce-zip << parameters.woo_core_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_integration
|
||||
- when:
|
||||
condition: << parameters.woo_subscriptions_version >>
|
||||
steps:
|
||||
- run:
|
||||
name: Download WooCommerce Subscriptions
|
||||
command: |
|
||||
cd tests/docker
|
||||
docker-compose run --rm -w /project --entrypoint "./do download:woo-commerce-subscriptions-zip << parameters.woo_subscriptions_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_integration
|
||||
- when:
|
||||
condition: << parameters.woo_memberships_version >>
|
||||
steps:
|
||||
- run:
|
||||
name: Download WooCommerce Memberships
|
||||
command: |
|
||||
cd tests/docker
|
||||
docker-compose run --rm -w /project --entrypoint "./do download:woo-commerce-memberships-zip << parameters.woo_memberships_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_integration
|
||||
- when:
|
||||
condition: << parameters.woo_blocks_version >>
|
||||
steps:
|
||||
- run:
|
||||
name: Download WooCommerce Blocks
|
||||
command: |
|
||||
cd tests/docker
|
||||
docker-compose run --rm -w /project --entrypoint "./do download:woo-commerce-blocks-zip << parameters.woo_blocks_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_integration
|
||||
- when:
|
||||
condition: << parameters.automate_woo_version >>
|
||||
steps:
|
||||
- run:
|
||||
name: Download AutomateWoo
|
||||
command: |
|
||||
cd tests/docker
|
||||
docker-compose run --rm -w /project --entrypoint "./do download:automate-woo-zip << parameters.automate_woo_version >>" --no-deps -e WP_GITHUB_USERNAME=${WP_GITHUB_USERNAME} -e WP_GITHUB_TOKEN=${WP_GITHUB_TOKEN} codeception_integration
|
||||
docker-compose run --rm -w /project --entrypoint "./do download:woo-commerce-zip << parameters.woo_core_version >>" --no-deps codeception_integration
|
||||
- run:
|
||||
name: 'PHP Integration tests'
|
||||
command: |
|
||||
@ -792,10 +611,6 @@ workflows:
|
||||
php_version: 80000
|
||||
requires:
|
||||
- build
|
||||
- security_analysis:
|
||||
<<: *slack-fail-post-step
|
||||
requires:
|
||||
- build
|
||||
- qa_js:
|
||||
<<: *slack-fail-post-step
|
||||
requires:
|
||||
@ -814,7 +629,7 @@ workflows:
|
||||
- build
|
||||
- acceptance_tests:
|
||||
<<: *slack-fail-post-step
|
||||
name: acceptance_tests_base_and_woo_cot_off
|
||||
name: acceptance_tests
|
||||
requires:
|
||||
- unit_tests
|
||||
- static_analysis_php8
|
||||
@ -826,6 +641,7 @@ workflows:
|
||||
group: woo
|
||||
enable_cot: 1
|
||||
enable_cot_sync: 1
|
||||
woo_core_version: 7.1.0-rc.2 # Temporarily force COT beta version
|
||||
requires:
|
||||
- unit_tests
|
||||
- static_analysis_php8
|
||||
@ -837,14 +653,17 @@ workflows:
|
||||
group: woo
|
||||
enable_cot: 1
|
||||
enable_cot_sync: 0
|
||||
woo_core_version: 7.1.0-rc.2 # Temporarily force COT beta version
|
||||
requires:
|
||||
- unit_tests
|
||||
- static_analysis_php8
|
||||
- qa_js
|
||||
- qa_php
|
||||
- performance_tests:
|
||||
- acceptance_tests:
|
||||
<<: *slack-fail-post-step
|
||||
name: performance_tests
|
||||
name: acceptance_tests_woo_cot_off
|
||||
group: woo
|
||||
woo_core_version: 7.1.0-rc.2 # Temporarily force COT beta version
|
||||
requires:
|
||||
- unit_tests
|
||||
- static_analysis_php8
|
||||
@ -854,11 +673,21 @@ workflows:
|
||||
<<: *slack-fail-post-step
|
||||
requires:
|
||||
- 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:
|
||||
<<: *slack-fail-post-step
|
||||
group: woo
|
||||
enable_cot: 1
|
||||
enable_cot_sync: 1
|
||||
woo_core_version: 7.1.0-rc.2 # Temporarily force COT beta version
|
||||
name: integration_test_woo_cot_sync
|
||||
requires:
|
||||
- unit_tests
|
||||
@ -870,6 +699,7 @@ workflows:
|
||||
group: woo
|
||||
enable_cot: 1
|
||||
enable_cot_sync: 0
|
||||
woo_core_version: 7.1.0-rc.2 # Temporarily force COT beta version
|
||||
name: integration_test_woo_cot_no_sync
|
||||
requires:
|
||||
- unit_tests
|
||||
@ -879,6 +709,7 @@ workflows:
|
||||
- integration_tests:
|
||||
<<: *slack-fail-post-step
|
||||
group: woo
|
||||
woo_core_version: 7.1.0-rc.2 # Temporarily force COT beta version
|
||||
name: integration_test_woo_cot_off
|
||||
requires:
|
||||
- unit_tests
|
||||
@ -914,15 +745,16 @@ workflows:
|
||||
<<: *slack-fail-post-step
|
||||
requires:
|
||||
- build
|
||||
- acceptance_tests_base_and_woo_cot_off
|
||||
- acceptance_tests
|
||||
- js_tests
|
||||
- integration_test_woocommerce
|
||||
- integration_test_base
|
||||
- integration_test_woo_cot_no_sync
|
||||
- integration_test_woo_cot_off
|
||||
- integration_test_woo_cot_sync
|
||||
- acceptance_tests_woo_cot_sync
|
||||
- acceptance_tests_woo_cot_off
|
||||
- acceptance_tests_woo_cot_no_sync
|
||||
- performance_tests
|
||||
|
||||
nightly:
|
||||
triggers:
|
||||
@ -942,29 +774,19 @@ workflows:
|
||||
woo_subscriptions_version: latest
|
||||
woo_memberships_version: latest
|
||||
woo_blocks_version: latest
|
||||
automate_woo_version: latest
|
||||
requires:
|
||||
- build
|
||||
- acceptance_tests:
|
||||
<<: *slack-fail-post-step
|
||||
name: acceptance_oldest
|
||||
woo_core_version: 7.6.0
|
||||
woo_core_version: 6.8.0
|
||||
woo_subscriptions_version: 4.3.0
|
||||
woo_memberships_version: 1.21.0
|
||||
woo_blocks_version: 6.8.0
|
||||
automate_woo_version: 5.1.1
|
||||
mysql_command: --max_allowed_packet=100M --default-storage-engine=MYISAM
|
||||
mysql_image: mysql:5.5
|
||||
mysql_command: --max_allowed_packet=100M
|
||||
mysql_image_version: 5.7.36
|
||||
codeception_image_version: 7.4-cli_20220605.0
|
||||
wordpress_image_version: wp-6.0_php7.4_20230425.1
|
||||
requires:
|
||||
- build
|
||||
- performance_tests:
|
||||
<<: *slack-fail-post-step
|
||||
name: performance_latest
|
||||
url: https://mpperftesting.mystagingwebsite.com
|
||||
pw: $WP_TEST_PERFORMANCE_PW
|
||||
scenario: nightlytests
|
||||
wordpress_image_version: wp-5.8_php7.3_20221104.1
|
||||
requires:
|
||||
- build
|
||||
- unit_tests:
|
||||
@ -986,14 +808,7 @@ workflows:
|
||||
- integration_tests:
|
||||
<<: *slack-fail-post-step
|
||||
name: integration_oldest
|
||||
woo_core_version: 7.6.0
|
||||
woo_subscriptions_version: 4.3.0
|
||||
woo_memberships_version: 1.21.0
|
||||
woo_blocks_version: 6.8.0
|
||||
automate_woo_version: 5.1.1
|
||||
codeception_image_version: 7.3-cli_20230516.0
|
||||
mysql_command: --max_allowed_packet=100M --default-storage-engine=MYISAM
|
||||
mysql_image: mysql:5.5
|
||||
codeception_image_version: 7.2-cli_20220605.0
|
||||
requires:
|
||||
- build
|
||||
- build_premium:
|
||||
|
@ -1,23 +0,0 @@
|
||||
import * as fs from 'fs/promises';
|
||||
import * as os from 'os';
|
||||
|
||||
// Get logical CPU count for a container on CircleCI. Adapted from:
|
||||
// https://circleci.canny.io/cloud-feature-requests/p/have-nproc-accurately-reporter-number-of-cpus-available-to-container
|
||||
|
||||
async function cgroupCpuCount() {
|
||||
const quotaS = await fs.readFile('/sys/fs/cgroup/cpu/cpu.cfs_quota_us');
|
||||
const periodS = await fs.readFile('/sys/fs/cgroup/cpu/cpu.cfs_period_us');
|
||||
const quota = parseInt(quotaS);
|
||||
const period = parseInt(periodS);
|
||||
return quota / period;
|
||||
}
|
||||
|
||||
async function cpuCount() {
|
||||
try {
|
||||
return await cgroupCpuCount();
|
||||
} catch {
|
||||
return os.cpus().length;
|
||||
}
|
||||
}
|
||||
|
||||
cpuCount().then(console.log);
|
6
.github/pull_request_template.md
vendored
6
.github/pull_request_template.md
vendored
@ -21,9 +21,3 @@ _N/A_
|
||||
## After-merge notes
|
||||
|
||||
_N/A_
|
||||
|
||||
## Tasks
|
||||
|
||||
- [ ] I followed [best practices](https://codex.wordpress.org/I18n_for_WordPress_Developers) for translations
|
||||
- [ ] I added sufficient test coverage
|
||||
- [ ] I embraced TypeScript by either creating new files in TypeScript or converting existing JavaScript files when making changes
|
||||
|
18
.github/workflows/stats.yml
vendored
18
.github/workflows/stats.yml
vendored
@ -1,18 +0,0 @@
|
||||
name: Pull Request Stats
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
|
||||
jobs:
|
||||
stats:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Run pull request stats
|
||||
uses: flowwer-dev/pull-request-stats@master
|
||||
with:
|
||||
period: 90
|
||||
charts: true
|
||||
sort-by: 'TIME'
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -7,5 +7,4 @@ docker-compose.override.yml
|
||||
node_modules
|
||||
npm-debug.log
|
||||
mailpoet-premium
|
||||
tsconfig.tsbuildinfo
|
||||
/wordpress
|
||||
wordpress
|
||||
|
2
.npmrc
2
.npmrc
@ -1,2 +1,2 @@
|
||||
auto-install-peers=false
|
||||
save-workspace-protocol=rolling
|
||||
strict-peer-dependencies=false
|
||||
|
@ -1,22 +0,0 @@
|
||||
function readPackage(pkg) {
|
||||
// Resolve @wordpress/* dependencies of @woocommerce packages to those used by MailPoet.
|
||||
// This avoids their duplication and downgrading due to @woocommerce pinning them to wp-6.0.
|
||||
// This should be removed once we adopt similar pinning strategy and use dependency extraction.
|
||||
// See: https://github.com/woocommerce/woocommerce/pull/37034
|
||||
if (pkg.name?.startsWith('@woocommerce/')) {
|
||||
pkg.dependencies = Object.fromEntries(
|
||||
Object.entries(pkg.dependencies).map(([name, version]) =>
|
||||
name.startsWith('@wordpress/') || name.startsWith('@types/wordpress__')
|
||||
? [name, '*']
|
||||
: [name, version],
|
||||
),
|
||||
);
|
||||
}
|
||||
return pkg;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
hooks: {
|
||||
readPackage,
|
||||
},
|
||||
};
|
@ -22,7 +22,6 @@ vendor-prefixed
|
||||
/mailpoet/temp
|
||||
/mailpoet/tests/javascript_newsletter_editor/testBundles
|
||||
/mailpoet/tests/plugins
|
||||
/mailpoet/tools/wpscan-semgrep-rules
|
||||
/mailpoet/views
|
||||
/mailpoet-premium
|
||||
/wordpress
|
||||
|
26
README.md
26
README.md
@ -126,37 +126,25 @@ 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)
|
||||
|
||||
## 🚥 Testing with different PHP versions
|
||||
## 🚥 Testing with PHP 7.4 or PHP 8.0
|
||||
|
||||
To switch the environment to a different PHP version:
|
||||
To switch the environment to PHP 7.4/8.0:
|
||||
|
||||
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):
|
||||
1. Configure the `wordpress` service in `docker-compose.override.yml` to build from the php74 Dockerfile:
|
||||
|
||||
```yaml
|
||||
wordpress:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: dev/{PHP_VERSION}/Dockerfile
|
||||
dockerfile: dev/php74/Dockerfile # OR dev/php80/Dockerfile
|
||||
```
|
||||
|
||||
3. Run `docker-compose build wordpress`.
|
||||
4. Start the stack with `./do start`.
|
||||
2. Run `docker-compose build wordpress`.
|
||||
3. Start the stack with `./do start`.
|
||||
|
||||
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,
|
||||
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,
|
||||
and start the stack using `./do start`.
|
||||
|
||||
## Disabling the Tracy panel
|
||||
|
||||
To disable the Tracy panel, add the following to `docker-compose.override.yml`:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
wordpress:
|
||||
environment:
|
||||
MAILPOET_DISABLE_TRACY_PANEL: 1
|
||||
```
|
||||
|
||||
## ✅ TODO
|
||||
|
||||
- install woo commerce, members and other useful plugins by default
|
||||
|
@ -1,8 +0,0 @@
|
||||
export default {
|
||||
presets: [
|
||||
['@babel/preset-react', { runtime: 'automatic' }],
|
||||
'@babel/preset-env',
|
||||
'@babel/preset-typescript',
|
||||
],
|
||||
plugins: [['@babel/plugin-transform-runtime']],
|
||||
};
|
@ -10,7 +10,7 @@ RUN apt-get update \
|
||||
&& pecl install xdebug-2.9.8 && \
|
||||
\
|
||||
# Install NodeJS, enable Corepack
|
||||
curl -sL https://deb.nodesource.com/setup_19.x | bash - && \
|
||||
curl -sL https://deb.nodesource.com/setup_17.x | bash - && \
|
||||
apt-get install -y nodejs build-essential && \
|
||||
corepack enable && \
|
||||
\
|
||||
|
@ -8,7 +8,7 @@ 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_19.x | bash - && \
|
||||
curl -sL https://deb.nodesource.com/setup_17.x | bash - && \
|
||||
apt-get install -y nodejs build-essential && \
|
||||
corepack enable && \
|
||||
\
|
||||
|
@ -8,7 +8,7 @@ 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_19.x | bash - && \
|
||||
curl -sL https://deb.nodesource.com/setup_17.x | bash - && \
|
||||
apt-get install -y nodejs build-essential && \
|
||||
corepack enable && \
|
||||
\
|
||||
|
@ -1,46 +0,0 @@
|
||||
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_19.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
|
@ -37,7 +37,6 @@ Class `\MailPoet\API\API` becomes available once MailPoet plugin is loaded by Wo
|
||||
- [Is Setup Complete (isSetupComplete)](api_methods/IsSetupComplete.md)
|
||||
- [Subscribe to List (subscribeToList)](api_methods/SubscribeToList.md)
|
||||
- [Subscribe to Lists (subscribeToLists)](api_methods/SubscribeToLists.md)
|
||||
- [Unsubscribe globally](api_methods/UnsubscribeGlobally.md)
|
||||
- [Unsubscribe from List (unsubscribeFromList)](api_methods/UnsubscribeFromList.md)
|
||||
- [Unsubscribe from Lists (unsubscribeFromLists)](api_methods/UnsubscribeFromLists.md)
|
||||
- [Update List (updateList)](api_methods/UpdateList.md)
|
||||
|
@ -1,29 +0,0 @@
|
||||
[back to list](../Readme.md)
|
||||
|
||||
# Unsubscribe from all lists and change subscriber status
|
||||
|
||||
## `array unsubscribe(string $subscriber_id)`
|
||||
|
||||
This method removes a subscriber from all lists and updates its status to 'unsubscribed'.
|
||||
|
||||
It returns a subscriber. See [Get Subscriber](GetSubscriber.md) for returned data structure.
|
||||
|
||||
## Arguments
|
||||
|
||||
### string `$subscriber_id` (required)
|
||||
|
||||
An id or email of an existing subscriber. An `\Exception` is thrown when an id or email doesn't match any subscriber.
|
||||
|
||||
## Error handling
|
||||
|
||||
All expected errors from the API are exceptions of class `\MailPoet\API\MP\v1\APIException`.
|
||||
Code of the exception is populated to distinguish between different errors.
|
||||
|
||||
An exception of base class `\Exception` can be thrown when something unexpected happens.
|
||||
|
||||
Codes description:
|
||||
|
||||
| Code | Description |
|
||||
| ---- | -------------------------------------------- |
|
||||
| 4 | Invalid subscriber that does not exist |
|
||||
| 24 | Subscriber already has 'unsubscribed' status |
|
@ -15,7 +15,6 @@ services:
|
||||
volumes:
|
||||
- my-datavolume:/var/lib/mysql
|
||||
- ./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:
|
||||
MYSQL_ROOT_PASSWORD: somewordpress
|
||||
MYSQL_DATABASE: wordpress
|
||||
@ -47,7 +46,6 @@ services:
|
||||
PHP_IDE_CONFIG: 'serverName=Mailpoet'
|
||||
COMPOSER_HOME: '/tmp/.composer'
|
||||
NPM_CONFIG_CACHE: '/tmp/.npm'
|
||||
XDG_CACHE_HOME: '/tmp/.cache'
|
||||
MAILPOET_DEV_SITE: 1
|
||||
volumes:
|
||||
- './wordpress:/var/www/html'
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"presets": [
|
||||
"@babel/preset-typescript",
|
||||
["@babel/preset-react", { "runtime": "automatic" }],
|
||||
"@babel/preset-env",
|
||||
["@babel/preset-typescript", { "allowDeclareFields": true }]
|
||||
"@babel/preset-env"
|
||||
],
|
||||
"plugins": [
|
||||
[
|
||||
|
@ -37,10 +37,3 @@ WP_GITHUB_TOKEN=
|
||||
# Jira username/email and a token from https://id.atlassian.com/manage/api-tokens:
|
||||
WP_JIRA_USER=
|
||||
WP_JIRA_TOKEN=
|
||||
|
||||
# k6 performance test suite
|
||||
# Get following secrets from the Secret Store, look for "MailPoet: plugin .env":
|
||||
WP_TEST_PERFORMANCE_DATA_URL=
|
||||
WP_TEST_PERFORMANCE_PW=
|
||||
K6_CLOUD_TOKEN=
|
||||
K6_CLOUD_ID=
|
||||
|
3
mailpoet/.eslintignore
Normal file
3
mailpoet/.eslintignore
Normal file
@ -0,0 +1,3 @@
|
||||
**/vendor/**
|
||||
**/vendor-prefixed/**
|
||||
**/testBundles/**
|
@ -1,2 +1 @@
|
||||
# we can set this back to "true" once @woocommerce/components have less restrictive definitions
|
||||
engine-strict=false
|
||||
engine-strict=true
|
||||
|
1
mailpoet/.nvmrc
Normal file
1
mailpoet/.nvmrc
Normal file
@ -0,0 +1 @@
|
||||
v17.9.1
|
@ -90,6 +90,7 @@ $ ./do test:debug-unit # alias for ./do test:unit --debug
|
||||
$ ./do test:debug-integration # alias for ./do test:integration --debug
|
||||
$ ./do test:failed-unit # run the last failing unit test.
|
||||
$ ./do test:failed-integration # run the last failing integration test.
|
||||
$ ./do test:coverage # run tests and output coverage information.
|
||||
$ ./do test:javascript # run the JS tests.
|
||||
$ ./do test:acceptance [--file=...] [--skip-deps]
|
||||
# run acceptances tests into a docker environment.
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
<?php
|
||||
|
||||
// phpcs:disable PSR1.Classes.ClassDeclaration
|
||||
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
|
||||
@ -135,9 +135,6 @@ class RoboFile extends \Robo\Tasks {
|
||||
'tools',
|
||||
'vendor',
|
||||
'vendor-prefixed',
|
||||
'RoboFile.php',
|
||||
'.storybook',
|
||||
'storybook-static',
|
||||
]);
|
||||
|
||||
$headers = escapeshellarg(
|
||||
@ -156,7 +153,7 @@ class RoboFile extends \Robo\Tasks {
|
||||
->taskExec("php -d memory_limit=-1 tasks/makepot/makepot-views.php . > lang/mailpoet.pot")
|
||||
|
||||
// PHP, JS/TS
|
||||
->taskExec("php -d memory_limit=-1 vendor/wp-cli/wp-cli/php/boot-fs.php i18n make-pot --merge --slug=mailpoet --domain=mailpoet --exclude=$exclude --headers=$headers . lang/mailpoet.pot")
|
||||
->taskExec("vendor/bin/wp i18n make-pot --merge --slug=mailpoet --domain=mailpoet --exclude=$exclude --headers=$headers . lang/mailpoet.pot")
|
||||
|
||||
->run();
|
||||
}
|
||||
@ -221,7 +218,7 @@ class RoboFile extends \Robo\Tasks {
|
||||
return $this->_exec($command);
|
||||
}
|
||||
|
||||
public function testIntegration(array $opts = ['file' => null, 'group' => null, 'skip-group' => null, 'xml' => false, 'multisite' => false, 'debug' => false, 'skip-deps' => false, 'skip-plugins' => false, 'enable-cot' => false, 'enable-cot-sync' => false, 'stop-on-fail' => false]) {
|
||||
public function testIntegration(array $opts = ['file' => null, 'group' => null, 'skip-group' => null, 'xml' => false, 'multisite' => false, 'debug' => false, 'skip-deps' => false, 'skip-plugins' => false, 'enable-cot' => false, 'enable-cot-sync' => false]) {
|
||||
return $this->runTestsInContainer(array_merge($opts, ['test_type' => 'integration']));
|
||||
}
|
||||
|
||||
@ -237,6 +234,21 @@ class RoboFile extends \Robo\Tasks {
|
||||
return $this->runTestsInContainer(array_merge($opts, ['test_type' => 'integration', 'skip-group' => 'woo', 'skip-deps' => true, 'skip-plugins' => true]));
|
||||
}
|
||||
|
||||
public function testCoverage($opts = ['file' => null, 'xml' => false]) {
|
||||
$command = join(' ', [
|
||||
'vendor/bin/codecept run -s acceptance',
|
||||
(($opts['file']) ? $opts['file'] : ''),
|
||||
'--coverage',
|
||||
($opts['xml']) ? '--coverage-xml' : '--coverage-html',
|
||||
]);
|
||||
|
||||
if ($opts['xml']) {
|
||||
$command .= ' --xml';
|
||||
}
|
||||
|
||||
return $this->execWithXDebug($command);
|
||||
}
|
||||
|
||||
public function testNewsletterEditor($xmlOutputFile = null) {
|
||||
$command = join(' ', [
|
||||
'./node_modules/.bin/mocha',
|
||||
@ -285,80 +297,6 @@ class RoboFile extends \Robo\Tasks {
|
||||
return $this->runTestsInContainer($opts);
|
||||
}
|
||||
|
||||
public function testPerformance($path = null, $opts = ['url' => null, 'pw' => null, 'head' => false, 'scenario' => null]) {
|
||||
$dir = __DIR__;
|
||||
if ((getenv('K6_CLOUD_TOKEN')) === false) {
|
||||
return $this->collectionBuilder()
|
||||
->addCode([$this, 'testPerformanceSetup'])
|
||||
->taskExec("php $dir/tools/k6.php")
|
||||
->arg('run')
|
||||
->option('env', 'K6_BROWSER_ENABLED=1')
|
||||
->option('env', 'URL=' . $opts['url'])
|
||||
->option('env', 'PW=' . $opts['pw'])
|
||||
->option('env', 'HEADLESS=' . ($opts['head'] ? 'false' : 'true'))
|
||||
->option('env', 'SCENARIO=' . $opts['scenario'])
|
||||
->arg($path ?? "$dir/tests/performance/scenarios.js")
|
||||
->dir($dir)->run();
|
||||
} else {
|
||||
return $this->collectionBuilder()
|
||||
->addCode([$this, 'testPerformanceSetup'])
|
||||
->taskExec("php $dir/tools/k6.php")
|
||||
->arg('run')
|
||||
->option('env', 'K6_BROWSER_ENABLED=1')
|
||||
->option('env', 'URL=' . $opts['url'])
|
||||
->option('env', 'PW=' . $opts['pw'])
|
||||
->option('env', 'HEADLESS=' . ($opts['head'] ? 'false' : 'true'))
|
||||
->option('env', 'SCENARIO=' . $opts['scenario'])
|
||||
->option('env', 'K6_CLOUD_TOKEN=' . getenv('K6_CLOUD_TOKEN'))
|
||||
->option('env', 'K6_CLOUD_ID=' . getenv('K6_CLOUD_ID'))
|
||||
->option('env', 'K6_PROJECT_NAME=' . $opts['scenario'])
|
||||
->option('out', 'cloud')
|
||||
->arg($path ?? "$dir/tests/performance/scenarios.js")
|
||||
->dir($dir)->run();
|
||||
}
|
||||
}
|
||||
|
||||
public function testPerformanceSetup() {
|
||||
// get data file URL
|
||||
$url = getenv('WP_TEST_PERFORMANCE_DATA_URL');
|
||||
if (!$url) {
|
||||
$this->yell("Please set 'WP_TEST_PERFORMANCE_DATA_URL'. You'll find it in the secret store.", 40, 'red');
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// download data
|
||||
$dataFile = __DIR__ . '/tests/performance/_data/data.sql';
|
||||
if (!file_exists($dataFile)) {
|
||||
$this->say('Downloading data file...');
|
||||
if (!is_dir(dirname($dataFile))) {
|
||||
mkdir(dirname($dataFile), 0777, true);
|
||||
}
|
||||
$source = gzopen($url, 'rb');
|
||||
$destination = fopen($dataFile, 'wb');
|
||||
while (!gzeof($source)) {
|
||||
fwrite($destination, gzread($source, 4096));
|
||||
}
|
||||
fclose($destination);
|
||||
gzclose($source);
|
||||
$this->say("Data file downloaded to: $dataFile");
|
||||
} else {
|
||||
$this->say("Data file already exists: $dataFile");
|
||||
}
|
||||
|
||||
// import data & run WordPress setup
|
||||
$this->say('Importing data and running a WordPress setup...');
|
||||
$this->taskExec('COMPOSE_HTTP_TIMEOUT=200 docker-compose run --rm -it setup')
|
||||
->dir(__DIR__ . '/tests/performance')
|
||||
->run();
|
||||
$this->say('Data imported, WordPress set up.');
|
||||
}
|
||||
|
||||
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]) {
|
||||
return $this->runTestsInContainer(array_merge($opts, ['multisite' => true]));
|
||||
}
|
||||
@ -447,14 +385,9 @@ class RoboFile extends \Robo\Tasks {
|
||||
$this->say("Validator metadata generated to: $validatorMetadataDir");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new migration file. Use `migrations:new db` for a db level migration or `migrations:new app` for app level migration.
|
||||
* @param $level string - db or app
|
||||
*/
|
||||
public function migrationsNew($level) {
|
||||
public function migrationsNew() {
|
||||
$generator = new \MailPoet\Migrator\Repository();
|
||||
$level = strtolower($level);
|
||||
$result = $generator->create($level);
|
||||
$result = $generator->create();
|
||||
$path = realpath($result['path']);
|
||||
$this->output->writeln('MAILPOET DATABASE MIGRATIONS');
|
||||
$this->output->writeln("============================\n");
|
||||
@ -492,9 +425,6 @@ class RoboFile extends \Robo\Tasks {
|
||||
$collection->addCode(function() {
|
||||
return $this->qaCodeSniffer([]);
|
||||
});
|
||||
$collection->addCode(function() {
|
||||
return $this->qaMinimalPluginStandard([]);
|
||||
});
|
||||
return $collection->run();
|
||||
}
|
||||
|
||||
@ -522,8 +452,8 @@ class RoboFile extends \Robo\Tasks {
|
||||
'lib-3rd-party/',
|
||||
'vendor/composer',
|
||||
'vendor/mtdowling',
|
||||
'vendor/soundasleep',
|
||||
'vendor-prefixed/',
|
||||
'vendor-prefixed/soundasleep',
|
||||
'mailpoet.php',
|
||||
]);
|
||||
// The list of files and folders to exclude is coming from build.sh
|
||||
@ -541,7 +471,7 @@ class RoboFile extends \Robo\Tasks {
|
||||
'vendor/phpmailer/phpmailer/test',
|
||||
'vendor-prefixed/psr/log/Psr/Log/Test',
|
||||
'vendor-prefixed/sabberworm/php-css-parser/tests',
|
||||
'vendor-prefixed/soundasleep/html2text/tests',
|
||||
'vendor/soundasleep/html2text/tests',
|
||||
'vendor-prefixed/swiftmailer/swiftmailer/tests',
|
||||
'vendor-prefixed/symfony/service-contracts/Tests',
|
||||
'vendor-prefixed/symfony/translation/Tests',
|
||||
@ -569,60 +499,9 @@ class RoboFile extends \Robo\Tasks {
|
||||
$task = implode(' ', [
|
||||
'php -d memory_limit=-1',
|
||||
'./tasks/code_sniffer/vendor/bin/phpcs',
|
||||
"--parallel=" . $this->getParallelism(),
|
||||
'--extensions=php',
|
||||
$severityFlag,
|
||||
'--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',
|
||||
'--parallel=' . $this->getParallelism(),
|
||||
'--extensions=php',
|
||||
$severityFlag,
|
||||
'--standard=tasks/code_sniffer/vendor/wporg/plugin-directory/MinimalPluginStandard',
|
||||
'--standard=tasks/code_sniffer/MailPoet',
|
||||
'-s',
|
||||
]);
|
||||
|
||||
@ -665,22 +544,59 @@ class RoboFile extends \Robo\Tasks {
|
||||
}
|
||||
|
||||
public function qaFixFile($filePath) {
|
||||
$extension = pathinfo($filePath, PATHINFO_EXTENSION);
|
||||
if ($extension === 'php') {
|
||||
if (substr($filePath, -4) === '.php') {
|
||||
// fix PHPCS rules
|
||||
return $this->collectionBuilder()
|
||||
->taskExec(
|
||||
'./tasks/code_sniffer/vendor/bin/phpcbf ' .
|
||||
'--standard=./tasks/code_sniffer/MailPoet ' .
|
||||
'--runtime-set testVersion 7.3-8.2 ' .
|
||||
'--runtime-set testVersion 7.2-8.0 ' .
|
||||
$filePath . ' -n'
|
||||
)
|
||||
->run();
|
||||
}
|
||||
if (in_array($extension, ['js', 'jsx', 'ts', 'tsx'], true)) {
|
||||
// fix ESLint rules
|
||||
if (substr($filePath, -4) === '.jsx') {
|
||||
// fix ESLint using ES6 rules
|
||||
return $this->collectionBuilder()
|
||||
->taskExec("pnpm eslint --max-warnings 0 --fix $filePath")
|
||||
->taskExec(
|
||||
'npx ../eslint-config/node_modules/.bin/eslint -c ../eslint-config/.eslintrc.es6.json ' .
|
||||
'--max-warnings 0 ' .
|
||||
'--fix ' .
|
||||
$filePath
|
||||
)
|
||||
->run();
|
||||
}
|
||||
if (substr($filePath, -4) === '.tsx' || substr($filePath, -3) === '.ts') {
|
||||
// fix ESLint using TS rules
|
||||
return $this->collectionBuilder()
|
||||
->taskExec(
|
||||
'npx ../eslint-config/node_modules/.bin/eslint -c ../eslint-config/.eslintrc.ts.json ' .
|
||||
'--max-warnings 0 ' .
|
||||
'--fix ' .
|
||||
$filePath
|
||||
)
|
||||
->run();
|
||||
}
|
||||
if (substr($filePath, -8) === '.spec.js') {
|
||||
// fix ESLint using tests rules
|
||||
return $this->collectionBuilder()
|
||||
->taskExec(
|
||||
'npx ../eslint-config/node_modules/.bin/eslint -c ../eslint-config/.eslintrc.tests_newsletter_editor.json ' .
|
||||
'--max-warnings 0 ' .
|
||||
'--fix ' .
|
||||
$filePath
|
||||
)
|
||||
->run();
|
||||
}
|
||||
if (substr($filePath, -3) === '.js') {
|
||||
// fix ESLint using ES5 rules
|
||||
return $this->collectionBuilder()
|
||||
->taskExec(
|
||||
'npx ../eslint-config/node_modules/.bin/eslint -c ../eslint-config/.eslintrc.es5.json ' .
|
||||
'--max-warnings 0 ' .
|
||||
'--fix ' .
|
||||
$filePath
|
||||
)
|
||||
->run();
|
||||
}
|
||||
}
|
||||
@ -717,10 +633,6 @@ class RoboFile extends \Robo\Tasks {
|
||||
->run();
|
||||
}
|
||||
|
||||
public function qaSemgrep() {
|
||||
return $this->_exec('./tools/semgrep.sh lib/ lib-3rd-party/');
|
||||
}
|
||||
|
||||
public function storybookBuild() {
|
||||
return $this->_exec('pnpm run build-storybook');
|
||||
}
|
||||
@ -887,9 +799,6 @@ class RoboFile extends \Robo\Tasks {
|
||||
->addCode(function () use ($version) {
|
||||
$this->releaseCreatePullRequest($version);
|
||||
})
|
||||
->addCode(function () use ($version) {
|
||||
$this->releaseRerunCircleWorkflow(\MailPoetTasks\Release\CircleCiController::PROJECT_PREMIUM);
|
||||
})
|
||||
->addCode(function () use ($version) {
|
||||
$this->translationsPrepareLanguagePacks($version);
|
||||
})
|
||||
@ -1026,23 +935,9 @@ class RoboFile extends \Robo\Tasks {
|
||||
->addCode(function () use ($version) {
|
||||
return $this->releasePublishSlack($version);
|
||||
})
|
||||
->addCode(function () {
|
||||
return $this->releaseMergePullRequest(\MailPoetTasks\Release\GitHubController::RELEASE_SOURCE_BRANCH);
|
||||
})
|
||||
->run();
|
||||
}
|
||||
|
||||
public function releaseMergePullRequest(string $branch) {
|
||||
try {
|
||||
$this->createGitHubController()
|
||||
->mergePullRequest(\MailPoetTasks\Release\CircleCiController::PROJECT_MAILPOET, $branch);
|
||||
} catch (\Exception $e) {
|
||||
$this->yell($e->getMessage(), 40, 'red');
|
||||
exit(1);
|
||||
}
|
||||
$this->say("Pull request for branch: '{$branch}' was successfully merged");
|
||||
}
|
||||
|
||||
/**
|
||||
* This command displays how many pull request each person did recently
|
||||
*/
|
||||
@ -1221,18 +1116,6 @@ class RoboFile extends \Robo\Tasks {
|
||||
$this->say("Release '$version[name]' info was published on Slack.");
|
||||
}
|
||||
|
||||
public function releaseRerunCircleWorkflow(string $project = null) {
|
||||
$circleciController = $this->createCircleCiController();
|
||||
$result = $circleciController->rerunLatestWorkflow($project);
|
||||
// Sometimes can be useful to know which Circle project workflow was restarted
|
||||
$project = $project ? " for the project '{$project}'" : '';
|
||||
if (!$result) {
|
||||
$this->yell("Circle Workflow{$project} was not restarted", 40, 'red');
|
||||
} else {
|
||||
$this->say("Circle Workflow{$project} was started from the beginning");
|
||||
}
|
||||
}
|
||||
|
||||
public function downloadWooCommerceBlocksZip($tag = null) {
|
||||
$this->createWpOrgDownloader('woo-gutenberg-products-block')
|
||||
->downloadPluginZip('woo-gutenberg-products-block.zip', __DIR__ . '/tests/plugins/', $tag);
|
||||
@ -1256,15 +1139,6 @@ class RoboFile extends \Robo\Tasks {
|
||||
->downloadReleaseZip('woocommerce-subscriptions.zip', __DIR__ . '/tests/plugins/', $tag);
|
||||
}
|
||||
|
||||
public function downloadAutomateWooZip($tag = null) {
|
||||
if (!getenv('WP_GITHUB_USERNAME') && !getenv('WP_GITHUB_TOKEN')) {
|
||||
$this->yell("Skipping download of Automate Woo", 40, 'red');
|
||||
exit(0); // Exit with 0 since it is a valid state for some environments
|
||||
}
|
||||
$this->createGithubClient('woocommerce/automatewoo')
|
||||
->downloadReleaseZip('automatewoo.zip', __DIR__ . '/tests/plugins/', $tag);
|
||||
}
|
||||
|
||||
public function downloadWooCommerceZip($tag = null) {
|
||||
$this->createWpOrgDownloader('woocommerce')
|
||||
->downloadPluginZip('woocommerce.zip', __DIR__ . '/tests/plugins/', $tag);
|
||||
@ -1459,14 +1333,7 @@ class RoboFile extends \Robo\Tasks {
|
||||
(isset($opts['xml']) && $opts['xml'] ? '--xml ' : '') .
|
||||
(isset($opts['group']) && $opts['group'] ? '--group ' . $opts['group'] . ' ' : '') .
|
||||
(isset($opts['skip-group']) && $opts['skip-group'] ? '--skip-group ' . $opts['skip-group'] . ' ' : '') .
|
||||
(isset($opts['stop-on-fail']) && $opts['stop-on-fail'] ? '-f ' : '') .
|
||||
(isset($opts['file']) && $opts['file'] ? $opts['file'] : '')
|
||||
'-f ' . (isset($opts['file']) && $opts['file'] ? $opts['file'] : '')
|
||||
)->dir(__DIR__ . '/tests/docker')->run();
|
||||
}
|
||||
|
||||
private function getParallelism(int $multiplier = 1, int $min = 4, int $max = 32): int {
|
||||
$path = __DIR__ . '/../.circleci/nproc.js';
|
||||
$nproc = (int)$this->taskExec("node $path")->printOutput(false)->run()->stopOnFail()->getMessage();
|
||||
return max(min($nproc * $multiplier, $max), $min);
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,19 +0,0 @@
|
||||
$color-grey: #ddd;
|
||||
$color-wp-gray-0: #fbfbfb;
|
||||
$color-poet-gray-dividers: #dcdcde;
|
||||
$color-gutenberg-blue: #007cba;
|
||||
$color-gutenberg-grey-100: #f0f0f0;
|
||||
$color-gutenberg-grey-600: #949494;
|
||||
$color-gutenberg-grey-700: #757575;
|
||||
$color-gutenberg-grey-800: #2f2f2f;
|
||||
$color-white: #fff;
|
||||
$color-black: #1e1e1e;
|
||||
$color-primary: #007cba;
|
||||
$color-gutenberg-alert-green: #4ab866;
|
||||
$color-wp-green-0: #edfaef;
|
||||
$color-wp-green-60: #007017;
|
||||
$color-wp-yellow-0: #fcf9e8;
|
||||
$color-wp-yellow-50: #996800;
|
||||
$color-wp-yellow-60: #755100;
|
||||
$color-wp-red-0: #fcf0f1;
|
||||
$color-wp-red-60: #b32d2e;
|
@ -1,18 +0,0 @@
|
||||
.mailpoet-analytics-header {
|
||||
align-items: end;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 24px;
|
||||
|
||||
.woocommerce-filters-filter {
|
||||
width: 100%;
|
||||
|
||||
.components-dropdown__content .components-popover__content {
|
||||
padding: 0
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
@import './colors';
|
||||
|
||||
.mailpoet-automation-analytics-overview {
|
||||
background: $color-white;
|
||||
margin-bottom: 24px;
|
||||
|
||||
h1 {
|
||||
border: 1px solid $color-grey;
|
||||
border-bottom: none;
|
||||
padding: 16px 24px;
|
||||
}
|
||||
|
||||
.woocommerce-summary {
|
||||
background: $color-white;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.woocommerce-summary__item {
|
||||
background: $color-white;
|
||||
}
|
||||
}
|
@ -1,162 +0,0 @@
|
||||
@import '../colors';
|
||||
|
||||
.mailpoet-automation-editor-stats-placeholder {
|
||||
.mailpoet-automation-stats-label {
|
||||
background: $color-gutenberg-grey-100;
|
||||
color: $color-gutenberg-grey-100;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.mailpoet-automation-stats-value {
|
||||
background: $color-gutenberg-grey-100;
|
||||
color: $color-gutenberg-grey-100;
|
||||
display: block;
|
||||
margin: auto;
|
||||
width: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-automation-editor-step-wrapper-placeholder {
|
||||
.mailpoet-automation-editor-step-icon {
|
||||
background: $color-gutenberg-grey-100;
|
||||
border-radius: 50%;
|
||||
height: 49px;
|
||||
width: 49px;
|
||||
}
|
||||
|
||||
.mailpoet-automation-editor-step-title {
|
||||
background: $color-gutenberg-grey-100;
|
||||
height: 20px;
|
||||
margin-bottom: 3px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.mailpoet-automation-editor-step-subtitle {
|
||||
background: $color-gutenberg-grey-100;
|
||||
height: 20px;
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-automation-analytics-step-failed {
|
||||
bottom: 0;
|
||||
display: none;
|
||||
grid-column: 1 / -1;
|
||||
justify-content: center;
|
||||
left: -100px;
|
||||
position: absolute;
|
||||
|
||||
&:after {
|
||||
border-top: 1px dashed $color-gutenberg-grey-600;
|
||||
content: '';
|
||||
height: 0;
|
||||
left: 100%;
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
p {
|
||||
padding: 0 8px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 600px) {
|
||||
.mailpoet-automation-analytics-step-failed {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-automation-analytics-step-footer {
|
||||
background: $color-wp-gray-0;
|
||||
border-top: 1px solid $color-poet-gray-dividers;
|
||||
display: flex;
|
||||
grid-column: 1 / -1;
|
||||
justify-content: center;
|
||||
margin-bottom: -12px;
|
||||
margin-left: -12px;
|
||||
width: calc(100% + 24px);
|
||||
z-index: 1;
|
||||
|
||||
p {
|
||||
padding: 6px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-automation-analytics-step-footer,
|
||||
.mailpoet-automation-analytics-step-failed {
|
||||
p {
|
||||
margin: 0;
|
||||
|
||||
a {
|
||||
color: $color-gutenberg-grey-800;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: $color-gutenberg-blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
color: $color-gutenberg-grey-600;
|
||||
}
|
||||
|
||||
a:hover span {
|
||||
color: $color-gutenberg-blue;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-automation-analytics-separator {
|
||||
p {
|
||||
background: $color-wp-gray-0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mailpoet-automation-analytics-separator-text {
|
||||
color: $color-gutenberg-grey-600;
|
||||
}
|
||||
}
|
||||
|
||||
// Send Email Panel
|
||||
.mailpoet-automation-analytics-send-email-panel {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.mailpoet-automation-analytics-send-email-panel-section {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 1em 0;
|
||||
|
||||
&.is-loading {
|
||||
background: $color-gutenberg-grey-100;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-automation-analytics-send-email-panel-label {
|
||||
color: $color-gutenberg-grey-700;
|
||||
}
|
||||
|
||||
.mailpoet-automation-analytics-send-email-panel-value {
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
.mailpoet-automation-editor-automation-notices {
|
||||
background: $color-wp-gray-0;
|
||||
padding: 32px 0 0;
|
||||
}
|
||||
|
||||
.mailpoet-automation-flow-notice {
|
||||
margin: 0 auto;
|
||||
max-width: 480px;
|
||||
width: 100%;
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
@import '../colors';
|
||||
@import 'mixins';
|
||||
|
||||
.mailpoet-analytics-main-value {
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
line-height: 18px;
|
||||
margin: 0 0 4px;
|
||||
}
|
||||
|
||||
.mailpoet-analytics-badge {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.mailpoet-analytics-badge-text {
|
||||
@include badge;
|
||||
}
|
||||
|
||||
.mailpoet-automation-analytics-email-name {
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.mailpoet-automation-analytics-email-clicked {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.mailpoet-analytics-badge-success {
|
||||
color: $color-gutenberg-alert-green;
|
||||
|
||||
.mailpoet-analytics-badge-text {
|
||||
background: $color-wp-green-0;
|
||||
color: $color-wp-green-60;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-analytics-badge-warning {
|
||||
color: $color-wp-yellow-50;
|
||||
|
||||
.mailpoet-analytics-badge-text {
|
||||
background: $color-wp-yellow-0;
|
||||
color: $color-wp-yellow-60;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-automation-analytics-table-subvalue {
|
||||
color: $color-gutenberg-grey-600;
|
||||
font-size: 12px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mailpoet-analytics-email-actions {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
justify-content: end;
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
@import '../colors';
|
||||
|
||||
.mailpoet-analytics-tabs {
|
||||
background: $color-white;
|
||||
border: 1px solid $color-grey;
|
||||
|
||||
.components-tab-panel__tabs-item.is-active {
|
||||
box-shadow: inset 0 -4px 0 0 var(--wp-admin-theme-color);
|
||||
}
|
||||
|
||||
.components-tab-panel__tabs {
|
||||
border-bottom: 1px solid $color-grey;
|
||||
}
|
||||
|
||||
.components-tab-panel__tab-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.woocommerce-table {
|
||||
box-shadow: none;
|
||||
margin-bottom: 0;
|
||||
|
||||
/** Remove table header */
|
||||
.components-card-header {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.woocommerce-summary__item {
|
||||
box-sizing: border-box;
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
@import 'mixins';
|
||||
@import 'general';
|
||||
@import 'email';
|
||||
@import 'orders';
|
||||
@import 'automation_flow';
|
||||
@import 'subscribers';
|
@ -1,11 +0,0 @@
|
||||
@import '../colors';
|
||||
|
||||
@mixin badge {
|
||||
background: $color-grey;
|
||||
border-radius: 2px;
|
||||
font-size: 11px;
|
||||
font-weight: 400;
|
||||
line-height: 16px;
|
||||
margin-right: 4px;
|
||||
padding: 4px 8px;
|
||||
}
|
@ -1,80 +0,0 @@
|
||||
@import '../colors';
|
||||
@import 'mixins';
|
||||
|
||||
.mailpoet-analytics-tab-orders,
|
||||
.mailpoet-analytics-tab-subscribers {
|
||||
color: $color-gutenberg-grey-600;
|
||||
}
|
||||
|
||||
.mailpoet-analytics-filter {
|
||||
.is-loading {
|
||||
background: $color-gutenberg-grey-100;
|
||||
height: 20px;
|
||||
max-width: 200px;
|
||||
width: 45%;
|
||||
}
|
||||
}
|
||||
|
||||
.woocommerce-table__item {
|
||||
a.mailpoet-analytics-orders__customer {
|
||||
align-items: flex-start;
|
||||
display: flex;
|
||||
flex: 1 0 0;
|
||||
gap: 8px;
|
||||
|
||||
img {
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-automations-analytics-order-products {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
||||
.quantity {
|
||||
color: $color-gutenberg-grey-700;
|
||||
}
|
||||
|
||||
.woocommerce-view-more-list {
|
||||
button {
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
text-decoration: underline dotted;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-analytics-order-status {
|
||||
@include badge;
|
||||
}
|
||||
|
||||
.mailpoet-analytics-order-status-completed,
|
||||
.mailpoet-analytics-order-status-processing, {
|
||||
background: $color-wp-green-0;
|
||||
color: $color-wp-green-60;
|
||||
}
|
||||
|
||||
.mailpoet-analytics-order-status-failed {
|
||||
background: $color-wp-red-0;
|
||||
color: $color-wp-red-60;
|
||||
}
|
||||
|
||||
.mailpoet-analytics-order-status-on-hold {
|
||||
background: $color-wp-yellow-0;
|
||||
color: $color-wp-yellow-60;
|
||||
}
|
||||
|
||||
.mailpoet-analytics-upgrade-banner {
|
||||
margin: 24px;
|
||||
|
||||
.components-notice__content {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mailpoet-analytics-upgrade-banner__inner {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
@import '../colors';
|
||||
|
||||
.mailpoet-analytics-clear-filters {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.mailpoet-analytics-filter {
|
||||
align-items: end;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.mailpoet-analytics-filter-controls {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.mailpoet-analytics-subscribers-step-cell {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
grid-template-columns: 24px 1fr;
|
||||
grid-template-rows: auto 1fr;
|
||||
|
||||
.mailpoet-automation-colored-icon {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
span {
|
||||
color: $color-gutenberg-grey-600;
|
||||
font-size: 11px;
|
||||
grid-column-start: 2;
|
||||
}
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
.mailpoet-automation-chip {
|
||||
align-items: center;
|
||||
background: #f0f0f1;
|
||||
background: #fcf0f1;
|
||||
border-radius: 9999px;
|
||||
color: #2c3338;
|
||||
color: #8a2424;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
font-size: 13px;
|
||||
@ -24,17 +24,4 @@
|
||||
height: 32px;
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
&.chip-danger {
|
||||
background: #fcf0f1;
|
||||
color: #8a2424;
|
||||
}
|
||||
|
||||
&[aria-expanded='true'] {
|
||||
filter: brightness(95%);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
box-shadow: 0 0 0 calc(var(--wp-admin-border-width-focus)) var(--wp-admin-theme-color);
|
||||
}
|
||||
}
|
||||
|
@ -34,10 +34,9 @@
|
||||
.mailpoet-automation-field__error {
|
||||
position: relative;
|
||||
|
||||
input:not([type='radio'])
|
||||
input,
|
||||
select,
|
||||
textarea,
|
||||
input[type='text'].components-form-token-field__input {
|
||||
textarea {
|
||||
background: right top/26px no-repeat url('../../img/icons/alert.svg');
|
||||
padding-right: 26px;
|
||||
}
|
||||
|
@ -1,88 +0,0 @@
|
||||
.mailpoet-automation-filters-panel-content {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
button.components-button.mailpoet-automation-filters-panel-add-filter {
|
||||
padding-right: 12px;
|
||||
|
||||
&.has-icon > svg {
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-automation-filters-list {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.mailpoet-automation-filters-list-group-description {
|
||||
color: #646970;
|
||||
font-size: 13px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.mailpoet-automation-filters-list-group-description-operator {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.mailpoet-automation-filters-list-group-operator {
|
||||
.components-base-control__field > div {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px 16px;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-automation-filters-list-item {
|
||||
align-items: center;
|
||||
background: #f0f0f0;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
|
||||
&.mailpoet-automation-filters-list-item-has-error {
|
||||
background: #fcf0f1;
|
||||
color: #8a2424;
|
||||
}
|
||||
|
||||
.mailpoet-automation-filters-list-item-content {
|
||||
color: inherit;
|
||||
display: block;
|
||||
height: auto;
|
||||
line-height: inherit;
|
||||
padding: 8px 12px;
|
||||
text-align: left;
|
||||
|
||||
&:disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-automation-filters-list-item-remove {
|
||||
color: #757575;
|
||||
margin: 4px;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-automation-filters-list-item-error {
|
||||
color: #8a2424;
|
||||
font-size: 12px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.mailpoet-automation-filters-list-item-field,
|
||||
.mailpoet-automation-filters-list-item-value {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.mailpoet-automation-filters-list-item-value-missing {
|
||||
color: #757575;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
|
||||
svg {
|
||||
margin: -2px 0;
|
||||
}
|
||||
}
|
@ -5,10 +5,6 @@
|
||||
.components-panel__body-title.mailpoet-automation-panel-plain-body-title {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
|
||||
&:hover {
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-automation-panel-plain-body-title-text {
|
||||
|
@ -1,19 +0,0 @@
|
||||
.mailpoet-automation-editor-step-filters {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
max-height: 400px;
|
||||
padding: 8px;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.mailpoet-automation-editor-step-filters-title {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.mailpoet-automation-editor-step-filters-description {
|
||||
color: #646970;
|
||||
font-size: 13px;
|
||||
margin-bottom: 4px;
|
||||
}
|
@ -54,10 +54,7 @@
|
||||
}
|
||||
|
||||
.mailpoet-automation-editor-step-title {
|
||||
align-items: center;
|
||||
color: $color-wordpress-grey-dark;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.mailpoet-automation-editor-step-subtitle {
|
||||
@ -66,10 +63,12 @@
|
||||
}
|
||||
|
||||
.mailpoet-automation-editor-step-footer {
|
||||
column-gap: 4px;
|
||||
display: flex;
|
||||
grid-column: 1 / -1;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.mailpoet-automation-editor-step-error {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.mailpoet-automation-colored-icon {
|
||||
|
@ -1,4 +1,3 @@
|
||||
@import './mailpoet/button';
|
||||
@import './mailpoet/edit';
|
||||
@import './mailpoet/thumbnail';
|
||||
@import './mailpoet/steps';
|
||||
|
@ -1 +0,0 @@
|
||||
@import './send-email';
|
@ -1,15 +0,0 @@
|
||||
.mailpoet-sendmail-description {
|
||||
display: grid;
|
||||
grid-gap: 4px;
|
||||
grid-template-columns: 14px auto;
|
||||
grid-template-rows: auto auto;
|
||||
}
|
||||
|
||||
.mailpoet-sendemail-description-main {
|
||||
grid-column-end: -1;
|
||||
grid-column-start: 1;
|
||||
}
|
||||
|
||||
.mailpoet-sendmail-description-type {
|
||||
color: #787c82;
|
||||
}
|
@ -23,11 +23,3 @@
|
||||
transform: scale(-1, -1);
|
||||
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);
|
||||
}
|
||||
|
@ -145,11 +145,11 @@
|
||||
|
||||
/* Sidepanel overrides */
|
||||
.mailpoet_panel_body {
|
||||
margin: 0;
|
||||
margin: 19px;
|
||||
padding: 0;
|
||||
|
||||
.mailpoet_editor_settings h3 {
|
||||
margin: 19px;
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
.admin_page_mailpoet-newsletter-editor {
|
||||
.mailpoet_form_field {
|
||||
margin: 19px 15px;
|
||||
margin-bottom: 15px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.mailpoet_form_field_title {
|
||||
@ -50,8 +51,4 @@
|
||||
.mailpoet_form_field_block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mailpoet_form_field_input_nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
@ -12,12 +12,6 @@
|
||||
font-size: 1.4em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.components-panel__row {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet_sidepanel_field {
|
||||
|
@ -1,90 +0,0 @@
|
||||
.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;
|
||||
}
|
||||
|
||||
.mailpoet_coupon_block_coupon {
|
||||
background: $color-white;
|
||||
font-size: 13px;
|
||||
height: auto;
|
||||
line-height: 21px;
|
||||
margin-bottom: 16px;
|
||||
padding: 16px 0;
|
||||
width: 100%;
|
||||
|
||||
input[type='radio'] {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
div {
|
||||
padding: 0 16px 0 40px;
|
||||
|
||||
&.discount_type {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet_coupon_block_settings,
|
||||
.mailpoet_coupon_block_display_options {
|
||||
@include animation-slide-open-downwards();
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.mailpoet_editor_settings {
|
||||
.components-panel__header.edit-post-sidebar__panel-tabs {
|
||||
background: $color-primary-background;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.components-base-control {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.components-panel {
|
||||
background: $color-primary-background;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.components-search-control input[type=search].components-search-control__input {
|
||||
background: $color-white;
|
||||
}
|
||||
}
|
@ -24,7 +24,6 @@
|
||||
.mailpoet_settings_posts_selection {
|
||||
@include animation-slide-open-downwards();
|
||||
overflow-x: hidden;
|
||||
padding: 0 19px;
|
||||
}
|
||||
|
||||
.mailpoet_settings_posts_show_display_options,
|
||||
|
@ -24,7 +24,6 @@
|
||||
.mailpoet_settings_products_selection {
|
||||
@include animation-slide-open-downwards();
|
||||
overflow-x: hidden;
|
||||
padding: 0 19px;
|
||||
}
|
||||
|
||||
.mailpoet_settings_products_show_display_options,
|
||||
|
@ -22,23 +22,8 @@
|
||||
// We don't use any default block (WP Post editor has paragraph)
|
||||
// and CSS distributed within packages is works only with the paragraph block
|
||||
// We want to display it in center
|
||||
.block-editor .block-editor-inserter {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.block-editor .block-editor-inserter .block-editor-button-block-appender.block-list-appender__toggle {
|
||||
align-items: center;
|
||||
box-shadow: inset 0 0 0 1px #1e1e1e;
|
||||
display: flex;
|
||||
height: auto;
|
||||
justify-content: center;
|
||||
margin: 0 auto;
|
||||
padding: 12px;
|
||||
width: 100%;
|
||||
|
||||
&:hover {
|
||||
box-shadow: inset 0 0 0 1px var(--wp-admin-theme-color)
|
||||
}
|
||||
}
|
||||
|
||||
// Html blocks contains iframe which captures clicks and in some cases prevents selecting block.
|
||||
@ -101,19 +86,16 @@ h2 {
|
||||
// Adjustments for family-font-select in popover
|
||||
.mailpoet_toolbar_item {
|
||||
.mailpoet-font-family-select {
|
||||
height: 48px;
|
||||
|
||||
.components-input-control__container .components-custom-select-control__button {
|
||||
height: 48px;
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
// Backdrop is displayed over the select button so we need to disable pointer events so that we can click the select
|
||||
.components-input-control__backdrop {
|
||||
pointer-events: none !important;
|
||||
}
|
||||
|
||||
.components-input-control__suffix * {
|
||||
pointer-events: none !important;
|
||||
}
|
||||
// Force rendering of select arrow on the right
|
||||
.components-custom-select-control__button svg {
|
||||
margin-right: initial;
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,29 +111,10 @@ h2 {
|
||||
|
||||
.edit-post-visual-editor {
|
||||
background-color: $color-white;
|
||||
padding: 10px 10px 100px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
// Unify padding o wp-block-columns with background with front end rendering
|
||||
.wp-block-columns.has-background {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,28 @@
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
@ -3,17 +3,19 @@
|
||||
grid-auto-flow: row;
|
||||
grid-row-gap: 20px;
|
||||
|
||||
.components-radio-control {
|
||||
.components-flex {
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.components-base-control {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.components-radio-control__option {
|
||||
display: inline-block;
|
||||
margin-right: 1em;
|
||||
width: auto;
|
||||
}
|
||||
.components-base-control__label {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.components-radio-control__option {
|
||||
display: inline-block;
|
||||
margin-right: 1em;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.mailpoet-size-settings-control .components-range-control__number {
|
||||
@ -41,6 +43,10 @@
|
||||
.components-input-control__container {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.components-custom-select-control__label {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,6 +101,25 @@
|
||||
}
|
||||
|
||||
.mailpoet-color-gradient-picker {
|
||||
.block-editor-color-gradient-control__color-indicator {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.component-color-indicator {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
}
|
||||
|
||||
// Styles for labels and headings for style setting components
|
||||
// We override some styles from @wordpress/components to have unified labels appearance
|
||||
.mailpoet-styles-settings .components-base-control__label,
|
||||
.mailpoet-styles-settings .components-input-control__label,
|
||||
.mailpoet-styles-settings .components-custom-select-control__label,
|
||||
.mailpoet-styles-settings .components-font-size-picker label {
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
margin-bottom: .5em;
|
||||
|
||||
.component-color-indicator {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
@ -30,13 +30,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
.components-base-control.mailpoet-form-inline-radios__control {
|
||||
.components-flex {
|
||||
flex-direction: row;
|
||||
gap: $grid-gap-half;
|
||||
justify-content: flex-start;
|
||||
margin-bottom: $grid-gap-half;
|
||||
}
|
||||
.components-base-control.mailpoet-form-success-types__control {
|
||||
margin-bottom: 0;
|
||||
|
||||
.components-base-control__label {
|
||||
display: block;
|
||||
@ -44,6 +39,7 @@
|
||||
|
||||
.components-radio-control__option {
|
||||
display: inline-block;
|
||||
margin-right: 1em;
|
||||
|
||||
input {
|
||||
margin-right: 6px;
|
||||
@ -127,5 +123,4 @@
|
||||
// This style hides the horizontal scrollbar in Firefox browser
|
||||
.interface-interface-skeleton__sidebar {
|
||||
overflow-x: hidden;
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
|
@ -10,9 +10,10 @@ $mailpoet-form-template-thumbnail-height: 316px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mailpoet-form-templates {
|
||||
.mailpoet-templates {
|
||||
@include formTemplatesGrid;
|
||||
padding-bottom: math.div($mailpoet-form-template-thumbnail-height, 3);
|
||||
padding-top: $grid-gap-large;
|
||||
|
||||
.mailpoet-categories {
|
||||
grid-column: 1 / -1;
|
||||
@ -31,13 +32,37 @@ $mailpoet-form-template-thumbnail-height: 316px;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-form-template-selection-header {
|
||||
grid-column: 1/-1;
|
||||
}
|
||||
$templates-one-column-breakpoint: 2 * ($mailpoet-form-template-thumbnail-width + $grid-gap-half) + $grid-gap + 160;
|
||||
/**
|
||||
The header uses grid to position heading in center (second column) and a new form button on right (third column)
|
||||
*/
|
||||
.mailpoet-template-selection-header {
|
||||
@include formTemplatesGrid;
|
||||
background: $color-input-background;
|
||||
border-bottom: 1px solid $color-tertiary-light;
|
||||
grid-row-gap: 0;
|
||||
justify-items: center;
|
||||
padding: $grid-gap 0;
|
||||
position: relative;
|
||||
|
||||
.mailpoet-form-template-selection-footer {
|
||||
border-top: 1px solid $color-tertiary-light;
|
||||
grid-column: 1/-1;
|
||||
margin-top: $grid-gap-medium;
|
||||
text-align: center;
|
||||
@include breakpoint-min-width($templates-one-column-breakpoint) {
|
||||
justify-items: right;
|
||||
}
|
||||
|
||||
.mailpoet-h4 {
|
||||
// Keep heading centered when we are sure there are 2 or more columns
|
||||
|
||||
@include breakpoint-min-width($templates-one-column-breakpoint) {
|
||||
left: 50%;
|
||||
margin-top: 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-button {
|
||||
align-self: center;
|
||||
grid-column-end: -1;
|
||||
}
|
||||
}
|
||||
|
@ -1,37 +0,0 @@
|
||||
.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 100px;
|
||||
padding: $grid-gap $grid-gap-medium;
|
||||
position: relative;
|
||||
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
font-weight: normal;
|
||||
line-height: 28px;
|
||||
margin: 0;
|
||||
|
||||
span {
|
||||
color: $color-text-light;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-homepage-section__heading-after {
|
||||
display: grid;
|
||||
justify-items: end;
|
||||
}
|
||||
|
||||
@include respond-to(small-screen) {
|
||||
padding: $grid-gap-half $grid-gap-medium;
|
||||
}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
.mailpoet-homepage__container {
|
||||
margin: 0 auto;
|
||||
margin-top: $grid-gap-xl;
|
||||
max-width: 680px;
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
.mailpoet-homepage-resources__posts {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
|
||||
@include respond-to(small-screen) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-resource-post {
|
||||
@include animation-fade-in();
|
||||
display: block;
|
||||
padding: $grid-gap-medium;
|
||||
text-decoration: none;
|
||||
|
||||
h3 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
p {
|
||||
color: $color-text-light;
|
||||
font-size: 13px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-homepage-resources__pagination {
|
||||
border-top: 1px solid $color-homepage-borders;
|
||||
color: $color-text-light;
|
||||
display: flex;
|
||||
font-size: 13px;
|
||||
padding: $grid-gap-medium;
|
||||
|
||||
a {
|
||||
height: 20px;
|
||||
margin-left: $grid-gap;
|
||||
|
||||
svg {
|
||||
margin: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
svg {
|
||||
fill: $color-text-light;
|
||||
height: 20px;
|
||||
margin-left: $grid-gap;
|
||||
opacity: .4;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
@ -1,117 +0,0 @@
|
||||
.mailpoet-subscribers-stats {
|
||||
.mailpoet-homepage-section__heading-after span {
|
||||
color: darken($color-stats-excellent, 10%);
|
||||
display: grid;
|
||||
font-size: 20px;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
justify-items: end;
|
||||
line-height: 28px;
|
||||
|
||||
svg {
|
||||
fill: darken($color-stats-excellent, 10%);
|
||||
height: 28px;
|
||||
width: 28px;
|
||||
}
|
||||
|
||||
&.mailpoet-decrease {
|
||||
color: darken($color-stats-critical, 10%);
|
||||
|
||||
svg {
|
||||
fill: darken($color-stats-critical, 10%);
|
||||
transform: scale(1, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-subscribers-stats-global-change {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
width: 100%;
|
||||
|
||||
div {
|
||||
color: $color-text-light;
|
||||
padding: $grid-gap-medium;
|
||||
text-transform: uppercase;
|
||||
|
||||
&:first-child {
|
||||
border-right: 1px solid $color-homepage-borders;
|
||||
}
|
||||
|
||||
span {
|
||||
color: $color-homepage-dark-grey;
|
||||
font-size: 20px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-subscribers-stats-list-change-table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
|
||||
thead {
|
||||
background: $color-homepage-light-grey;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
a {
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
border: none;
|
||||
border-top: 1px solid $color-homepage-borders;
|
||||
color: $color-homepage-dark-grey;
|
||||
padding: $grid-gap $grid-gap-medium;
|
||||
text-align: left;
|
||||
|
||||
@include respond-to(small-screen) {
|
||||
padding: $grid-gap $grid-gap-half;
|
||||
|
||||
&:first-child {
|
||||
padding-left: $grid-gap-medium;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
padding-right: $grid-gap-medium;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include respond-to(small-screen) {
|
||||
td:nth-child(2),
|
||||
th:nth-child(2) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-subscribers-stats-empty {
|
||||
align-items: center;
|
||||
color: $color-text-light;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 13px;
|
||||
justify-content: center;
|
||||
padding: $grid-gap-large;
|
||||
|
||||
svg {
|
||||
background: $color-homepage-light-grey;
|
||||
border-radius: 50%;
|
||||
fill: $color-secondary;
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
p {
|
||||
max-width: 340px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
@ -1,126 +0,0 @@
|
||||
$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;
|
||||
}
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
.mailpoet-homepage-upsell {
|
||||
background: bottom right/290px no-repeat url('../../img/homepage/upsell-illustration.png') #fffaf2;
|
||||
min-height: 288px;
|
||||
|
||||
.mailpoet-homepage-section__heading {
|
||||
border: none;
|
||||
height: auto;
|
||||
padding: 0;
|
||||
|
||||
h2 {
|
||||
background-color: $color-white;
|
||||
max-width: 330px;
|
||||
padding: 32px 20px 0 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-homepage-section__heading-after {
|
||||
bottom: 20px;
|
||||
position: relative;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.mailpoet-homepage-upsell__content {
|
||||
background-color: $color-white;
|
||||
max-width: 330px;
|
||||
padding: 8px 20px 32px 40px;
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0 0 8px;
|
||||
|
||||
li {
|
||||
line-height: 16px;
|
||||
margin: 4px 0;
|
||||
|
||||
svg {
|
||||
fill: $color-secondary-middle;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
span {
|
||||
line-height: 18px;
|
||||
padding-left: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include respond-to(small-screen) {
|
||||
.mailpoet-homepage-upsell {
|
||||
background: $color-white;
|
||||
|
||||
.mailpoet-homepage-section__heading {
|
||||
h2 {
|
||||
max-width: 270px;
|
||||
}
|
||||
}
|
||||
|
||||
.mailpoet-homepage-upsell__content {
|
||||
max-width: 270px;
|
||||
}
|
||||
}
|
||||
}
|
@ -56,7 +56,6 @@ p.sender_email_address_warning:first-child {
|
||||
// Fix for select 2 placeholder padding rendering issue in Chrome
|
||||
.select2-container .select2-search--inline,
|
||||
.select2-container .select2-search--inline .select2-search__field {
|
||||
height: 22px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@ -123,21 +122,3 @@ body .components-modal__screen-overlay {
|
||||
justify-content: flex-end;
|
||||
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;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user