Skip to content

Commit

Permalink
release(minor): version 2.5.0
Browse files Browse the repository at this point in the history
### New Features
- **AI Patterns Layout Generator**: Introducing a new AI-driven utility for designing layouts with Otter Patterns.
- **Block Management Page**: A new centralized page to manage all Otter blocks' visibility.
- **Pagination in Posts Block**: Adds pagination functionality for better navigation.
- **Enhanced Block Animations**: Customizable delay/speed, animation offset, and hover controls for dynamic block animations.
- **Export Option in Form Submission**: Facilitates exporting form submissions to CSV for easier data management.
- **New Block Visibility Conditions**: Option to hide blocks depending on the device used.

### Improvements
- **Form Marketing Enhancements**: Improved Marketing Action explanations and email field detection.
- **Advanced Heading Enhancements**: New Bottom Margin option added to the Advanced Heading block.

### Bug Fixes
- **Fix Maps Block Compatibility with Neve**: Resolved integration issues with Neve.
- **Fix Live Search Styling**: Corrected CSS calculation problems in Live Search Popup.
- **Fix RankMath Compatibility**: Addressed a recent regression affecting Otter's functionality with RankMath.
- **Fix Form Generating Error**: Removed outdated base64 checks in Form File validation.
- **Fix Count Animation Settings**: Adjusted delay and speed settings for consistent Count Animation performance.
  • Loading branch information
HardeepAsrani authored Nov 16, 2023
2 parents caccd40 + c5b9afa commit 1f6d787
Show file tree
Hide file tree
Showing 153 changed files with 13,279 additions and 14,450 deletions.
40 changes: 14 additions & 26 deletions .github/workflows/e2e-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test e2e for JS

on:
pull_request:
types: [ opened, synchronize, ready_for_review ]
types: [opened, synchronize, ready_for_review]
branches-ignore:
- "update_dependencies"

Expand Down Expand Up @@ -64,18 +64,15 @@ jobs:
- name: Playwright Blocks
run: |
npm run test:e2e:playwright
npm run test:e2e:playwright && echo "PLAYWRIGHT_SUCCESS=true" >> $GITHUB_ENV || echo "PLAYWRIGHT_SUCCESS=false" >> $GITHUB_EN
continue-on-error: true

# run the node.js puppeteer script (which takes the screenshots and controls chrome)
- name: Performance check
run: |
npm run test:e2e:performance
npm run test:performance
cat artifacts/post-editor.performance-results.json
- name: Block ID reliability
run: |
npm run test:e2e:blockId
- name: Upload video files
- name: Upload tests artifacts
if: always()
uses: actions/upload-artifact@v2
with:
Expand All @@ -85,27 +82,18 @@ jobs:

- name: Print the results
run: |
echo "::set-output name=TYPING_AVG::$(jq '.summary.type.average' ./artifacts/performance.spec.performance-results.json)"
echo "::set-output name=TYPING_SD::$(jq '.summary.type.standardDeviation' ./artifacts/performance.spec.performance-results.json)"
echo "::set-output name=TYPING_MD::$(jq '.summary.type.median' ./artifacts/performance.spec.performance-results.json)"
echo "::set-output name=TYPING_QR60::$(jq '.summary.type.quantileRank60' ./artifacts/performance.spec.performance-results.json)"
echo "::set-output name=TYPING_ABOVE_60::$(jq -c '.summary.type.above60' ./artifacts/performance.spec.performance-results.json)"
echo "::set-output name=TYPING_QR80::$(jq '.summary.type.quantileRank80' ./artifacts/performance.spec.performance-results.json)"
RESULTS=$(jq -r 'to_entries|map("\(.key): \(.value)")|join(", ")' artifacts/post-editor.performance-results.json)
FLAKY_TEST_STATUS="Playwright Test Status: $PLAYWRIGHT_SUCCESS"
echo "::set-output name=PERFORMANCE_OUTPUT::$RESULTS"
echo "::set-output name=FLAKY_TEST_STATUS::$FLAKY_TEST_STATUS"
id: summary

- name: Comment
uses: NejcZdovc/comment-pr@v1
uses: NejcZdovc/comment-pr@v2
with:
file: 'e2e-summary.md'
file: "e2e-summary.md"
identifier: "GITHUB_E2E_SUMMARY"
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
TYPING_AVG: ${{ steps.summary.outputs.TYPING_AVG }}
TYPING_SD: ${{ steps.summary.outputs.TYPING_SD }}
TYPING_MD: ${{ steps.summary.outputs.TYPING_MD }}
TYPING_QR60: ${{ steps.summary.outputs.TYPING_QR60 }}
TYPING_QR80: ${{ steps.summary.outputs.TYPING_QR80 }}
TYPING_ABOVE_60: ${{ steps.summary.outputs.TYPING_ABOVE_60 }}



