Skip to content

Commit

Permalink
release: v2.4.1
Browse files Browse the repository at this point in the history
### New Features
- **Live Search Extension Asset Loading**: Now allows you to load assets required for live search with a hook.
- **Rank Math Compatibility**: Added support for Rank Maths' internal links detection in Posts Block.

### Improvements
- **Enhancement for Tabs Block**: Makes it easier to switch between tabs in the editor.
- **Decrease Delay in Dashboard Options**: This PR decreases the delay in enabling/disabling dashboard options.
- **State Consistency for Dashboard Buttons**: Improved the state consistency of buttons in the Dashboard.
- **Typography Control Enhancements**: Made enhancements to typography controls for better user experience.
- **Black Friday Preparations**: Getting set for upcoming Black Friday updates.

### Bug Fixes
- **Widget Assets**: Fixed the issue where assets for widgets appeared even in pages where the asset doesn’t exist.
- **Typing Animation Cursor Color**: Addressed the issue with the typing animation cursor color not being correct.
- **Build Files Placement**: Resolved the problem of build files being added to unnecessary places.
  • Loading branch information
HardeepAsrani authored Oct 25, 2023
2 parents 79f3f77 + 95ea4a0 commit 6967f6e
Show file tree
Hide file tree
Showing 34 changed files with 1,516 additions and 455 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/e2e-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
e2e:
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:
# 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: |
Expand All @@ -40,11 +40,11 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-cache-
- name: npm ci
run: |
npm ci
- name: Make dev build
run: |
npm run build-dev
Expand All @@ -60,11 +60,11 @@ jobs:
- name: Install Playwright
run: |
npm install -g playwright-cli
npx playwright install
npx playwright install
- name: Playwright Blocks
- name: Playwright Blocks
run: |
npm run test:e2e:playwright
npm run test:e2e:playwright
# run the node.js puppeteer script (which takes the screenshots and controls chrome)
- name: Performance check
Expand All @@ -80,9 +80,9 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: artifact
path: ./artifacts/tests/
path: ./artifacts
retention-days: 1

- name: Print the results
run: |
echo "::set-output name=TYPING_AVG::$(jq '.summary.type.average' ./artifacts/performance.spec.performance-results.json)"
Expand All @@ -91,7 +91,7 @@ jobs:
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)"
id: summary
id: summary

- name: Comment
uses: NejcZdovc/comment-pr@v1
Expand All @@ -107,5 +107,5 @@ jobs:
TYPING_QR80: ${{ steps.summary.outputs.TYPING_QR80 }}
TYPING_ABOVE_60: ${{ steps.summary.outputs.TYPING_ABOVE_60 }}



Binary file modified assets/images/black-friday-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"yoast/phpunit-polyfills": "^2.0",
"phpstan/phpstan": "^1.10",
"szepeviktor/phpstan-wordpress": "^1.3",
"php-stubs/woocommerce-stubs": "^7.7",
"php-stubs/woocommerce-stubs": "^8.0",
"php-stubs/acf-pro-stubs": "^6.0",
"spaze/phpstan-stripe": "^2.4"
},
Expand Down
80 changes: 39 additions & 41 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inc/class-blocks-css.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function_exists( 'wp_is_block_theme' ) &&
$templates_parts = get_block_templates( array( 'slugs__in' => $slugs ), 'wp_template_part' );

foreach ( $templates_parts as $templates_part ) {
if ( isset( $templates_part->content ) && isset( $templates_part->slug ) && in_array( $templates_part->slug, $slugs ) ) {
if ( ! empty( $templates_part->content ) && ! empty( $templates_part->slug ) && in_array( $templates_part->slug, $slugs ) ) {
$content .= $templates_part->content;
}
}
Expand Down
2 changes: 2 additions & 0 deletions inc/class-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace ThemeIsle\GutenbergBlocks;

use ThemeIsle\GutenbergBlocks\Plugins\LimitedOffers;
use ThemeIsle\GutenbergBlocks\Server\Dashboard_Server;

/**
Expand Down Expand Up @@ -44,6 +45,7 @@ public function init() {
}

add_filter( 'otter_blocks_about_us_metadata', array( $this, 'about_page' ) );

}

/**
Expand Down
24 changes: 24 additions & 0 deletions inc/class-pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

namespace ThemeIsle\GutenbergBlocks;

use ThemeIsle\GutenbergBlocks\Plugins\LimitedOffers;

/**
* Class Pro
*/
Expand Down Expand Up @@ -51,6 +53,8 @@ public function init_upsells() {
add_action( 'otter_montly_scheduled_events', array( $this, 'reset_dashboard_notice' ) );
add_action( 'admin_init', array( $this, 'should_show_dashboard_upsell' ), 11 );
add_filter( 'plugin_action_links_' . plugin_basename( OTTER_BLOCKS_BASEFILE ), array( $this, 'add_pro_link' ) );

add_action( 'admin_init', array( $this, 'load_offers' ), 11 );
}

/**
Expand Down Expand Up @@ -180,6 +184,12 @@ public function should_show_dashboard_upsell() {
$show_upsell = true;
}

$offers = new LimitedOffers();

if ( $offers->is_active() ) {
$show_upsell = false;
}

if ( $show_upsell ) {
add_action( 'admin_notices', array( $this, 'dashboard_upsell_notice' ) );
add_action( 'wp_ajax_dismiss_otter_notice', array( $this, 'dismiss_dashboard_notice' ) );
Expand Down Expand Up @@ -416,6 +426,20 @@ public function add_pro_link( $links ) {
return $links;
}

/**
* Load offers.
*
* @return void
*/
public function load_offers() {
if ( ! self::is_pro_installed() ) {
$offer = new LimitedOffers();
if ( $offer->can_show_dashboard_banner() && $offer->is_active() ) {
$offer->load_dashboard_hooks();
}
}
}

/**
* Singleton method.
*
Expand Down
Loading

0 comments on commit 6967f6e

Please sign in to comment.