From adabea225a04df880f0b6e120ee8dcad82c3445d Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Thu, 28 Sep 2023 16:06:37 +0200 Subject: [PATCH 1/7] feat: remove is_non_interactive method This feature has been deprecated. --- includes/class-newspack-popups-settings.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/includes/class-newspack-popups-settings.php b/includes/class-newspack-popups-settings.php index 2dbe1dd0..279efd37 100644 --- a/includes/class-newspack-popups-settings.php +++ b/includes/class-newspack-popups-settings.php @@ -349,17 +349,6 @@ function ( $carry, $item ) { return $settings_list; } - /** - * Is the non-interactive setting on? - * - * Deprecated: There is no longer a non interactive mode - * - * @deprecated - */ - public static function is_non_interactive() { - return false; - } - /** * Donor landing page. */ From fa30d54811f48e0c076051f6d478d5a06d72eb8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:05:36 +0000 Subject: [PATCH 2/7] chore(deps-dev): bump postcss-scss from 4.0.8 to 4.0.9 Bumps [postcss-scss](https://github.com/postcss/postcss-scss) from 4.0.8 to 4.0.9. - [Changelog](https://github.com/postcss/postcss-scss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-scss/compare/4.0.8...4.0.9) --- updated-dependencies: - dependency-name: postcss-scss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 052b987b..ef39336e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "eslint": "^7.32.0", "lint-staged": "^13.2.3", "newspack-scripts": "^5.1.0", - "postcss-scss": "^4.0.8", + "postcss-scss": "^4.0.9", "prettier": "npm:wp-prettier@^2.2.1-beta-1", "stylelint": "^15.10.3" } @@ -26098,9 +26098,9 @@ } }, "node_modules/postcss-scss": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.8.tgz", - "integrity": "sha512-Cr0X8Eu7xMhE96PJck6ses/uVVXDtE5ghUTKNUYgm8ozgP2TkgV3LWs3WgLV1xaSSLq8ZFiXaUrj0LVgG1fGEA==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz", + "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==", "dev": true, "funding": [ { @@ -51884,9 +51884,9 @@ "requires": {} }, "postcss-scss": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.8.tgz", - "integrity": "sha512-Cr0X8Eu7xMhE96PJck6ses/uVVXDtE5ghUTKNUYgm8ozgP2TkgV3LWs3WgLV1xaSSLq8ZFiXaUrj0LVgG1fGEA==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz", + "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==", "dev": true, "requires": {} }, diff --git a/package.json b/package.json index e4f4b064..f2eb0e66 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "eslint": "^7.32.0", "lint-staged": "^13.2.3", "newspack-scripts": "^5.1.0", - "postcss-scss": "^4.0.8", + "postcss-scss": "^4.0.9", "prettier": "npm:wp-prettier@^2.2.1-beta-1", "stylelint": "^15.10.3" } From d7dbabbb23bcc475ed610279bfcf314a65fccf5d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:07:45 +0000 Subject: [PATCH 3/7] chore(deps-dev): bump @rushstack/eslint-patch from 1.4.0 to 1.5.1 Bumps [@rushstack/eslint-patch](https://github.com/microsoft/rushstack/tree/HEAD/eslint/eslint-patch) from 1.4.0 to 1.5.1. - [Changelog](https://github.com/microsoft/rushstack/blob/main/eslint/eslint-patch/CHANGELOG.md) - [Commits](https://github.com/microsoft/rushstack/commits/@rushstack/eslint-patch_v1.5.1/eslint/eslint-patch) --- updated-dependencies: - dependency-name: "@rushstack/eslint-patch" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index ef39336e..6bd892eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "qs": "^6.11.2" }, "devDependencies": { - "@rushstack/eslint-patch": "^1.4.0", + "@rushstack/eslint-patch": "^1.5.1", "eslint": "^7.32.0", "lint-staged": "^13.2.3", "newspack-scripts": "^5.1.0", @@ -4390,9 +4390,9 @@ } }, "node_modules/@rushstack/eslint-patch": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.4.0.tgz", - "integrity": "sha512-cEjvTPU32OM9lUFegJagO0mRnIn+rbqrG89vV8/xLnLFX0DoR0r1oy5IlTga71Q7uT3Qus7qm7wgeiMT/+Irlg==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.5.1.tgz", + "integrity": "sha512-6i/8UoL0P5y4leBIGzvkZdS85RDMG9y1ihZzmTZQ5LdHUYmZ7pKFoj8X0236s3lusPs1Fa5HTQUpwI+UfTcmeA==", "dev": true }, "node_modules/@semantic-release/changelog": { @@ -35286,9 +35286,9 @@ } }, "@rushstack/eslint-patch": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.4.0.tgz", - "integrity": "sha512-cEjvTPU32OM9lUFegJagO0mRnIn+rbqrG89vV8/xLnLFX0DoR0r1oy5IlTga71Q7uT3Qus7qm7wgeiMT/+Irlg==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.5.1.tgz", + "integrity": "sha512-6i/8UoL0P5y4leBIGzvkZdS85RDMG9y1ihZzmTZQ5LdHUYmZ7pKFoj8X0236s3lusPs1Fa5HTQUpwI+UfTcmeA==", "dev": true }, "@semantic-release/changelog": { diff --git a/package.json b/package.json index f2eb0e66..cb0455f3 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "qs": "^6.11.2" }, "devDependencies": { - "@rushstack/eslint-patch": "^1.4.0", + "@rushstack/eslint-patch": "^1.5.1", "eslint": "^7.32.0", "lint-staged": "^13.2.3", "newspack-scripts": "^5.1.0", From bbb952d0f696bb72850607579574a2a0d19d82a3 Mon Sep 17 00:00:00 2001 From: Miguel Peixe Date: Wed, 4 Oct 2023 18:09:00 -0300 Subject: [PATCH 4/7] fix: deduplication strategy for Homepage Posts block (#1228) --- includes/class-newspack-popups-model.php | 29 ++++++++++++++++-------- includes/class-newspack-popups.php | 17 ++++++++++++++ src/editor/index.js | 19 +++++++++++++++- 3 files changed, 54 insertions(+), 11 deletions(-) diff --git a/includes/class-newspack-popups-model.php b/includes/class-newspack-popups-model.php index 77ea051a..87e66aba 100644 --- a/includes/class-newspack-popups-model.php +++ b/includes/class-newspack-popups-model.php @@ -43,6 +43,13 @@ final class Newspack_Popups_Model { */ protected static $form_hooks_popup_id; + /** + * The current popup. + * + * @var array|null + */ + protected static $current_popup = null; + /** * Retrieve all Popups (first 100). * @@ -976,9 +983,19 @@ class="" "
- { + const { getEditedPostAttribute } = select( 'core/editor' ); + return { + placement: getEditedPostAttribute( 'meta' )?.placement, + }; + } ); + if ( ! isOverlayPlacement( placement ) ) { + return null; + } + return ; + }, + icon: null, +} ); + // Add a button in post status section const PluginPostStatusInfoTest = () => ( From 4bc1fa46b022cdadcad7dd8b1506bd14c4748fe3 Mon Sep 17 00:00:00 2001 From: matticbot Date: Mon, 16 Oct 2023 16:41:42 +0000 Subject: [PATCH 5/7] chore(release): 2.25.0-alpha.1 [skip ci] # [2.25.0-alpha.1](https://github.com/Automattic/newspack-popups/compare/v2.24.0...v2.25.0-alpha.1) (2023-10-16) ### Bug Fixes * deduplication strategy for Homepage Posts block ([#1228](https://github.com/Automattic/newspack-popups/issues/1228)) ([bbb952d](https://github.com/Automattic/newspack-popups/commit/bbb952d0f696bb72850607579574a2a0d19d82a3)) ### Features * remove is_non_interactive method ([adabea2](https://github.com/Automattic/newspack-popups/commit/adabea225a04df880f0b6e120ee8dcad82c3445d)) --- CHANGELOG.md | 12 ++++++++++++ newspack-popups.php | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c61db427..688ee8a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# [2.25.0-alpha.1](https://github.com/Automattic/newspack-popups/compare/v2.24.0...v2.25.0-alpha.1) (2023-10-16) + + +### Bug Fixes + +* deduplication strategy for Homepage Posts block ([#1228](https://github.com/Automattic/newspack-popups/issues/1228)) ([bbb952d](https://github.com/Automattic/newspack-popups/commit/bbb952d0f696bb72850607579574a2a0d19d82a3)) + + +### Features + +* remove is_non_interactive method ([adabea2](https://github.com/Automattic/newspack-popups/commit/adabea225a04df880f0b6e120ee8dcad82c3445d)) + # [2.24.0](https://github.com/Automattic/newspack-popups/compare/v2.23.1...v2.24.0) (2023-10-09) diff --git a/newspack-popups.php b/newspack-popups.php index 6d199383..24579a82 100755 --- a/newspack-popups.php +++ b/newspack-popups.php @@ -7,7 +7,7 @@ * Author URI: https://newspack.com * Text Domain: newspack-popups * Domain Path: /languages - * Version: 2.24.0 + * Version: 2.25.0-alpha.1 * * @package Newspack_Popups */ diff --git a/package-lock.json b/package-lock.json index 14a4ec8a..72402aca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "newspack-popups", - "version": "2.24.0", + "version": "2.25.0-alpha.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "newspack-popups", - "version": "2.24.0", + "version": "2.25.0-alpha.1", "dependencies": { "classnames": "^2.3.2", "intersection-observer": "^0.12.2", diff --git a/package.json b/package.json index 3e9c3f46..60cdd094 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "newspack-popups", - "version": "2.24.0", + "version": "2.25.0-alpha.1", "main": "Gruntfile.js", "author": "Automattic", "scripts": { From 6c86cd3c5689622160b7d118764b1c62a77b95e2 Mon Sep 17 00:00:00 2001 From: Miguel Peixe Date: Thu, 19 Oct 2023 10:33:50 -0300 Subject: [PATCH 6/7] feat: implement ras overlays (#1233) --- src/view/segmentation.js | 5 +++++ src/view/utils/prompts.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/view/segmentation.js b/src/view/segmentation.js index cd601549..12839654 100644 --- a/src/view/segmentation.js +++ b/src/view/segmentation.js @@ -55,6 +55,11 @@ export const handleSegmentation = prompts => { if ( ras ) { handleSeen( prompt, ras ); } + + // Register the overlay in RAS. + if ( isOverlay && ras?.overlays ) { + prompt.overlayId = ras.overlays.add(); + } }; if ( isOverlay ) { const scroll = prompt.getAttribute( 'data-scroll' ); diff --git a/src/view/utils/prompts.js b/src/view/utils/prompts.js index 2fdaee8e..c1a14eca 100644 --- a/src/view/utils/prompts.js +++ b/src/view/utils/prompts.js @@ -33,6 +33,11 @@ export const closeOverlay = event => { parent.style.display = 'none'; } + // Remove the overlay from RAS. + if ( parent.overlayId && window.newspackReaderActivation?.overlays ) { + window.newspackReaderActivation.overlays.remove( parent.overlayId ); + } + event.preventDefault(); }; From d0e22d41c0a14122aeeb7698454bb94bf3839527 Mon Sep 17 00:00:00 2001 From: matticbot Date: Fri, 20 Oct 2023 15:58:09 +0000 Subject: [PATCH 7/7] chore(release): 2.25.0-alpha.2 [skip ci] # [2.25.0-alpha.2](https://github.com/Automattic/newspack-popups/compare/v2.25.0-alpha.1...v2.25.0-alpha.2) (2023-10-20) ### Features * implement ras overlays ([#1233](https://github.com/Automattic/newspack-popups/issues/1233)) ([6c86cd3](https://github.com/Automattic/newspack-popups/commit/6c86cd3c5689622160b7d118764b1c62a77b95e2)) --- CHANGELOG.md | 7 +++++++ newspack-popups.php | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 688ee8a8..ffbf71b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [2.25.0-alpha.2](https://github.com/Automattic/newspack-popups/compare/v2.25.0-alpha.1...v2.25.0-alpha.2) (2023-10-20) + + +### Features + +* implement ras overlays ([#1233](https://github.com/Automattic/newspack-popups/issues/1233)) ([6c86cd3](https://github.com/Automattic/newspack-popups/commit/6c86cd3c5689622160b7d118764b1c62a77b95e2)) + # [2.25.0-alpha.1](https://github.com/Automattic/newspack-popups/compare/v2.24.0...v2.25.0-alpha.1) (2023-10-16) diff --git a/newspack-popups.php b/newspack-popups.php index 24579a82..4bb4df56 100755 --- a/newspack-popups.php +++ b/newspack-popups.php @@ -7,7 +7,7 @@ * Author URI: https://newspack.com * Text Domain: newspack-popups * Domain Path: /languages - * Version: 2.25.0-alpha.1 + * Version: 2.25.0-alpha.2 * * @package Newspack_Popups */ diff --git a/package-lock.json b/package-lock.json index 72402aca..fd9ea385 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "newspack-popups", - "version": "2.25.0-alpha.1", + "version": "2.25.0-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "newspack-popups", - "version": "2.25.0-alpha.1", + "version": "2.25.0-alpha.2", "dependencies": { "classnames": "^2.3.2", "intersection-observer": "^0.12.2", diff --git a/package.json b/package.json index 60cdd094..f6bddab6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "newspack-popups", - "version": "2.25.0-alpha.1", + "version": "2.25.0-alpha.2", "main": "Gruntfile.js", "author": "Automattic", "scripts": {