PERFORMANCE_OUTPUT: ${{ steps.summary.outputs.PERFORMANCE_OUTPUT }}
FLAKY_TEST_STATUS: ${{ steps.summary.outputs.FLAKY_TEST_STATUS }}
14 changes: 5 additions & 9 deletions .github/workflows/e2e-summary.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
## E2E Summary
## E2E Tests

### Typing

| Test | Average Time (ms) | Standard Deviation (ms) | Median Time (ms) | Quantile for soft limit (%) | Quantile for hard limit (%) |
| -----: | :---------------: | :---------------------: | :---------------: | :-------------------: | :-------------------: |
| Typing | {TYPING_AVG} | {TYPING_SD} | {TYPING_MD} | {TYPING_QR60} (60ms) | {TYPING_QR80} (80ms) |
{FLAKY_TEST_STATUS}

<details>
<summary>Values above 60ms</summary>
{TYPING_ABOVE_60}
</details>
<summary>Performance Results</summary>
{PERFORMANCE_OUTPUT}
</details>
72 changes: 41 additions & 31 deletions .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,18 @@ jobs:
- name: Run PHPCS
run: composer run lint

phpunit:
name: Phpunit
phpstan:
name: PHPStan
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Setup PHP version
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
php-version: '7.4'
extensions: simplexml, mysql
tools: phpunit:7.5.15
- name: Checkout source code
uses: actions/checkout@v2
- name: Install WordPress Test Suite
run: |
bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:${{ job.services.mysql.ports['3306'] }}
- name: Get Composer Cache Directory
id: composer-cache
run: |
Expand All @@ -70,33 +58,55 @@ jobs:
${{ runner.os }}-composer-
- name: Install composer
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run phpunit
run: phpunit
- name: PHPStan Static Analysis
run: composer phpstan

phpstan:
name: PHPStan
unit:
name: UnitTests
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
steps:
- name: Setup PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: simplexml, mysql
- name: Checkout source code
uses: actions/checkout@v2
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Setup Composer cache
uses: actions/cache@v1
# setup the composer cache (vendor) with github actions cache and the cache dir defined in the previous step
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
# run composer install
- name: Install composer
run: composer install --prefer-dist --no-progress --no-suggest
- name: PHPStan Static Analysis
run: composer phpstan

- name: Create License File
run: |
printf "{\"key\":\"${{ secrets.OTTER_PRO_LICENSE }}\"}" > license.json
# setup the node cache (node_modules) with github actions cache
- name: Cache Node - npm
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-cache-
- name: npm ci
run: |
npm ci
- name: Setup WP Env
run: |
npm run test:unit:php:setup
- name: Run PHP Unit Tests
run: |
npm run test:unit:php:base
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ artifacts
*.results.json
trace.json
license.json
.phpunit.result.cache
.fleet
1 change: 1 addition & 0 deletions .phpunit.result.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":1,"defects":{"TestBlockConditions::test_hide_css_desktop_condition":3},"times":{"TestBlockConditions::test_logged_in_user_on_login":0.034,"TestBlockConditions::test_logged_in_user_on_logout":0.023,"TestBlockConditions::test_logged_out_user_on_login":0.028,"TestBlockConditions::test_logged_out_user_on_logout":0.028,"TestBlockConditions::test_user_roles_has_role":0.028,"TestBlockConditions::test_user_roles_does_not_have_role":0.028,"TestBlockConditions::test_post_type":0.028,"TestBlockConditions::test_post_type_on_invalid":0.028,"TestBlockConditions::test_post_category":0.028,"TestBlockConditions::test_post_category_on_invalid":0.028,"TestBlockConditions::test_logged_in_user_meta":0.028,"TestBlockConditions::test_logged_in_user_meta_invalid":0.03,"TestBlockConditions::test_post_meta":0.029,"TestBlockConditions::test_post_meta_invalid":0.029,"TestBlockConditions::test_date_range":0.029,"TestBlockConditions::test_date_range_invalid":0.029,"TestBlockConditions::test_date_recurring":0.029,"TestBlockConditions::test_multiple_conditions":0.03,"TestBlockConditions::test_multiple_conditions__with_one_invalid":0.029,"TestBlockConditions::test_multiple_conditions_with_all_invalid":0.029,"TestBlockConditions::test_or_collection":0.029,"TestBlockConditions::test_or_collection_invalid":0.03,"TestBlockConditions::test_hide_css_desktop_condition":0.03,"TestCSS::test_css_simple":0,"TestCSS::test_css_defaults":0,"TestCSS::test_css_format":0,"TestCSS::test_css_condition":0.002,"TestCSS::test_css_pattern":0,"TestCSS::test_render_box":0,"TestDynamicContent::test_post_id":0.029,"TestDynamicContent::test_post_type":0.026,"TestDynamicContent::test_post_title":0.025,"TestDynamicContent::test_post_status":0.028,"TestDynamicContent::test_post_content":0.028,"TestDynamicContent::test_post_excerpt":0.028,"TestDynamicContent::test_post_date":0.032,"TestDynamicContent::test_post_time":0.032,"TestDynamicContent::test_post_terms":0.028,"TestDynamicContent::test_post_meta":0.029,"TestDynamicContent::test_acf":0.028,"TestDynamicContent::test_site_title":0.028,"TestDynamicContent::test_site_tagline":0.029,"TestDynamicContent::test_author_name":0.028,"TestDynamicContent::test_author_description":0.029,"TestDynamicContent::test_author_meta":0.028,"TestDynamicContent::test_logged_in_user_name":0.029,"TestDynamicContent::test_logged_in_user_description":0.028,"TestDynamicContent::test_logged_in_user_email":0.028,"TestDynamicContent::test_logged_in_user_meta":0.028,"TestDynamicContent::test_archive_title":0.028,"TestDynamicContent::test_archive_description":0.029,"TestDynamicContent::test_date":0.028,"TestDynamicContent::test_time":0.028,"TestDynamicContent::test_query_string":0.028,"TestDynamicContent::test_country":0.028,"TestDynamicContent::test_post_id_evaluation":0.028,"TestDynamicContent::test_post_type_evaluation":0.029,"TestDynamicContent::test_post_title_evaluation":0.03,"TestDynamicContent::test_post_status_evaluation":0.035,"TestDynamicContent::test_post_content_evaluation":0.033,"TestDynamicContent::test_post_excerpt_evaluation":0.029,"TestDynamicContent::test_logged_in_user_name_evaluation":0.028,"TestDynamicContent::test_logged_in_user_description_evaluation":0.027,"TestDynamicContent::test_logged_in_user_email_evaluation":0.029,"TestDynamicContent::test_date_evaluation":0.028,"TestDynamicContent::test_time_evaluation":0.027,"TestDynamicContent::test_author_name_evaluation":0.028,"TestDynamicContent::test_author_description_evaluation":0.029,"TestDynamicContent::test_multiple_dynamic_content_queries":0.03,"TestDynamicContent::test_multiple_dynamic_content_queries_on_long_content":0.05,"TestPatterns::test_fetch_patterns":0.475,"TestStripeAPI::test_retrieve_products":0.053,"TestStripeAPI::test_retrieve_prices":0.002,"TestStripeAPI::test_retrieve_product":0.001,"TestStripeAPI::test_retrieve_price":0.001,"TestStripeAPI::test_retrieve_session_email":0.001,"TestStripeAPI::test_user_purchase":0.001,"TestStripeAPI::test_status_for_price_id":0.001,"TestBlockConditions::test_hide_css_tablet_condition":0.028,"TestBlockConditions::test_hide_css_mobile_condition":0.029,"TestBlockConditions::test_hide_css_all_condition":0.028,"TestBlockConditions::test_get_css_hide_condition":0.03,"TestBlockConditions::test_get_css_hide_condition_no_hide":0.028}}
9 changes: 6 additions & 3 deletions .wp-env.override.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
"plugins": [
"."
],
"themes": [ "./test/emptytheme" ],
"mappings": {
"wp-content/mu-plugins": "./node_modules/@wordpress/e2e-tests/mu-plugins",
"wp-content/plugins/gutenberg-test-plugins": "./node_modules/@wordpress/e2e-tests/plugins",
"wp-content/themes/gutenberg-test-themes/twentytwentythree": "https://downloads.wordpress.org/theme/twentytwentythree.1.0.zip"
"wp-content/mu-plugins": "./packages/e2e-tests/mu-plugins",
"wp-content/plugins/gutenberg-test-plugins": "./packages/e2e-tests/plugins",
"wp-content/themes/gutenberg-test-themes": "./test/gutenberg-test-themes",
"wp-content/themes/gutenberg-test-themes/twentytwentyone": "https://downloads.wordpress.org/theme/twentytwentyone.1.7.zip",
"wp-content/themes/gutenberg-test-themes/twentytwentythree": "https://downloads.wordpress.org/theme/twentytwentythree.1.0.zip"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
"tubalmartin/cssmin": "^4.1",
"wptt/webfont-loader": "^1.1",
"sabberworm/php-css-parser": "^8.4",
"stripe/stripe-php": "^12.1"
"stripe/stripe-php": "^13.1"
}
}
Loading

0 comments on commit 1f6d787

Please sign in to comment.