From 09fc74333b91a0677cfbd02a36585b9ea8f7941d Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 26 Apr 2024 11:35:04 -0400 Subject: [PATCH 01/25] add features module and updated staging module add features to runtime and adjust menus accordingly --- bootstrap.php | 4 +++ composer.json | 3 +- composer.lock | 71 +++++++++++++++++++++++++++++++++++++----- inc/Admin.php | 33 +++++++++----------- inc/Data.php | 3 +- src/app/data/routes.js | 2 +- 6 files changed, 86 insertions(+), 30 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index 962ac77f1..8429ff7fd 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -199,3 +199,7 @@ function () { if ( is_admin() ) { new Admin(); } + + + +require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-features/bootstrap.php'; \ No newline at end of file diff --git a/composer.json b/composer.json index 4773939a0..16d8965b2 100644 --- a/composer.json +++ b/composer.json @@ -72,6 +72,7 @@ "newfold-labs/wp-module-data": "^2.4.24", "newfold-labs/wp-module-deactivation": "^1.1.1", "newfold-labs/wp-module-ecommerce": "^1.3.27", + "newfold-labs/wp-module-features": "dev-main", "newfold-labs/wp-module-global-ctb": "^1.0.11", "newfold-labs/wp-module-help-center": "^1.0.24", "newfold-labs/wp-module-loader": "^1.0.10", @@ -83,7 +84,7 @@ "newfold-labs/wp-module-runtime": "^1.0.10", "newfold-labs/wp-module-secure-passwords": "^1.1.1", "newfold-labs/wp-module-sso": "^1.0.5", - "newfold-labs/wp-module-staging": "^1.3.3", + "newfold-labs/wp-module-staging": "dev-develop", "wp-forge/wp-update-handler": "^1.0.2", "wp-forge/wp-upgrade-handler": "^1.0" } diff --git a/composer.lock b/composer.lock index 6389cd838..4374a9055 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3b6feba64a1a3a41aca68f84d00bab32", + "content-hash": "af3b1480664ef81c9f69ed24f42e6204", "packages": [ { "name": "doctrine/inflector", @@ -620,6 +620,58 @@ }, "time": "2024-02-12T08:48:41+00:00" }, + { + "name": "newfold-labs/wp-module-features", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/newfold-labs/wp-module-features.git", + "reference": "b8642cadff5ec6909c134fa87c605b5de4d2585a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/b8642cadff5ec6909c134fa87c605b5de4d2585a", + "reference": "b8642cadff5ec6909c134fa87c605b5de4d2585a", + "shasum": "" + }, + "require-dev": { + "newfold-labs/wp-php-standards": "^1.2" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "NewfoldLabs\\WP\\Module\\Features\\": "includes" + } + }, + "scripts": { + "fix": [ + "vendor/bin/phpcbf . --standard=phpcs.xml" + ], + "lint": [ + "vendor/bin/phpcs . --standard=phpcs.xml -s" + ] + }, + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Micah Wood", + "homepage": "https://wpscholar.com" + }, + { + "name": "Evan Mullins", + "homepage": "https://evanmullins.com" + } + ], + "description": "A module for providing an interface for features.", + "support": { + "source": "https://github.com/newfold-labs/wp-module-features/tree/main", + "issues": "https://github.com/newfold-labs/wp-module-features/issues" + }, + "time": "2024-04-19T20:13:00+00:00" + }, { "name": "newfold-labs/wp-module-global-ctb", "version": "1.0.11", @@ -1297,20 +1349,21 @@ }, { "name": "newfold-labs/wp-module-staging", - "version": "1.3.3", + "version": "dev-develop", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-staging.git", - "reference": "c464472e3a5886d9639563262e776b33f8135398" + "reference": "079390d91200c0d12c2d537baca7a1c7ba7ca29c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-staging/zipball/c464472e3a5886d9639563262e776b33f8135398", - "reference": "c464472e3a5886d9639563262e776b33f8135398", + "url": "https://api.github.com/repos/newfold-labs/wp-module-staging/zipball/079390d91200c0d12c2d537baca7a1c7ba7ca29c", + "reference": "079390d91200c0d12c2d537baca7a1c7ba7ca29c", "shasum": "" }, "require": { - "newfold-labs/wp-module-context": "^1.0" + "newfold-labs/wp-module-context": "^1.0", + "newfold-labs/wp-module-features": "dev-main" }, "require-dev": { "newfold-labs/wp-php-standards": "^1.2" @@ -1343,10 +1396,10 @@ ], "description": "Newfold module for staging functionality in brand plugins", "support": { - "source": "https://github.com/newfold-labs/wp-module-staging/tree/1.3.3", + "source": "https://github.com/newfold-labs/wp-module-staging/tree/add/staging-feature", "issues": "https://github.com/newfold-labs/wp-module-staging/issues" }, - "time": "2024-04-10T20:37:51+00:00" + "time": "2024-04-25T21:19:11+00:00" }, { "name": "wp-cli/wp-config-transformer", @@ -3879,6 +3932,8 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { + "newfold-labs/wp-module-features": 20, + "newfold-labs/wp-module-staging": 20, "roave/security-advisories": 20 }, "prefer-stable": false, diff --git a/inc/Admin.php b/inc/Admin.php index 264e80231..c7a03c8bf 100644 --- a/inc/Admin.php +++ b/inc/Admin.php @@ -61,7 +61,7 @@ public static function add_to_runtime( $sdk ) { * @return array */ public static function subpages() { - global $bluehost_module_container; + global $bluehost_module_container, $newfold_features; $home = array( 'bluehost#/home' => __( 'Home', 'wp-plugin-bluehost' ), @@ -72,30 +72,25 @@ public static function subpages() { $marketplace = array( 'bluehost#/marketplace' => __( 'Marketplace', 'wp-plugin-bluehost' ), ); - $performance = array( - 'bluehost#/performance' => __( 'Performance', 'wp-plugin-bluehost' ), - ); - $settings = array( + // wp-cloud adjustment + $performance = ( 'atomic' === getContext( 'platform' ) ) + ? array( + 'bluehost#/performance' => __( 'Performance', 'wp-plugin-bluehost' ), + ) + : array(); + $settings = array( 'bluehost#/settings' => __( 'Settings', 'wp-plugin-bluehost' ), ); - $staging = array( - 'bluehost#/staging' => __( 'Staging', 'wp-plugin-bluehost' ), - ); + // only add staging link if feature is enabled + $staging = $newfold_features->get('staging') + ? array( + 'bluehost#/staging' => __( 'Staging', 'wp-plugin-bluehost' ), + ) + : array(); $help = array( 'bluehost#/help' => __( 'Help', 'wp-plugin-bluehost' ), ); - // wp-cloud adjustments - if ( 'atomic' === getContext( 'platform' ) ) { - return array_merge( - $home, - $store, - $marketplace, - $settings, - $help - ); - } - return array_merge( $home, $store, diff --git a/inc/Data.php b/inc/Data.php index 4f04c9113..3458daf09 100644 --- a/inc/Data.php +++ b/inc/Data.php @@ -19,7 +19,7 @@ final class Data { * @return array */ public static function runtime() { - global $bluehost_module_container; + global $bluehost_module_container, $newfold_features; $runtime = array( 'plugin' => array( @@ -28,6 +28,7 @@ public static function runtime() { 'assets' => BLUEHOST_PLUGIN_URL . 'assets/', 'brand' => $bluehost_module_container->plugin()->brand, ), + 'features' => $newfold_features->all(), ); return $runtime; diff --git a/src/app/data/routes.js b/src/app/data/routes.js index 7e413ed46..f31f8e3d1 100644 --- a/src/app/data/routes.js +++ b/src/app/data/routes.js @@ -137,7 +137,7 @@ export const routes = [ title: __( 'Staging', 'wp-plugin-bluehost' ), Component: Staging, Icon: WrenchScrewdriverIcon, - condition: 'atomic' !== window.NewfoldRuntime.context.platform, + condition: window.NewfoldRuntime.features.staging, }, { name: '/help', From ade09160c77e47d0d8f2e2aeb086da0435593c31 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 3 May 2024 12:36:23 -0400 Subject: [PATCH 02/25] features module development and integration --- bootstrap.php | 6 +++--- inc/Admin.php | 11 ++++++----- inc/Data.php | 8 +++++--- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index 8429ff7fd..f08608e2c 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -200,6 +200,6 @@ function () { new Admin(); } - - -require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-features/bootstrap.php'; \ No newline at end of file +// These shouldn't be needed once the autoloader is properly running in tagged releases +require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-staging/includes/StagingFeature.php'; +require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-features/includes/functions.php'; diff --git a/inc/Admin.php b/inc/Admin.php index c7a03c8bf..22c504b7c 100644 --- a/inc/Admin.php +++ b/inc/Admin.php @@ -8,6 +8,7 @@ namespace Bluehost; use function NewfoldLabs\WP\Context\getContext; +use function NewfoldLabs\WP\Module\Features\isEnabled; /** * \Bluehost\Admin @@ -61,7 +62,7 @@ public static function add_to_runtime( $sdk ) { * @return array */ public static function subpages() { - global $bluehost_module_container, $newfold_features; + global $bluehost_module_container; $home = array( 'bluehost#/home' => __( 'Home', 'wp-plugin-bluehost' ), @@ -78,16 +79,16 @@ public static function subpages() { 'bluehost#/performance' => __( 'Performance', 'wp-plugin-bluehost' ), ) : array(); - $settings = array( + $settings = array( 'bluehost#/settings' => __( 'Settings', 'wp-plugin-bluehost' ), ); // only add staging link if feature is enabled - $staging = $newfold_features->get('staging') - ? array( + $staging = isEnabled( 'staging' ) + ? array( 'bluehost#/staging' => __( 'Staging', 'wp-plugin-bluehost' ), ) : array(); - $help = array( + $help = array( 'bluehost#/help' => __( 'Help', 'wp-plugin-bluehost' ), ); diff --git a/inc/Data.php b/inc/Data.php index 3458daf09..893e08455 100644 --- a/inc/Data.php +++ b/inc/Data.php @@ -7,6 +7,8 @@ namespace Bluehost; +use function NewfoldLabs\WP\Module\Features\getFeatures; + /** * \Bluehost\Data * This class does not have a constructor to get instantiated, just static methods. @@ -19,16 +21,16 @@ final class Data { * @return array */ public static function runtime() { - global $bluehost_module_container, $newfold_features; + global $bluehost_module_container; $runtime = array( - 'plugin' => array( + 'plugin' => array( 'url' => BLUEHOST_BUILD_URL, 'version' => BLUEHOST_PLUGIN_VERSION, 'assets' => BLUEHOST_PLUGIN_URL . 'assets/', 'brand' => $bluehost_module_container->plugin()->brand, ), - 'features' => $newfold_features->all(), + 'features' => getFeatures(), // just for now until we expose via js api endpoint ); return $runtime; From 549c8f244eb154940077ced6ff3255ef5466f651 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Wed, 8 May 2024 12:55:47 -0400 Subject: [PATCH 03/25] setup performance module with features --- bootstrap.php | 1 + inc/Admin.php | 4 ++-- src/app/data/routes.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index f08608e2c..ac4d138a4 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -202,4 +202,5 @@ function () { // These shouldn't be needed once the autoloader is properly running in tagged releases require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-staging/includes/StagingFeature.php'; +require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-performance/includes/PerformanceFeature.php'; require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-features/includes/functions.php'; diff --git a/inc/Admin.php b/inc/Admin.php index b612c57fd..dd4cf3754 100644 --- a/inc/Admin.php +++ b/inc/Admin.php @@ -77,7 +77,7 @@ public static function subpages() { 'bluehost#/marketplace' => __( 'Marketplace', 'wp-plugin-bluehost' ), ); // wp-cloud adjustment - $performance = ( 'atomic' === getContext( 'platform' ) ) + $performance = isEnabled( 'performance' ) ? array( 'bluehost#/performance' => __( 'Performance', 'wp-plugin-bluehost' ), ) @@ -203,7 +203,7 @@ public static function assets( $hook ) { \wp_register_script( 'bluehost-script', BLUEHOST_BUILD_URL . '/index.js', - array_merge( $asset['dependencies'], array( 'nfd-runtime' ) ), + array_merge( $asset['dependencies'], array( 'newfold-features', 'nfd-runtime' ) ), $asset['version'], true ); diff --git a/src/app/data/routes.js b/src/app/data/routes.js index d89fa6c0d..25f544f3d 100644 --- a/src/app/data/routes.js +++ b/src/app/data/routes.js @@ -133,7 +133,7 @@ export const routes = [ title: __( 'Performance', 'wp-plugin-bluehost' ), Component: Performance, Icon: BoltIcon, - condition: 'atomic' !== window.NewfoldRuntime.context.platform, + condition: window.NewfoldRuntime.features.performance, }, { name: '/settings', From e70fe6752a06b07420da7f0165436522743503f9 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 9 May 2024 12:11:00 -0400 Subject: [PATCH 04/25] use features API for nav items --- inc/Data.php | 3 +-- src/app/data/routes.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/inc/Data.php b/inc/Data.php index 893e08455..ee758486f 100644 --- a/inc/Data.php +++ b/inc/Data.php @@ -29,8 +29,7 @@ public static function runtime() { 'version' => BLUEHOST_PLUGIN_VERSION, 'assets' => BLUEHOST_PLUGIN_URL . 'assets/', 'brand' => $bluehost_module_container->plugin()->brand, - ), - 'features' => getFeatures(), // just for now until we expose via js api endpoint + ) ); return $runtime; diff --git a/src/app/data/routes.js b/src/app/data/routes.js index 25f544f3d..93f5a7c96 100644 --- a/src/app/data/routes.js +++ b/src/app/data/routes.js @@ -133,7 +133,7 @@ export const routes = [ title: __( 'Performance', 'wp-plugin-bluehost' ), Component: Performance, Icon: BoltIcon, - condition: window.NewfoldRuntime.features.performance, + condition: await window.NewfoldFeatures.isEnabled( 'performance' ), }, { name: '/settings', @@ -147,7 +147,7 @@ export const routes = [ title: __( 'Staging', 'wp-plugin-bluehost' ), Component: Staging, Icon: WrenchScrewdriverIcon, - condition: window.NewfoldRuntime.features.staging, + condition: await window.NewfoldFeatures.isEnabled( 'staging' ), }, { name: '/help', From 33a461c667a453be62517085de2a0ea697ef187e Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 10 May 2024 13:41:40 -0400 Subject: [PATCH 05/25] add Features instantiation to plugin bootstrap --- bootstrap.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bootstrap.php b/bootstrap.php index ac4d138a4..27c25acee 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -12,6 +12,7 @@ use NewfoldLabs\WP\ModuleLoader\Container; use NewfoldLabs\WP\ModuleLoader\Plugin; use NewfoldLabs\WP\Context\Context; +use NewfoldLabs\WP\Module\Features\Features; use function NewfoldLabs\WP\ModuleLoader\container as setContainer; use function NewfoldLabs\WP\Context\setContext; use function NewfoldLabs\WP\Context\getContext; @@ -204,3 +205,5 @@ function () { require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-staging/includes/StagingFeature.php'; require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-performance/includes/PerformanceFeature.php'; require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-features/includes/functions.php'; +// Instantiate Features singleton +Features::getInstance(); From 39b1704ddbaa00baee7f3faa58b343f88e77b01c Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Mon, 13 May 2024 15:36:19 -0400 Subject: [PATCH 06/25] update to released version of features module --- composer.json | 2 +- phpcs.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index d3f0d7c70..beeca2573 100644 --- a/composer.json +++ b/composer.json @@ -79,7 +79,7 @@ "newfold-labs/wp-module-data": "^2.4.24", "newfold-labs/wp-module-deactivation": "^1.1.2", "newfold-labs/wp-module-ecommerce": "^1.3.30", - "newfold-labs/wp-module-features": "dev-main", + "newfold-labs/wp-module-features": "^1.1.0", "newfold-labs/wp-module-global-ctb": "^1.0.11", "newfold-labs/wp-module-help-center": "^1.0.24", "newfold-labs/wp-module-loader": "^1.0.10", diff --git a/phpcs.xml b/phpcs.xml index 6c5fe9342..e1fe85a4b 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -2,7 +2,7 @@ - + /assets /build From 03d3316e45c6e61e41e98d4fd34a015eb5d7dea7 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Mon, 13 May 2024 16:54:02 -0400 Subject: [PATCH 07/25] load required files in modules properly --- bootstrap.php | 6 +----- composer.json | 2 +- composer.lock | 53 +++++++++++++++++++++++++-------------------------- 3 files changed, 28 insertions(+), 33 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index 27c25acee..f76b29e29 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -201,9 +201,5 @@ function () { new Admin(); } -// These shouldn't be needed once the autoloader is properly running in tagged releases -require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-staging/includes/StagingFeature.php'; -require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-performance/includes/PerformanceFeature.php'; -require_once BLUEHOST_PLUGIN_DIR . '/vendor/newfold-labs/wp-module-features/includes/functions.php'; -// Instantiate Features singleton +// Instantiate the Features singleton Features::getInstance(); diff --git a/composer.json b/composer.json index beeca2573..01d242cfa 100644 --- a/composer.json +++ b/composer.json @@ -91,7 +91,7 @@ "newfold-labs/wp-module-runtime": "^1.0.10", "newfold-labs/wp-module-secure-passwords": "^1.1.1", "newfold-labs/wp-module-sso": "^1.0.5", - "newfold-labs/wp-module-staging": "dev-add/staging-feature", + "newfold-labs/wp-module-staging": "^1.3.3", "wp-forge/wp-update-handler": "^1.0.2", "wp-forge/wp-upgrade-handler": "^1.0" } diff --git a/composer.lock b/composer.lock index 8292299f0..df3e3b742 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "68800c7dff28fe85e63660d01d5372f1", + "content-hash": "8bff208a681d3f78123d054a7114608f", "packages": [ { "name": "doctrine/inflector", @@ -670,30 +670,32 @@ }, { "name": "newfold-labs/wp-module-features", - "version": "dev-main", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-features.git", - "reference": "7ca3bd83d181c5e21440cd729a2b90576065f788" + "reference": "a6780ec96584aab97036468de5d42939978b39c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/7ca3bd83d181c5e21440cd729a2b90576065f788", - "reference": "7ca3bd83d181c5e21440cd729a2b90576065f788", + "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/a6780ec96584aab97036468de5d42939978b39c6", + "reference": "a6780ec96584aab97036468de5d42939978b39c6", "shasum": "" }, "require": { - "wp-forge/wp-options": "^1.1" + "wp-forge/wp-options": "^1.1.1" }, "require-dev": { - "newfold-labs/wp-php-standards": "^1.2" + "newfold-labs/wp-php-standards": "^1.2.3" }, - "default-branch": true, "type": "library", "autoload": { "psr-4": { "NewfoldLabs\\WP\\Module\\Features\\": "includes" - } + }, + "files": [ + "includes/functions.php" + ] }, "scripts": { "fix": [ @@ -718,10 +720,10 @@ ], "description": "A module for providing an interface for features.", "support": { - "source": "https://github.com/newfold-labs/wp-module-features/tree/main", + "source": "https://github.com/newfold-labs/wp-module-features/tree/1.1.0", "issues": "https://github.com/newfold-labs/wp-module-features/issues" }, - "time": "2024-05-03T15:58:51+00:00" + "time": "2024-05-13T17:34:22+00:00" }, { "name": "newfold-labs/wp-module-global-ctb", @@ -1459,21 +1461,20 @@ }, { "name": "newfold-labs/wp-module-staging", - "version": "dev-add/staging-feature", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-staging.git", - "reference": "452fa01456d5f48fbbf995ab43718f4655268057" + "reference": "c464472e3a5886d9639563262e776b33f8135398" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-staging/zipball/452fa01456d5f48fbbf995ab43718f4655268057", - "reference": "452fa01456d5f48fbbf995ab43718f4655268057", + "url": "https://api.github.com/repos/newfold-labs/wp-module-staging/zipball/c464472e3a5886d9639563262e776b33f8135398", + "reference": "c464472e3a5886d9639563262e776b33f8135398", "shasum": "" }, "require": { - "newfold-labs/wp-module-context": "^1.0", - "newfold-labs/wp-module-features": "dev-main" + "newfold-labs/wp-module-context": "^1.0" }, "require-dev": { "newfold-labs/wp-php-standards": "^1.2" @@ -1506,10 +1507,10 @@ ], "description": "Newfold module for staging functionality in brand plugins", "support": { - "source": "https://github.com/newfold-labs/wp-module-staging/tree/add/staging-feature", + "source": "https://github.com/newfold-labs/wp-module-staging/tree/1.3.3", "issues": "https://github.com/newfold-labs/wp-module-staging/issues" }, - "time": "2024-05-07T17:11:47+00:00" + "time": "2024-04-10T20:37:51+00:00" }, { "name": "wp-cli/wp-config-transformer", @@ -1715,16 +1716,16 @@ }, { "name": "wp-forge/wp-options", - "version": "1.1", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/wp-forge/wp-options.git", - "reference": "df8899255dee19365599caa8801c75803e94e413" + "reference": "511b1c5e626582dd4c3c1b5602e7a20352dabc1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-forge/wp-options/zipball/df8899255dee19365599caa8801c75803e94e413", - "reference": "df8899255dee19365599caa8801c75803e94e413", + "url": "https://api.github.com/repos/wp-forge/wp-options/zipball/511b1c5e626582dd4c3c1b5602e7a20352dabc1b", + "reference": "511b1c5e626582dd4c3c1b5602e7a20352dabc1b", "shasum": "" }, "type": "library", @@ -1746,9 +1747,9 @@ "description": "A WordPress helper class for managing plugin options.", "support": { "issues": "https://github.com/wp-forge/wp-options/issues", - "source": "https://github.com/wp-forge/wp-options/tree/1.1" + "source": "https://github.com/wp-forge/wp-options/tree/1.1.1" }, - "time": "2022-03-04T16:23:42+00:00" + "time": "2024-05-10T14:57:37+00:00" }, { "name": "wp-forge/wp-query-builder", @@ -4115,8 +4116,6 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "newfold-labs/wp-module-features": 20, - "newfold-labs/wp-module-staging": 20, "roave/security-advisories": 20 }, "prefer-stable": false, From 1eeb8be1d973586bdf4df4df0278892b1acb88c2 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Mon, 13 May 2024 18:00:20 -0400 Subject: [PATCH 08/25] lint --- inc/Admin.php | 12 ++++++------ inc/Data.php | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/inc/Admin.php b/inc/Admin.php index dd4cf3754..4a63d288c 100644 --- a/inc/Admin.php +++ b/inc/Admin.php @@ -64,19 +64,19 @@ public static function add_to_runtime( $sdk ) { public static function subpages() { global $bluehost_module_container; - $home = array( + $home = array( 'bluehost#/home' => __( 'Home', 'wp-plugin-bluehost' ), ); - $pagesAndPosts = array( + $pagesAndPosts = array( 'bluehost#/pages-and-posts' => __( 'Pages & Posts', 'wp-plugin-bluehost' ), ); - $store = array( + $store = array( 'bluehost#/store' => __( 'Store', 'wp-plugin-bluehost' ), ); - $marketplace = array( + $marketplace = array( 'bluehost#/marketplace' => __( 'Marketplace', 'wp-plugin-bluehost' ), ); - // wp-cloud adjustment + // add performance if enabled $performance = isEnabled( 'performance' ) ? array( 'bluehost#/performance' => __( 'Performance', 'wp-plugin-bluehost' ), @@ -85,7 +85,7 @@ public static function subpages() { $settings = array( 'bluehost#/settings' => __( 'Settings', 'wp-plugin-bluehost' ), ); - // only add staging link if feature is enabled + // add staging if enabled $staging = isEnabled( 'staging' ) ? array( 'bluehost#/staging' => __( 'Staging', 'wp-plugin-bluehost' ), diff --git a/inc/Data.php b/inc/Data.php index ee758486f..8bc23b44a 100644 --- a/inc/Data.php +++ b/inc/Data.php @@ -24,12 +24,12 @@ public static function runtime() { global $bluehost_module_container; $runtime = array( - 'plugin' => array( + 'plugin' => array( 'url' => BLUEHOST_BUILD_URL, 'version' => BLUEHOST_PLUGIN_VERSION, 'assets' => BLUEHOST_PLUGIN_URL . 'assets/', 'brand' => $bluehost_module_container->plugin()->brand, - ) + ), ); return $runtime; From 1323fccb0310928a4e7ff6da2eed4b92b998750e Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 17 May 2024 14:38:27 -0400 Subject: [PATCH 09/25] update features module to 1.1.1 --- composer.json | 4 ++-- composer.lock | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 38afcb755..70078a51e 100644 --- a/composer.json +++ b/composer.json @@ -79,7 +79,7 @@ "newfold-labs/wp-module-data": "^2.5.0", "newfold-labs/wp-module-deactivation": "^1.1.2", "newfold-labs/wp-module-ecommerce": "^1.3.30", - "newfold-labs/wp-module-features": "^1.1.0", + "newfold-labs/wp-module-features": "^1.1.1", "newfold-labs/wp-module-global-ctb": "^1.0.11", "newfold-labs/wp-module-help-center": "^1.0.25", "newfold-labs/wp-module-loader": "^1.0.10", @@ -95,4 +95,4 @@ "wp-forge/wp-update-handler": "^1.0.2", "wp-forge/wp-upgrade-handler": "^1.0" } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 56c6857ce..d9ca94fb5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d5e0bc29bb1c0ad66281f63a00b708c4", + "content-hash": "e8f901b20b05e235ff097c2e5b54d08f", "packages": [ { "name": "doctrine/inflector", @@ -671,16 +671,16 @@ }, { "name": "newfold-labs/wp-module-features", - "version": "1.1.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-features.git", - "reference": "a6780ec96584aab97036468de5d42939978b39c6" + "reference": "30f5139deed56ee36a06c0b1107fcc91bffe6229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/a6780ec96584aab97036468de5d42939978b39c6", - "reference": "a6780ec96584aab97036468de5d42939978b39c6", + "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/30f5139deed56ee36a06c0b1107fcc91bffe6229", + "reference": "30f5139deed56ee36a06c0b1107fcc91bffe6229", "shasum": "" }, "require": { @@ -721,10 +721,10 @@ ], "description": "A module for providing an interface for features.", "support": { - "source": "https://github.com/newfold-labs/wp-module-features/tree/1.1.0", + "source": "https://github.com/newfold-labs/wp-module-features/tree/1.1.1", "issues": "https://github.com/newfold-labs/wp-module-features/issues" }, - "time": "2024-05-13T17:34:22+00:00" + "time": "2024-05-17T17:55:47+00:00" }, { "name": "newfold-labs/wp-module-global-ctb", From 2fe32ea12c1ab79315f6c9b4591eef02bd812f7c Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Tue, 21 May 2024 12:29:32 -0400 Subject: [PATCH 10/25] update features module --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 70078a51e..0b19bca86 100644 --- a/composer.json +++ b/composer.json @@ -79,7 +79,7 @@ "newfold-labs/wp-module-data": "^2.5.0", "newfold-labs/wp-module-deactivation": "^1.1.2", "newfold-labs/wp-module-ecommerce": "^1.3.30", - "newfold-labs/wp-module-features": "^1.1.1", + "newfold-labs/wp-module-features": "^1.2.0", "newfold-labs/wp-module-global-ctb": "^1.0.11", "newfold-labs/wp-module-help-center": "^1.0.25", "newfold-labs/wp-module-loader": "^1.0.10", diff --git a/composer.lock b/composer.lock index d9ca94fb5..15f07799c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e8f901b20b05e235ff097c2e5b54d08f", + "content-hash": "4f7c350544ce50ba0064b8118bcd31c5", "packages": [ { "name": "doctrine/inflector", @@ -671,16 +671,16 @@ }, { "name": "newfold-labs/wp-module-features", - "version": "1.1.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-features.git", - "reference": "30f5139deed56ee36a06c0b1107fcc91bffe6229" + "reference": "e46032e09a14ab76e28ca20c276a76fa0c6a9023" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/30f5139deed56ee36a06c0b1107fcc91bffe6229", - "reference": "30f5139deed56ee36a06c0b1107fcc91bffe6229", + "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/e46032e09a14ab76e28ca20c276a76fa0c6a9023", + "reference": "e46032e09a14ab76e28ca20c276a76fa0c6a9023", "shasum": "" }, "require": { @@ -721,10 +721,10 @@ ], "description": "A module for providing an interface for features.", "support": { - "source": "https://github.com/newfold-labs/wp-module-features/tree/1.1.1", + "source": "https://github.com/newfold-labs/wp-module-features/tree/1.2.0", "issues": "https://github.com/newfold-labs/wp-module-features/issues" }, - "time": "2024-05-17T17:55:47+00:00" + "time": "2024-05-20T16:52:34+00:00" }, { "name": "newfold-labs/wp-module-global-ctb", From 30d15c365e4ff7336d79152384b4a6fd9d52f052 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Tue, 21 May 2024 12:46:33 -0400 Subject: [PATCH 11/25] add atomic module --- composer.json | 1 + composer.lock | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0b19bca86..6ed0ccf0e 100644 --- a/composer.json +++ b/composer.json @@ -74,6 +74,7 @@ }, "require": { "newfold-labs/wp-module-activation": "^1.0.2", + "newfold-labs/wp-module-atomic": "^1.0.0", "newfold-labs/wp-module-coming-soon": "^1.2.3", "newfold-labs/wp-module-context": "^1.0.0", "newfold-labs/wp-module-data": "^2.5.0", diff --git a/composer.lock b/composer.lock index 15f07799c..a4544be49 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4f7c350544ce50ba0064b8118bcd31c5", + "content-hash": "0c3a39da4589c6a1d9d598cbab4e0b33", "packages": [ { "name": "doctrine/inflector", @@ -341,6 +341,59 @@ }, "time": "2024-04-08T16:04:32+00:00" }, + { + "name": "newfold-labs/wp-module-atomic", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/newfold-labs/wp-module-atomic.git", + "reference": "f4dd1784450b7f8fc87810a39a2ac726df1a788b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/newfold-labs/wp-module-atomic/zipball/f4dd1784450b7f8fc87810a39a2ac726df1a788b", + "reference": "f4dd1784450b7f8fc87810a39a2ac726df1a788b", + "shasum": "" + }, + "require": { + "newfold-labs/wp-module-context": "^1.0" + }, + "require-dev": { + "newfold-labs/wp-php-standards": "^1.2.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "NewfoldLabs\\WP\\Module\\Atomic\\": "includes" + }, + "files": [ + "bootstrap.php" + ] + }, + "scripts": { + "fix": [ + "vendor/bin/phpcbf . --standard=phpcs.xml" + ], + "lint": [ + "vendor/bin/phpcs . --standard=phpcs.xml -s" + ] + }, + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Evan Mullins", + "homepage": "https://evanmullins.com" + } + ], + "description": "A module to customize a brand plugin for wp cloud environments.", + "support": { + "source": "https://github.com/newfold-labs/wp-module-atomic/tree/1.0.0", + "issues": "https://github.com/newfold-labs/wp-module-atomic/issues" + }, + "time": "2024-05-20T22:04:39+00:00" + }, { "name": "newfold-labs/wp-module-coming-soon", "version": "1.2.3", From dbb84a68b80f82f3ba79405572390c8819a59bf1 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Tue, 21 May 2024 14:12:05 -0400 Subject: [PATCH 12/25] update feature module --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 6ed0ccf0e..73a8878ef 100644 --- a/composer.json +++ b/composer.json @@ -80,7 +80,7 @@ "newfold-labs/wp-module-data": "^2.5.0", "newfold-labs/wp-module-deactivation": "^1.1.2", "newfold-labs/wp-module-ecommerce": "^1.3.30", - "newfold-labs/wp-module-features": "^1.2.0", + "newfold-labs/wp-module-features": "^1.2.1", "newfold-labs/wp-module-global-ctb": "^1.0.11", "newfold-labs/wp-module-help-center": "^1.0.25", "newfold-labs/wp-module-loader": "^1.0.10", diff --git a/composer.lock b/composer.lock index a4544be49..19641c12e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0c3a39da4589c6a1d9d598cbab4e0b33", + "content-hash": "eab976f0136aacb364ba5c223dbe66a5", "packages": [ { "name": "doctrine/inflector", @@ -724,16 +724,16 @@ }, { "name": "newfold-labs/wp-module-features", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-features.git", - "reference": "e46032e09a14ab76e28ca20c276a76fa0c6a9023" + "reference": "5e3a792207804cef0dbeefcd3c8df75db24b8e79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/e46032e09a14ab76e28ca20c276a76fa0c6a9023", - "reference": "e46032e09a14ab76e28ca20c276a76fa0c6a9023", + "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/5e3a792207804cef0dbeefcd3c8df75db24b8e79", + "reference": "5e3a792207804cef0dbeefcd3c8df75db24b8e79", "shasum": "" }, "require": { @@ -774,10 +774,10 @@ ], "description": "A module for providing an interface for features.", "support": { - "source": "https://github.com/newfold-labs/wp-module-features/tree/1.2.0", + "source": "https://github.com/newfold-labs/wp-module-features/tree/1.2.1", "issues": "https://github.com/newfold-labs/wp-module-features/issues" }, - "time": "2024-05-20T16:52:34+00:00" + "time": "2024-05-21T18:03:02+00:00" }, { "name": "newfold-labs/wp-module-global-ctb", From fa1d6d74deac8c34044993a070b9c690fe7c6eff Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Tue, 21 May 2024 17:16:52 -0400 Subject: [PATCH 13/25] update feature module --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 73a8878ef..7236646bb 100644 --- a/composer.json +++ b/composer.json @@ -80,7 +80,7 @@ "newfold-labs/wp-module-data": "^2.5.0", "newfold-labs/wp-module-deactivation": "^1.1.2", "newfold-labs/wp-module-ecommerce": "^1.3.30", - "newfold-labs/wp-module-features": "^1.2.1", + "newfold-labs/wp-module-features": "^1.3.0", "newfold-labs/wp-module-global-ctb": "^1.0.11", "newfold-labs/wp-module-help-center": "^1.0.25", "newfold-labs/wp-module-loader": "^1.0.10", diff --git a/composer.lock b/composer.lock index 19641c12e..2c5d5c2e8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "eab976f0136aacb364ba5c223dbe66a5", + "content-hash": "39c2111fa64b74801bc0bfd7427c4bf0", "packages": [ { "name": "doctrine/inflector", @@ -724,16 +724,16 @@ }, { "name": "newfold-labs/wp-module-features", - "version": "1.2.1", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-features.git", - "reference": "5e3a792207804cef0dbeefcd3c8df75db24b8e79" + "reference": "e2eb88461048a77a8df59c381bd6fe36af9277f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/5e3a792207804cef0dbeefcd3c8df75db24b8e79", - "reference": "5e3a792207804cef0dbeefcd3c8df75db24b8e79", + "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/e2eb88461048a77a8df59c381bd6fe36af9277f3", + "reference": "e2eb88461048a77a8df59c381bd6fe36af9277f3", "shasum": "" }, "require": { @@ -774,10 +774,10 @@ ], "description": "A module for providing an interface for features.", "support": { - "source": "https://github.com/newfold-labs/wp-module-features/tree/1.2.1", + "source": "https://github.com/newfold-labs/wp-module-features/tree/1.3.0", "issues": "https://github.com/newfold-labs/wp-module-features/issues" }, - "time": "2024-05-21T18:03:02+00:00" + "time": "2024-05-21T21:05:48+00:00" }, { "name": "newfold-labs/wp-module-global-ctb", From 9961d867f20e0ea9d35f92ad0509333f3bf166d9 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 23 May 2024 16:48:37 -0400 Subject: [PATCH 14/25] update atomic, context, features modules --- composer.json | 6 +++--- composer.lock | 38 +++++++++++++++++++------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/composer.json b/composer.json index 7236646bb..3cd4ca634 100644 --- a/composer.json +++ b/composer.json @@ -74,13 +74,13 @@ }, "require": { "newfold-labs/wp-module-activation": "^1.0.2", - "newfold-labs/wp-module-atomic": "^1.0.0", + "newfold-labs/wp-module-atomic": "^1.1.0", "newfold-labs/wp-module-coming-soon": "^1.2.3", - "newfold-labs/wp-module-context": "^1.0.0", + "newfold-labs/wp-module-context": "^1.0.1", "newfold-labs/wp-module-data": "^2.5.0", "newfold-labs/wp-module-deactivation": "^1.1.2", "newfold-labs/wp-module-ecommerce": "^1.3.30", - "newfold-labs/wp-module-features": "^1.3.0", + "newfold-labs/wp-module-features": "^1.4.0", "newfold-labs/wp-module-global-ctb": "^1.0.11", "newfold-labs/wp-module-help-center": "^1.0.25", "newfold-labs/wp-module-loader": "^1.0.10", diff --git a/composer.lock b/composer.lock index 2c5d5c2e8..70c983127 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "39c2111fa64b74801bc0bfd7427c4bf0", + "content-hash": "42d7f401c16a35f39d324afe4c8650ef", "packages": [ { "name": "doctrine/inflector", @@ -343,16 +343,16 @@ }, { "name": "newfold-labs/wp-module-atomic", - "version": "1.0.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-atomic.git", - "reference": "f4dd1784450b7f8fc87810a39a2ac726df1a788b" + "reference": "c7909406bf38d1dc1d4cbe51dce973fecfd5fa38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-atomic/zipball/f4dd1784450b7f8fc87810a39a2ac726df1a788b", - "reference": "f4dd1784450b7f8fc87810a39a2ac726df1a788b", + "url": "https://api.github.com/repos/newfold-labs/wp-module-atomic/zipball/c7909406bf38d1dc1d4cbe51dce973fecfd5fa38", + "reference": "c7909406bf38d1dc1d4cbe51dce973fecfd5fa38", "shasum": "" }, "require": { @@ -389,10 +389,10 @@ ], "description": "A module to customize a brand plugin for wp cloud environments.", "support": { - "source": "https://github.com/newfold-labs/wp-module-atomic/tree/1.0.0", + "source": "https://github.com/newfold-labs/wp-module-atomic/tree/1.1.0", "issues": "https://github.com/newfold-labs/wp-module-atomic/issues" }, - "time": "2024-05-20T22:04:39+00:00" + "time": "2024-05-23T20:35:51+00:00" }, { "name": "newfold-labs/wp-module-coming-soon", @@ -450,16 +450,16 @@ }, { "name": "newfold-labs/wp-module-context", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-context.git", - "reference": "0d852f83f353f1631309e5ae7da9cb1e046bc984" + "reference": "fb57e927df45ef33573fe7f429ef1e088b0a6df0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-context/zipball/0d852f83f353f1631309e5ae7da9cb1e046bc984", - "reference": "0d852f83f353f1631309e5ae7da9cb1e046bc984", + "url": "https://api.github.com/repos/newfold-labs/wp-module-context/zipball/fb57e927df45ef33573fe7f429ef1e088b0a6df0", + "reference": "fb57e927df45ef33573fe7f429ef1e088b0a6df0", "shasum": "" }, "require": { @@ -497,10 +497,10 @@ ], "description": "Newfold module to determine context for various brands and platforms.", "support": { - "source": "https://github.com/newfold-labs/wp-module-context/tree/1.0.0", + "source": "https://github.com/newfold-labs/wp-module-context/tree/1.0.1", "issues": "https://github.com/newfold-labs/wp-module-context/issues" }, - "time": "2024-02-22T18:22:13+00:00" + "time": "2024-05-23T20:34:28+00:00" }, { "name": "newfold-labs/wp-module-data", @@ -724,16 +724,16 @@ }, { "name": "newfold-labs/wp-module-features", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-features.git", - "reference": "e2eb88461048a77a8df59c381bd6fe36af9277f3" + "reference": "bd5ca58a9feea6f4cddfa27e665340005b849923" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/e2eb88461048a77a8df59c381bd6fe36af9277f3", - "reference": "e2eb88461048a77a8df59c381bd6fe36af9277f3", + "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/bd5ca58a9feea6f4cddfa27e665340005b849923", + "reference": "bd5ca58a9feea6f4cddfa27e665340005b849923", "shasum": "" }, "require": { @@ -774,10 +774,10 @@ ], "description": "A module for providing an interface for features.", "support": { - "source": "https://github.com/newfold-labs/wp-module-features/tree/1.3.0", + "source": "https://github.com/newfold-labs/wp-module-features/tree/1.4.0", "issues": "https://github.com/newfold-labs/wp-module-features/issues" }, - "time": "2024-05-21T21:05:48+00:00" + "time": "2024-05-23T20:35:43+00:00" }, { "name": "newfold-labs/wp-module-global-ctb", From b603d2e4c604b412a3b09d658ad618819a8874a1 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 24 May 2024 15:48:54 -0400 Subject: [PATCH 15/25] add feature toggles to settings page for help center and wonder blocks also adds a `featureToggle` helper method to interface with the feature API --- src/app/data/store.js | 7 +- src/app/pages/settings/helpCenterSettings.js | 113 ++++++++++++++++++ src/app/pages/settings/index.js | 18 ++- .../pages/settings/wonderBlocksSettings.js | 102 ++++++++++++++++ src/app/stylesheet.scss | 6 + src/app/util/helpers.js | 28 ++++- 6 files changed, 270 insertions(+), 4 deletions(-) create mode 100644 src/app/pages/settings/helpCenterSettings.js create mode 100644 src/app/pages/settings/wonderBlocksSettings.js diff --git a/src/app/data/store.js b/src/app/data/store.js index 64def0fe8..f3d70399a 100644 --- a/src/app/data/store.js +++ b/src/app/data/store.js @@ -37,7 +37,12 @@ export const AppStoreProvider = ( { children } ) => { if ( false === booted ) { bluehostApiFetchSettings() .then( ( settings ) => { - setStore( { ...store, ...settings } ); + setStore( { + ...store, + ...settings, + features: window.NewfoldFeatures.features, + toggleableFeatures: window.NewfoldFeatures.togglable, + } ); setBooted( true ); } ) .catch( ( error ) => { diff --git a/src/app/pages/settings/helpCenterSettings.js b/src/app/pages/settings/helpCenterSettings.js new file mode 100644 index 000000000..98787f4a3 --- /dev/null +++ b/src/app/pages/settings/helpCenterSettings.js @@ -0,0 +1,113 @@ +import { useState } from '@wordpress/element'; +import { useUpdateEffect } from 'react-use'; +import { Alert, ToggleField } from '@newfold/ui-component-library'; +import AppStore from '../../data/store'; +import { featureToggle } from '../../util/helpers'; +import { useNotification } from 'App/components/notifications'; + +const HelpCenterSettings = () => { + const { store, setStore } = useContext( AppStore ); + const [ helpCenter, setHelpCenter ] = useState( store.features.helpCenter ); + const [ helpCenterLocked, setHelpCenterLocked ] = useState( + ! store.toggleableFeatures.helpCenter + ); + const [ isError, setError ] = useState( false ); + const notify = useNotification(); + + const getHelpCenterNoticeTitle = () => { + return helpCenter + ? __( 'Help Center Enabled', 'wp-plugin-bluehost' ) + : __( 'Help Center Disabled', 'wp-plugin-bluehost' ); + }; + const getHelpCenterNoticeText = () => { + return helpCenter + ? __( + 'You need to reload the page to see the Help Center.', + 'wp-plugin-bluehost' + ) + : __( + 'The help center will no longer display.', + 'wp-plugin-bluehost' + ); + }; + + const toggleHelpCenter = () => { + featureToggle( 'helpCenter', ( response ) => { + // console.log( response ); + if ( response.success ) { + setHelpCenter( ! helpCenter ); + } else { + setHelpCenterLocked( true ); + notifyError(); + } + } ); + }; + + const updateUI = ( enabled, selector ) => { + const element = document.querySelector( selector ); + if ( element ) { + if ( ! enabled ) { + element.classList.add( 'nfd-disabled' ); + } else { + element.classList.remove( 'nfd-disabled' ); + // window.location.reload(); + } + } + }; + + const notifyError = () => { + notify.push( 'feature-toggle-notice', { + title: __( 'Sorry, that is not allowed.', 'wp-plugin-bluehost' ), + description: __( + 'This feature cannot currently be modified.', + 'wp-plugin-bluehost' + ), + variant: 'error', + } ); + }; + + const notifySuccess = ( renderTitle, renderDescription ) => { + notify.push( 'feature-toggle-notice', { + title: renderTitle(), + description: renderDescription(), + variant: 'success', + autoDismiss: 5000, + } ); + }; + + useUpdateEffect( () => { + setStore( { + ...store, + helpCenter, + } ); + notifySuccess( getHelpCenterNoticeTitle, getHelpCenterNoticeText ); + updateUI( helpCenter, '#wp-admin-bar-help-center' ); + }, [ helpCenter ] ); + + return ( +
+ + + { isError && ( + + { __( + 'Oops! Something went wrong. Please try again.', + 'wp-plugin-bluehost' + ) } + + ) } +
+ ); +}; + +export default HelpCenterSettings; diff --git a/src/app/pages/settings/index.js b/src/app/pages/settings/index.js index 7609e234e..c7e47c2db 100644 --- a/src/app/pages/settings/index.js +++ b/src/app/pages/settings/index.js @@ -1,10 +1,12 @@ import classNames from 'classnames'; import { Container, Page } from '@newfold/ui-component-library'; import useContainerBlockIsTarget from 'App/util/hooks/useContainerBlockTarget'; -import AutomaticUpdates from './automaticUpdates'; -import CommentSettings from './commentSettings'; import ComingSoon from './comingSoon'; +import AutomaticUpdates from './automaticUpdates'; +import HelpCenterSettings from './helpCenterSettings'; +import WonderBlocksSettings from './wonderBlocksSettings'; import ContentSettings from './contentSettings'; +import CommentSettings from './commentSettings'; const Settings = () => { return ( @@ -31,6 +33,18 @@ const Settings = () => { + + + +
+ +
+ { + const { store, setStore } = useContext( AppStore ); + const [ wonderBlocks, setWonderBlocks ] = useState( + store.features.patterns + ); + const [ wonderBlocksLocked, setWonderBlocksLocked ] = useState( + ! store.toggleableFeatures.patterns + ); + const [ isError, setError ] = useState( false ); + const notify = useNotification(); + + const getWonderBlocksNoticeTitle = () => { + return wonderBlocks + ? __( 'Wonder Blocks Enabled', 'wp-plugin-bluehost' ) + : __( 'Wonder Blocks Disabled', 'wp-plugin-bluehost' ); + }; + const getWonderBlocksNoticeText = () => { + return wonderBlocks + ? __( + 'Create content to see Wonder Blocks in action.', + 'wp-plugin-bluehost' + ) + : __( + 'Wonder Blocks will no longer display.', + 'wp-plugin-bluehost' + ); + }; + + const toggleWonderBlocks = () => { + featureToggle( 'patterns', ( response ) => { + // console.log( response ); + if ( response.success ) { + setWonderBlocks( ! wonderBlocks ); + } else { + setWonderBlocksLocked( true ); + notifyError(); + } + } ); + }; + + const notifyError = () => { + notify.push( 'feature-toggle-notice', { + title: __( 'Sorry, that is not allowed.', 'wp-plugin-bluehost' ), + description: __( + 'This feature cannot currently be modified.', + 'wp-plugin-bluehost' + ), + variant: 'error', + } ); + }; + + const notifySuccess = ( renderTitle, renderDescription ) => { + notify.push( 'feature-toggle-notice', { + title: renderTitle(), + description: renderDescription(), + variant: 'success', + autoDismiss: 5000, + } ); + }; + + useUpdateEffect( () => { + setStore( { + ...store, + wonderBlocks, + } ); + notifySuccess( getWonderBlocksNoticeTitle, getWonderBlocksNoticeText ); + }, [ wonderBlocks ] ); + + return ( +
+ + + { isError && ( + + { __( + 'Oops! Something went wrong. Please try again.', + 'wp-plugin-bluehost' + ) } + + ) } +
+ ); +}; + +export default WonderBlocksSettings; diff --git a/src/app/stylesheet.scss b/src/app/stylesheet.scss index 7306fd98c..918f02f51 100644 --- a/src/app/stylesheet.scss +++ b/src/app/stylesheet.scss @@ -81,6 +81,12 @@ body.toplevel_page_bluehost { } } + +.nfd-disabled { + opacity: .5; + pointer-events: disabled; +} + .wppbh { /* color: var(--color-text); diff --git a/src/app/util/helpers.js b/src/app/util/helpers.js index 4d01f34d2..16d3b9363 100644 --- a/src/app/util/helpers.js +++ b/src/app/util/helpers.js @@ -48,14 +48,40 @@ export const bluehostSettingsApiFetch = ( data, passError, thenCallback ) => { } ); }; +/** + * Wrapper method for toggling a feature via the features API + * + * @param {string} featureName the name of the feature + * @param {Function} thenCallback method to call in promise then + * @return {Promise} Features API promise with attached then callback + */ +export const featureToggle = async ( featureName, thenCallback ) => { + if ( true === window.NewfoldFeatures.features[ featureName ] ) { + return window.NewfoldFeatures.disable( featureName ).then( + ( response ) => { + thenCallback( response ); + } + ); + } + // else + return window.NewfoldFeatures.enable( featureName ).then( ( response ) => { + thenCallback( response ); + } ); +}; + /** * Wrapper method to post request to bluehost cache endpoint * * @param {Object} data object of data * @param {Function} passError setter for the error in component * @param {Function} thenCallback method to call in promise then + * @return {Promise} apiFetch promise with attached then and catch callbacks */ -export const bluehostPurgeCacheApiFetch = ( data, passError, thenCallback ) => { +export const bluehostPurgeCacheApiFetch = async ( + data, + passError, + thenCallback +) => { return apiFetch( { url: NewfoldRuntime.createApiUrl( '/bluehost/v1/caching' ), method: 'DELETE', From a168b060133a39c10d33b87a1554edd9ec0cf6fe Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 24 May 2024 15:49:26 -0400 Subject: [PATCH 16/25] add app admin page with feature toggles --- src/app/data/routes.js | 8 ++ src/app/pages/admin/index.js | 173 +++++++++++++++++++++++++++++++++++ 2 files changed, 181 insertions(+) create mode 100644 src/app/pages/admin/index.js diff --git a/src/app/data/routes.js b/src/app/data/routes.js index 93f5a7c96..15c190544 100644 --- a/src/app/data/routes.js +++ b/src/app/data/routes.js @@ -17,6 +17,7 @@ import Performance from '../pages/performance'; import Settings from '../pages/settings'; import Staging from '../pages/staging'; import Help from '../pages/help'; +import Admin from '../pages/admin'; import { getMarketplaceSubnavRoutes } from '@modules/wp-module-marketplace/components/marketplaceSubnav'; import { ReactComponent as HelpIcon } from '../components/icons/HelpIcon.svg'; import PagesAndPosts from '../pages/pages-and-posts'; @@ -159,6 +160,13 @@ export const routes = [ ? HelpCenterAI : false, }, + { + name: '/admin', + title: __( 'Admin', 'wp-plugin-bluehost' ), + Component: Admin, + Icon: WrenchScrewdriverIcon, + condition: true, + }, ]; export const topRoutes = _filter( routes, ( route ) => diff --git a/src/app/pages/admin/index.js b/src/app/pages/admin/index.js new file mode 100644 index 000000000..4a0fe023e --- /dev/null +++ b/src/app/pages/admin/index.js @@ -0,0 +1,173 @@ +import classNames from 'classnames'; +import { useState } from '@wordpress/element'; +import AppStore from '../../data/store'; +import HelpCenterSettings from '../settings/helpCenterSettings'; +import WonderBlocksSettings from '../settings/wonderBlocksSettings'; +import { useUpdateEffect } from 'react-use'; +import { featureToggle } from '../../util/helpers'; +import { Container, Page, ToggleField } from '@newfold/ui-component-library'; +import { useNotification } from 'App/components/notifications'; + +const Admin = () => { + const { store, setStore } = useContext( AppStore ); + const [ performance, setPerformance ] = useState( + store.features.performance + ); + const [ performanceLocked, setPerformanceLocked ] = useState( + ! store.toggleableFeatures.performance + ); + const [ staging, setStaging ] = useState( store.features.staging ); + const [ stagingLocked, setStagingLocked ] = useState( + ! store.toggleableFeatures.staging + ); + + const notify = useNotification(); + + const getStagingNoticeTitle = () => { + return staging + ? __( 'Staging Enabled', 'wp-plugin-bluehost' ) + : __( 'Staging Disabled', 'wp-plugin-bluehost' ); + }; + const getStagingNoticeText = () => { + return staging + ? __( + 'You need to reload the page to manage Staging.', + 'wp-plugin-bluehost' + ) + : __( 'Staging will no longer display.', 'wp-plugin-bluehost' ); + }; + + const getPerformanceNoticeTitle = () => { + return performance + ? __( 'Performance Enabled', 'wp-plugin-bluehost' ) + : __( 'Performance Disabled', 'wp-plugin-bluehost' ); + }; + const getPerformanceNoticeText = () => { + return performance + ? __( + 'You need to reload the page to manage Performance.', + 'wp-plugin-bluehost' + ) + : __( 'Performance will no longer display.', 'wp-plugin-bluehost' ); + }; + + const togglePerformance = () => { + featureToggle( 'performance', ( response ) => { + if ( response.success ) { + setPerformance( ! performance ); + } else { + setPerformanceLocked( true ); + notifyError(); + } + } ); + }; + + const toggleStaging = () => { + featureToggle( 'staging', ( response ) => { + if ( response.success ) { + setStaging( ! staging ); + } else { + setStagingLocked( true ); + notifyError(); + } + } ); + }; + + const updateUI = ( enabled, selector ) => { + const element = document.querySelector( selector ); + if ( element ) { + if ( ! enabled ) { + element.classList.add( 'nfd-disabled' ); + } else { + element.classList.remove( 'nfd-disabled' ); + // window.location.reload(); + } + } + }; + + const notifyError = () => { + notify.push( 'feature-toggle-notice', { + title: __( 'Sorry, that is not allowed.', 'wp-plugin-bluehost' ), + description: __( + 'This feature cannot currently be modified.', + 'wp-plugin-bluehost' + ), + variant: 'error', + } ); + }; + + const notifySuccess = ( renderTitle, renderDescription ) => { + notify.push( 'feature-toggle-notice', { + title: renderTitle(), + description: renderDescription(), + variant: 'success', + autoDismiss: 5000, + } ); + }; + + useUpdateEffect( () => { + setStore( { + ...store, + performance, + } ); + notifySuccess( getPerformanceNoticeTitle, getPerformanceNoticeText ); + updateUI( performance, '.wppbh-app-navitem-Performance' ); + }, [ performance ] ); + + useUpdateEffect( () => { + setStore( { + ...store, + staging, + } ); + notifySuccess( getStagingNoticeTitle, getStagingNoticeText ); + updateUI( staging, '.wppbh-app-navitem-Staging' ); + }, [ staging ] ); + + return ( + + + + + + + +
+ +
+ +
+ +
+
+
+
+ ); +}; + +export default Admin; From 26c72416fa347ed0d15fd30a2615af3819eaca90 Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Tue, 28 May 2024 12:39:26 +0530 Subject: [PATCH 17/25] Update Onboarding to 2.3.2 --- composer.json | 2 +- composer.lock | 64 +++++++++++++++++++++++++-------------------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/composer.json b/composer.json index 9259be470..cc2b3dade 100644 --- a/composer.json +++ b/composer.json @@ -85,7 +85,7 @@ "newfold-labs/wp-module-loader": "^1.0.10", "newfold-labs/wp-module-marketplace": "^2.2.4", "newfold-labs/wp-module-notifications": "^1.3.0", - "newfold-labs/wp-module-onboarding": "^2.3.1", + "newfold-labs/wp-module-onboarding": "^2.3.2", "newfold-labs/wp-module-patterns": "^1.0.0", "newfold-labs/wp-module-performance": "^1.4.1", "newfold-labs/wp-module-runtime": "^1.0.11", diff --git a/composer.lock b/composer.lock index 55d874099..aaed2c454 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "810b56e4371276706ed3b6190e09b036", + "content-hash": "58534e07ba922d999682c7939a7f3f71", "packages": [ { "name": "doctrine/inflector", @@ -298,16 +298,16 @@ }, { "name": "newfold-labs/wp-module-ai", - "version": "1.1.8", + "version": "1.1.9", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-ai.git", - "reference": "ffc1c06e69bcaf46e7ad10eda147d10a9574bcea" + "reference": "961dc65294b3b4a2c5cc4d2694bcff521cbd3ef8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-ai/zipball/ffc1c06e69bcaf46e7ad10eda147d10a9574bcea", - "reference": "ffc1c06e69bcaf46e7ad10eda147d10a9574bcea", + "url": "https://api.github.com/repos/newfold-labs/wp-module-ai/zipball/961dc65294b3b4a2c5cc4d2694bcff521cbd3ef8", + "reference": "961dc65294b3b4a2c5cc4d2694bcff521cbd3ef8", "shasum": "" }, "require": { @@ -336,10 +336,10 @@ ], "description": "A module for providing artificial intelligence capabilities.", "support": { - "source": "https://github.com/newfold-labs/wp-module-ai/tree/1.1.8", + "source": "https://github.com/newfold-labs/wp-module-ai/tree/1.1.9", "issues": "https://github.com/newfold-labs/wp-module-ai/issues" }, - "time": "2024-04-08T16:04:32+00:00" + "time": "2024-05-20T17:10:20+00:00" }, { "name": "newfold-labs/wp-module-coming-soon", @@ -397,16 +397,16 @@ }, { "name": "newfold-labs/wp-module-context", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-context.git", - "reference": "0d852f83f353f1631309e5ae7da9cb1e046bc984" + "reference": "fb57e927df45ef33573fe7f429ef1e088b0a6df0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-context/zipball/0d852f83f353f1631309e5ae7da9cb1e046bc984", - "reference": "0d852f83f353f1631309e5ae7da9cb1e046bc984", + "url": "https://api.github.com/repos/newfold-labs/wp-module-context/zipball/fb57e927df45ef33573fe7f429ef1e088b0a6df0", + "reference": "fb57e927df45ef33573fe7f429ef1e088b0a6df0", "shasum": "" }, "require": { @@ -444,10 +444,10 @@ ], "description": "Newfold module to determine context for various brands and platforms.", "support": { - "source": "https://github.com/newfold-labs/wp-module-context/tree/1.0.0", + "source": "https://github.com/newfold-labs/wp-module-context/tree/1.0.1", "issues": "https://github.com/newfold-labs/wp-module-context/issues" }, - "time": "2024-02-22T18:22:13+00:00" + "time": "2024-05-23T20:34:28+00:00" }, { "name": "newfold-labs/wp-module-data", @@ -951,16 +951,16 @@ }, { "name": "newfold-labs/wp-module-migration", - "version": "v1.0.2", + "version": "v1.0.3", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-migration.git", - "reference": "6c14249e1aba88bf23434352301f55649074dd68" + "reference": "69407754a69cd6e8bc6fb48e9daa361285541e45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-migration/zipball/6c14249e1aba88bf23434352301f55649074dd68", - "reference": "6c14249e1aba88bf23434352301f55649074dd68", + "url": "https://api.github.com/repos/newfold-labs/wp-module-migration/zipball/69407754a69cd6e8bc6fb48e9daa361285541e45", + "reference": "69407754a69cd6e8bc6fb48e9daa361285541e45", "shasum": "" }, "require": { @@ -998,10 +998,10 @@ ], "description": "Initiates the migration process", "support": { - "source": "https://github.com/newfold-labs/wp-module-migration/tree/v1.0.2", + "source": "https://github.com/newfold-labs/wp-module-migration/tree/v1.0.3", "issues": "https://github.com/newfold-labs/wp-module-migration/issues" }, - "time": "2024-05-16T12:09:32+00:00" + "time": "2024-05-27T06:29:53+00:00" }, { "name": "newfold-labs/wp-module-notifications", @@ -1050,16 +1050,16 @@ }, { "name": "newfold-labs/wp-module-onboarding", - "version": "2.3.1", + "version": "2.3.2", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-onboarding.git", - "reference": "411ffa50a12a040213be6204e5f27612b7974286" + "reference": "2e45a0b893e83df7feb81ce4dcd99467de36de9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-onboarding/zipball/411ffa50a12a040213be6204e5f27612b7974286", - "reference": "411ffa50a12a040213be6204e5f27612b7974286", + "url": "https://api.github.com/repos/newfold-labs/wp-module-onboarding/zipball/2e45a0b893e83df7feb81ce4dcd99467de36de9d", + "reference": "2e45a0b893e83df7feb81ce4dcd99467de36de9d", "shasum": "" }, "require": { @@ -1105,23 +1105,23 @@ ], "description": "Next-generation WordPress Onboarding for WordPress sites at Newfold Digital.", "support": { - "source": "https://github.com/newfold-labs/wp-module-onboarding/tree/2.3.1", + "source": "https://github.com/newfold-labs/wp-module-onboarding/tree/2.3.2", "issues": "https://github.com/newfold-labs/wp-module-onboarding/issues" }, - "time": "2024-05-16T11:37:24+00:00" + "time": "2024-05-28T06:52:26+00:00" }, { "name": "newfold-labs/wp-module-onboarding-data", - "version": "1.1.9", + "version": "1.1.10", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-onboarding-data.git", - "reference": "7d61b2fc732ddfb2d67d7dfe6bfec4851b3996a8" + "reference": "32963151eda0eb2f93a77a9a0fa55d1ec8c9aed5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-onboarding-data/zipball/7d61b2fc732ddfb2d67d7dfe6bfec4851b3996a8", - "reference": "7d61b2fc732ddfb2d67d7dfe6bfec4851b3996a8", + "url": "https://api.github.com/repos/newfold-labs/wp-module-onboarding-data/zipball/32963151eda0eb2f93a77a9a0fa55d1ec8c9aed5", + "reference": "32963151eda0eb2f93a77a9a0fa55d1ec8c9aed5", "shasum": "" }, "require": { @@ -1156,10 +1156,10 @@ ], "description": "A non-toggleable module containing a standardized interface for interacting with Onboarding data.", "support": { - "source": "https://github.com/newfold-labs/wp-module-onboarding-data/tree/1.1.9", + "source": "https://github.com/newfold-labs/wp-module-onboarding-data/tree/1.1.10", "issues": "https://github.com/newfold-labs/wp-module-onboarding-data/issues" }, - "time": "2024-05-16T10:57:14+00:00" + "time": "2024-05-27T09:30:23+00:00" }, { "name": "newfold-labs/wp-module-patterns", @@ -4074,5 +4074,5 @@ "platform-overrides": { "php": "7.3.0" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } From c3e5de3899d8c353c841a6088ec99cb4e830e911 Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Tue, 28 May 2024 14:56:38 +0530 Subject: [PATCH 18/25] Update lock file --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index aaed2c454..2d4ebfb60 100644 --- a/composer.lock +++ b/composer.lock @@ -1054,12 +1054,12 @@ "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-onboarding.git", - "reference": "2e45a0b893e83df7feb81ce4dcd99467de36de9d" + "reference": "5d73dec28f11e3ab305ee3ebd05c118636af4d70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-onboarding/zipball/2e45a0b893e83df7feb81ce4dcd99467de36de9d", - "reference": "2e45a0b893e83df7feb81ce4dcd99467de36de9d", + "url": "https://api.github.com/repos/newfold-labs/wp-module-onboarding/zipball/5d73dec28f11e3ab305ee3ebd05c118636af4d70", + "reference": "5d73dec28f11e3ab305ee3ebd05c118636af4d70", "shasum": "" }, "require": { @@ -1108,7 +1108,7 @@ "source": "https://github.com/newfold-labs/wp-module-onboarding/tree/2.3.2", "issues": "https://github.com/newfold-labs/wp-module-onboarding/issues" }, - "time": "2024-05-28T06:52:26+00:00" + "time": "2024-05-28T09:12:14+00:00" }, { "name": "newfold-labs/wp-module-onboarding-data", From abe8407b11af8c80fa1e2af18d989b19d32f05b4 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Tue, 28 May 2024 16:37:05 -0400 Subject: [PATCH 19/25] copy updates for new toggles and clean up admin page --- src/app/pages/admin/index.js | 140 +----------------- src/app/pages/settings/helpCenterSettings.js | 22 +-- .../settings/performanceFeatureSettings.js | 100 +++++++++++++ .../pages/settings/stagingFeatureSettings.js | 97 ++++++++++++ .../pages/settings/wonderBlocksSettings.js | 4 +- src/app/util/helpers.js | 25 ++++ 6 files changed, 235 insertions(+), 153 deletions(-) create mode 100644 src/app/pages/settings/performanceFeatureSettings.js create mode 100644 src/app/pages/settings/stagingFeatureSettings.js diff --git a/src/app/pages/admin/index.js b/src/app/pages/admin/index.js index 4a0fe023e..e5bdeb324 100644 --- a/src/app/pages/admin/index.js +++ b/src/app/pages/admin/index.js @@ -1,127 +1,11 @@ import classNames from 'classnames'; -import { useState } from '@wordpress/element'; -import AppStore from '../../data/store'; import HelpCenterSettings from '../settings/helpCenterSettings'; import WonderBlocksSettings from '../settings/wonderBlocksSettings'; -import { useUpdateEffect } from 'react-use'; -import { featureToggle } from '../../util/helpers'; -import { Container, Page, ToggleField } from '@newfold/ui-component-library'; -import { useNotification } from 'App/components/notifications'; +import StagingFeatureSettings from '../settings/stagingFeatureSettings'; +import PerformanceFeatureSettings from '../settings/performanceFeatureSettings'; +import { Container, Page } from '@newfold/ui-component-library'; const Admin = () => { - const { store, setStore } = useContext( AppStore ); - const [ performance, setPerformance ] = useState( - store.features.performance - ); - const [ performanceLocked, setPerformanceLocked ] = useState( - ! store.toggleableFeatures.performance - ); - const [ staging, setStaging ] = useState( store.features.staging ); - const [ stagingLocked, setStagingLocked ] = useState( - ! store.toggleableFeatures.staging - ); - - const notify = useNotification(); - - const getStagingNoticeTitle = () => { - return staging - ? __( 'Staging Enabled', 'wp-plugin-bluehost' ) - : __( 'Staging Disabled', 'wp-plugin-bluehost' ); - }; - const getStagingNoticeText = () => { - return staging - ? __( - 'You need to reload the page to manage Staging.', - 'wp-plugin-bluehost' - ) - : __( 'Staging will no longer display.', 'wp-plugin-bluehost' ); - }; - - const getPerformanceNoticeTitle = () => { - return performance - ? __( 'Performance Enabled', 'wp-plugin-bluehost' ) - : __( 'Performance Disabled', 'wp-plugin-bluehost' ); - }; - const getPerformanceNoticeText = () => { - return performance - ? __( - 'You need to reload the page to manage Performance.', - 'wp-plugin-bluehost' - ) - : __( 'Performance will no longer display.', 'wp-plugin-bluehost' ); - }; - - const togglePerformance = () => { - featureToggle( 'performance', ( response ) => { - if ( response.success ) { - setPerformance( ! performance ); - } else { - setPerformanceLocked( true ); - notifyError(); - } - } ); - }; - - const toggleStaging = () => { - featureToggle( 'staging', ( response ) => { - if ( response.success ) { - setStaging( ! staging ); - } else { - setStagingLocked( true ); - notifyError(); - } - } ); - }; - - const updateUI = ( enabled, selector ) => { - const element = document.querySelector( selector ); - if ( element ) { - if ( ! enabled ) { - element.classList.add( 'nfd-disabled' ); - } else { - element.classList.remove( 'nfd-disabled' ); - // window.location.reload(); - } - } - }; - - const notifyError = () => { - notify.push( 'feature-toggle-notice', { - title: __( 'Sorry, that is not allowed.', 'wp-plugin-bluehost' ), - description: __( - 'This feature cannot currently be modified.', - 'wp-plugin-bluehost' - ), - variant: 'error', - } ); - }; - - const notifySuccess = ( renderTitle, renderDescription ) => { - notify.push( 'feature-toggle-notice', { - title: renderTitle(), - description: renderDescription(), - variant: 'success', - autoDismiss: 5000, - } ); - }; - - useUpdateEffect( () => { - setStore( { - ...store, - performance, - } ); - notifySuccess( getPerformanceNoticeTitle, getPerformanceNoticeText ); - updateUI( performance, '.wppbh-app-navitem-Performance' ); - }, [ performance ] ); - - useUpdateEffect( () => { - setStore( { - ...store, - staging, - } ); - notifySuccess( getStagingNoticeTitle, getStagingNoticeText ); - updateUI( staging, '.wppbh-app-navitem-Staging' ); - }, [ staging ] ); return ( @@ -142,27 +26,15 @@ const Admin = () => { >

- +
- +
diff --git a/src/app/pages/settings/helpCenterSettings.js b/src/app/pages/settings/helpCenterSettings.js index 98787f4a3..f19ad9d18 100644 --- a/src/app/pages/settings/helpCenterSettings.js +++ b/src/app/pages/settings/helpCenterSettings.js @@ -2,7 +2,7 @@ import { useState } from '@wordpress/element'; import { useUpdateEffect } from 'react-use'; import { Alert, ToggleField } from '@newfold/ui-component-library'; import AppStore from '../../data/store'; -import { featureToggle } from '../../util/helpers'; +import { featureToggle, updateUI } from '../../util/helpers'; import { useNotification } from 'App/components/notifications'; const HelpCenterSettings = () => { @@ -22,11 +22,11 @@ const HelpCenterSettings = () => { const getHelpCenterNoticeText = () => { return helpCenter ? __( - 'You need to reload the page to see the Help Center.', + 'Reload the page to access the Help Center.', 'wp-plugin-bluehost' ) : __( - 'The help center will no longer display.', + 'The Help Center will no longer display.', 'wp-plugin-bluehost' ); }; @@ -43,18 +43,6 @@ const HelpCenterSettings = () => { } ); }; - const updateUI = ( enabled, selector ) => { - const element = document.querySelector( selector ); - if ( element ) { - if ( ! enabled ) { - element.classList.add( 'nfd-disabled' ); - } else { - element.classList.remove( 'nfd-disabled' ); - // window.location.reload(); - } - } - }; - const notifyError = () => { notify.push( 'feature-toggle-notice', { title: __( 'Sorry, that is not allowed.', 'wp-plugin-bluehost' ), @@ -81,7 +69,7 @@ const HelpCenterSettings = () => { helpCenter, } ); notifySuccess( getHelpCenterNoticeTitle, getHelpCenterNoticeText ); - updateUI( helpCenter, '#wp-admin-bar-help-center' ); + updateUI( '#wp-admin-bar-help-center', helpCenter ); }, [ helpCenter ] ); return ( @@ -90,7 +78,7 @@ const HelpCenterSettings = () => { id="help-center-toggle" label="Help Center" description={ __( - 'The Help Center page can give you all kinds of WordPress answers from a prompt with the help of AI.', + 'The Help Center provides guided, step-by-step assistance as you build your site.', 'wp-plugin-bluehost' ) } disabled={ helpCenterLocked } diff --git a/src/app/pages/settings/performanceFeatureSettings.js b/src/app/pages/settings/performanceFeatureSettings.js new file mode 100644 index 000000000..100cde219 --- /dev/null +++ b/src/app/pages/settings/performanceFeatureSettings.js @@ -0,0 +1,100 @@ +import { useState } from '@wordpress/element'; +import { useUpdateEffect } from 'react-use'; +import { Alert, ToggleField } from '@newfold/ui-component-library'; +import AppStore from '../../data/store'; +import { featureToggle, updateUI } from '../../util/helpers'; +import { useNotification } from 'App/components/notifications'; + +const PerformanceFeatureSettings = () => { + const { store, setStore } = useContext( AppStore ); + const [ performance, setPerformance ] = useState( + store.features.performance + ); + const [ performanceLocked, setPerformanceLocked ] = useState( + ! store.toggleableFeatures.performance + ); + const [ isError, setError ] = useState( false ); + const notify = useNotification(); + + const getPerformanceNoticeTitle = () => { + return performance + ? __( 'Performance Enabled', 'wp-plugin-bluehost' ) + : __( 'Performance Disabled', 'wp-plugin-bluehost' ); + }; + + const getPerformanceNoticeText = () => { + return performance + ? __( + 'You need to reload the page to manage Performance.', + 'wp-plugin-bluehost' + ) + : __( 'Performance will no longer display.', 'wp-plugin-bluehost' ); + }; + + const togglePerformance = () => { + featureToggle( 'performance', ( response ) => { + if ( response.success ) { + setPerformance( ! performance ); + } else { + setPerformanceLocked( true ); + notifyError(); + } + } ); + }; + + const notifySuccess = ( renderTitle, renderDescription ) => { + notify.push( 'feature-toggle-notice', { + title: renderTitle(), + description: renderDescription(), + variant: 'success', + autoDismiss: 5000, + } ); + }; + + const notifyError = () => { + notify.push( 'feature-toggle-notice', { + title: __( 'Sorry, that is not allowed.', 'wp-plugin-bluehost' ), + description: __( + 'This feature cannot currently be modified.', + 'wp-plugin-bluehost' + ), + variant: 'error', + } ); + }; + + useUpdateEffect( () => { + setStore( { + ...store, + performance, + } ); + notifySuccess( getPerformanceNoticeTitle, getPerformanceNoticeText ); + updateUI( '.wppbh-app-navitem-Performance', performance ); + }, [ performance ] ); + + return ( +
+ + + { isError && ( + + { __( + 'Oops! Something went wrong. Please try again.', + 'wp-plugin-bluehost' + ) } + + ) } +
+ ); +}; + +export default PerformanceFeatureSettings; diff --git a/src/app/pages/settings/stagingFeatureSettings.js b/src/app/pages/settings/stagingFeatureSettings.js new file mode 100644 index 000000000..4a8784804 --- /dev/null +++ b/src/app/pages/settings/stagingFeatureSettings.js @@ -0,0 +1,97 @@ +import { useState } from '@wordpress/element'; +import { useUpdateEffect } from 'react-use'; +import { Alert, ToggleField } from '@newfold/ui-component-library'; +import AppStore from '../../data/store'; +import { featureToggle, updateUI } from '../../util/helpers'; +import { useNotification } from 'App/components/notifications'; + +const StagingFeatureSettings = () => { + const { store, setStore } = useContext( AppStore ); + const [ staging, setStaging ] = useState( store.features.staging ); + const [ stagingLocked, setStagingLocked ] = useState( + ! store.toggleableFeatures.staging + ); + const [ isError, setError ] = useState( false ); + const notify = useNotification(); + + const getStagingNoticeTitle = () => { + return staging + ? __( 'Staging Enabled', 'wp-plugin-bluehost' ) + : __( 'Staging Disabled', 'wp-plugin-bluehost' ); + }; + const getStagingNoticeText = () => { + return staging + ? __( + 'You need to reload the page to manage Staging.', + 'wp-plugin-bluehost' + ) + : __( 'Staging will no longer display.', 'wp-plugin-bluehost' ); + }; + + const toggleStaging = () => { + featureToggle( 'staging', ( response ) => { + if ( response.success ) { + setStaging( ! staging ); + } else { + setStagingLocked( true ); + notifyError(); + } + } ); + }; + + const notifyError = () => { + notify.push( 'feature-toggle-notice', { + title: __( 'Sorry, that is not allowed.', 'wp-plugin-bluehost' ), + description: __( + 'This feature cannot currently be modified.', + 'wp-plugin-bluehost' + ), + variant: 'error', + } ); + }; + + const notifySuccess = ( renderTitle, renderDescription ) => { + notify.push( 'feature-toggle-notice', { + title: renderTitle(), + description: renderDescription(), + variant: 'success', + autoDismiss: 5000, + } ); + }; + + useUpdateEffect( () => { + setStore( { + ...store, + staging, + } ); + notifySuccess( getStagingNoticeTitle, getStagingNoticeText ); + updateUI( '.wppbh-app-navitem-Staging', staging ); + }, [ staging ] ); + + return ( +
+ + + { isError && ( + + { __( + 'Oops! Something went wrong. Please try again.', + 'wp-plugin-bluehost' + ) } + + ) } +
+ ); +}; + +export default StagingFeatureSettings; diff --git a/src/app/pages/settings/wonderBlocksSettings.js b/src/app/pages/settings/wonderBlocksSettings.js index 5027269e0..df0779cfc 100644 --- a/src/app/pages/settings/wonderBlocksSettings.js +++ b/src/app/pages/settings/wonderBlocksSettings.js @@ -24,7 +24,7 @@ const WonderBlocksSettings = () => { const getWonderBlocksNoticeText = () => { return wonderBlocks ? __( - 'Create content to see Wonder Blocks in action.', + 'Create new content to see Wonder Blocks in action.', 'wp-plugin-bluehost' ) : __( @@ -79,7 +79,7 @@ const WonderBlocksSettings = () => { id="help-center-toggle" label="Wonder Blocks" description={ __( - 'Wonder Blocks give you patterns and templates to help create site content faster and better using AI to tailor content to your site.', + 'Wonder Blocks provides a library of customizable block patterns and page templates.', 'wp-plugin-bluehost' ) } disabled={ wonderBlocksLocked } diff --git a/src/app/util/helpers.js b/src/app/util/helpers.js index 16d3b9363..50e5f7daa 100644 --- a/src/app/util/helpers.js +++ b/src/app/util/helpers.js @@ -69,6 +69,31 @@ export const featureToggle = async ( featureName, thenCallback ) => { } ); }; +/** + * Helper to update UI elements with a class + * @param {boolean} enabled whether the element should be activated or deactivated + * @param {string} selector the css selector to find the element + * @param {string} className the css class to add/remove + */ +export const updateUI = ( + selector, + enabled = true, + className = 'nfd-disabled', + forceReload = false +) => { + const element = document.querySelector( selector ); + if ( element ) { + if ( ! enabled ) { + element.classList.add( className ); + } else { + element.classList.remove( className ); + } + } + if ( forceReload ) { + window.location.reload(); + } +}; + /** * Wrapper method to post request to bluehost cache endpoint * From ae5faada6f0c1e77bbbd328c51cb774dcda8adae Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Tue, 28 May 2024 16:38:08 -0400 Subject: [PATCH 20/25] composer updates to require branches as versions 1.9.0 is used in place of a 2.0.0 release for patterns and performance modules since the 1.x version is a cross-dependency for onboarding/onboarding-data modules. --- composer.json | 16 +++--- composer.lock | 156 ++++++++++++++++++++++++++++++++------------------ 2 files changed, 108 insertions(+), 64 deletions(-) diff --git a/composer.json b/composer.json index 02f4c585a..294bfd0a9 100644 --- a/composer.json +++ b/composer.json @@ -70,30 +70,30 @@ "roave/security-advisories": "dev-latest", "newfold-labs/wp-php-standards": "^1.2.3", "wp-cli/i18n-command": "^2.6.1", - "wp-phpunit/wp-phpunit": "^6.5.2" + "wp-phpunit/wp-phpunit": "^6.5.3" }, "require": { "newfold-labs/wp-module-activation": "^1.0.2", - "newfold-labs/wp-module-atomic": "^1.1.0", + "newfold-labs/wp-module-atomic": "^1.2.0", "newfold-labs/wp-module-coming-soon": "^1.2.3", "newfold-labs/wp-module-context": "^1.0.1", "newfold-labs/wp-module-data": "^2.5.0", "newfold-labs/wp-module-deactivation": "^1.1.2", "newfold-labs/wp-module-ecommerce": "^1.3.31", - "newfold-labs/wp-module-features": "^1.4.0", + "newfold-labs/wp-module-features": "^1.4.1", "newfold-labs/wp-module-global-ctb": "^1.0.11", - "newfold-labs/wp-module-facebook": "^1.0.6", - "newfold-labs/wp-module-help-center": "^1.0.25", + "newfold-labs/wp-module-facebook": "^1.0.7", + "newfold-labs/wp-module-help-center": "dev-feature/help-center-feature as 2.0.0", "newfold-labs/wp-module-loader": "^1.0.10", "newfold-labs/wp-module-marketplace": "^2.2.4", "newfold-labs/wp-module-notifications": "^1.3.0", "newfold-labs/wp-module-onboarding": "^2.3.1", - "newfold-labs/wp-module-patterns": "^1.0.0", - "newfold-labs/wp-module-performance": "^1.4.1", + "newfold-labs/wp-module-patterns": "dev-add/feature-module as 1.9.0", + "newfold-labs/wp-module-performance": "dev-add/feature-module as 1.9.0", "newfold-labs/wp-module-runtime": "^1.0.11", "newfold-labs/wp-module-secure-passwords": "^1.1.1", "newfold-labs/wp-module-sso": "^1.0.5", - "newfold-labs/wp-module-staging": "^1.3.3", + "newfold-labs/wp-module-staging": "dev-add/staging-feature as 2.0.0", "wp-forge/wp-update-handler": "^1.0.2", "wp-forge/wp-upgrade-handler": "^1.0" } diff --git a/composer.lock b/composer.lock index 4d499e77a..2933b1573 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "63bf958f6ba538fcbb896b8d2c41e464", + "content-hash": "e2b0e3e7dfbfc769a19e1f0abe1c269a", "packages": [ { "name": "doctrine/inflector", @@ -298,16 +298,16 @@ }, { "name": "newfold-labs/wp-module-ai", - "version": "1.1.8", + "version": "1.1.9", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-ai.git", - "reference": "ffc1c06e69bcaf46e7ad10eda147d10a9574bcea" + "reference": "961dc65294b3b4a2c5cc4d2694bcff521cbd3ef8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-ai/zipball/ffc1c06e69bcaf46e7ad10eda147d10a9574bcea", - "reference": "ffc1c06e69bcaf46e7ad10eda147d10a9574bcea", + "url": "https://api.github.com/repos/newfold-labs/wp-module-ai/zipball/961dc65294b3b4a2c5cc4d2694bcff521cbd3ef8", + "reference": "961dc65294b3b4a2c5cc4d2694bcff521cbd3ef8", "shasum": "" }, "require": { @@ -336,23 +336,23 @@ ], "description": "A module for providing artificial intelligence capabilities.", "support": { - "source": "https://github.com/newfold-labs/wp-module-ai/tree/1.1.8", + "source": "https://github.com/newfold-labs/wp-module-ai/tree/1.1.9", "issues": "https://github.com/newfold-labs/wp-module-ai/issues" }, - "time": "2024-04-08T16:04:32+00:00" + "time": "2024-05-20T17:10:20+00:00" }, { "name": "newfold-labs/wp-module-atomic", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-atomic.git", - "reference": "c7909406bf38d1dc1d4cbe51dce973fecfd5fa38" + "reference": "d18b3839f65b6c3fab9fbad52d632be5f1ee321f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-atomic/zipball/c7909406bf38d1dc1d4cbe51dce973fecfd5fa38", - "reference": "c7909406bf38d1dc1d4cbe51dce973fecfd5fa38", + "url": "https://api.github.com/repos/newfold-labs/wp-module-atomic/zipball/d18b3839f65b6c3fab9fbad52d632be5f1ee321f", + "reference": "d18b3839f65b6c3fab9fbad52d632be5f1ee321f", "shasum": "" }, "require": { @@ -389,10 +389,10 @@ ], "description": "A module to customize a brand plugin for wp cloud environments.", "support": { - "source": "https://github.com/newfold-labs/wp-module-atomic/tree/1.1.0", + "source": "https://github.com/newfold-labs/wp-module-atomic/tree/1.2.0", "issues": "https://github.com/newfold-labs/wp-module-atomic/issues" }, - "time": "2024-05-23T20:35:51+00:00" + "time": "2024-05-28T20:14:15+00:00" }, { "name": "newfold-labs/wp-module-coming-soon", @@ -504,19 +504,20 @@ }, { "name": "newfold-labs/wp-module-data", - "version": "2.5.0", + "version": "2.5.1", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-data.git", - "reference": "42bdfdece373e194b405f6b9a9e2a9e07154dfb9" + "reference": "b9cb6839f891ee05b77b98ca2f961fc8dfac5112" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-data/zipball/42bdfdece373e194b405f6b9a9e2a9e07154dfb9", - "reference": "42bdfdece373e194b405f6b9a9e2a9e07154dfb9", + "url": "https://api.github.com/repos/newfold-labs/wp-module-data/zipball/b9cb6839f891ee05b77b98ca2f961fc8dfac5112", + "reference": "b9cb6839f891ee05b77b98ca2f961fc8dfac5112", "shasum": "" }, "require": { + "ext-json": "*", "newfold-labs/wp-module-loader": "^1.0", "wp-forge/helpers": "^2.0", "wp-forge/wp-query-builder": "^1.0", @@ -546,6 +547,9 @@ "fix": [ "vendor/bin/phpcbf . --standard=phpcs.xml" ], + "cs-changes": [ + "updated_files=$( git status | grep '\\(new file\\|modified\\):\\s.*.php$' | cut -c14- | awk '{ printf(\"%s \", $0) }' ); echo \"\\nChecking\"$(git status | grep '\\(new file\\|modified\\):\\s.*.php$' | tail -n+2 | wc -l)\" files\"; phpcbf $(echo $updated_files); phpcs $(echo $updated_files);" + ], "lint": [ "vendor/bin/phpcs . --standard=phpcs.xml -s" ] @@ -555,10 +559,10 @@ ], "description": "Newfold Data Module", "support": { - "source": "https://github.com/newfold-labs/wp-module-data/tree/2.5.0", + "source": "https://github.com/newfold-labs/wp-module-data/tree/2.5.1", "issues": "https://github.com/newfold-labs/wp-module-data/issues" }, - "time": "2024-05-15T00:31:16+00:00" + "time": "2024-05-28T14:16:02+00:00" }, { "name": "newfold-labs/wp-module-deactivation", @@ -724,16 +728,16 @@ }, { "name": "newfold-labs/wp-module-features", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-features.git", - "reference": "bd5ca58a9feea6f4cddfa27e665340005b849923" + "reference": "d22ca49d2235ac7797fa6ad315ceaf7edec9bd31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/bd5ca58a9feea6f4cddfa27e665340005b849923", - "reference": "bd5ca58a9feea6f4cddfa27e665340005b849923", + "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/d22ca49d2235ac7797fa6ad315ceaf7edec9bd31", + "reference": "d22ca49d2235ac7797fa6ad315ceaf7edec9bd31", "shasum": "" }, "require": { @@ -774,10 +778,10 @@ ], "description": "A module for providing an interface for features.", "support": { - "source": "https://github.com/newfold-labs/wp-module-features/tree/1.4.0", + "source": "https://github.com/newfold-labs/wp-module-features/tree/1.4.1", "issues": "https://github.com/newfold-labs/wp-module-features/issues" }, - "time": "2024-05-23T20:35:43+00:00" + "time": "2024-05-28T18:01:46+00:00" }, { "name": "newfold-labs/wp-module-global-ctb", @@ -831,21 +835,22 @@ }, { "name": "newfold-labs/wp-module-help-center", - "version": "1.0.25", + "version": "dev-feature/help-center-feature", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-help-center.git", - "reference": "6ec172715dcc43103b790878be4ac38e4223ce13" + "reference": "8486ea254648ac0782561ff6b121de0fd6390009" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-help-center/zipball/6ec172715dcc43103b790878be4ac38e4223ce13", - "reference": "6ec172715dcc43103b790878be4ac38e4223ce13", + "url": "https://api.github.com/repos/newfold-labs/wp-module-help-center/zipball/8486ea254648ac0782561ff6b121de0fd6390009", + "reference": "8486ea254648ac0782561ff6b121de0fd6390009", "shasum": "" }, "require": { - "newfold-labs/wp-module-ai": "^1.1.7", - "newfold-labs/wp-module-data": "^2.3.4" + "newfold-labs/wp-module-ai": "^1.1.9", + "newfold-labs/wp-module-data": "^2.5.0", + "newfold-labs/wp-module-features": "^1.4.1" }, "require-dev": { "newfold-labs/wp-php-standards": "@stable" @@ -870,10 +875,10 @@ ], "description": "HelpCenter", "support": { - "source": "https://github.com/newfold-labs/wp-module-help-center/tree/1.0.25", + "source": "https://github.com/newfold-labs/wp-module-help-center/tree/feature/help-center-feature", "issues": "https://github.com/newfold-labs/wp-module-help-center/issues" }, - "time": "2024-04-26T13:58:31+00:00" + "time": "2024-05-28T19:50:56+00:00" }, { "name": "newfold-labs/wp-module-install-checker", @@ -1273,18 +1278,22 @@ }, { "name": "newfold-labs/wp-module-patterns", - "version": "1.0.0", + "version": "dev-add/feature-module", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-patterns.git", - "reference": "3f41c4cc25b27f1e488a9cc2ffd82f5bc953128a" + "reference": "ba95bc31e16c9a3a06a8890c529398528f3ab9dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-patterns/zipball/3f41c4cc25b27f1e488a9cc2ffd82f5bc953128a", - "reference": "3f41c4cc25b27f1e488a9cc2ffd82f5bc953128a", + "url": "https://api.github.com/repos/newfold-labs/wp-module-patterns/zipball/ba95bc31e16c9a3a06a8890c529398528f3ab9dd", + "reference": "ba95bc31e16c9a3a06a8890c529398528f3ab9dd", "shasum": "" }, + "require": { + "newfold-labs/wp-module-data": "^2.0", + "newfold-labs/wp-module-features": "^1.4" + }, "require-dev": { "newfold-labs/wp-php-standards": "^1.2" }, @@ -1316,30 +1325,34 @@ ], "description": "WordPress Cloud Patterns", "support": { - "source": "https://github.com/newfold-labs/wp-module-patterns/tree/1.0.0", + "source": "https://github.com/newfold-labs/wp-module-patterns/tree/add/feature-module", "issues": "https://github.com/newfold-labs/wp-module-patterns/issues" }, - "time": "2024-05-01T20:37:14+00:00" + "time": "2024-05-24T19:54:52+00:00" }, { "name": "newfold-labs/wp-module-performance", - "version": "1.4.1", + "version": "dev-add/feature-module", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-performance.git", - "reference": "5e4c87d404788c61ea55e3c62e29e5df48c36340" + "reference": "6eeca8c6f52a09b8e384b7b62c72121c77d72c52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-performance/zipball/5e4c87d404788c61ea55e3c62e29e5df48c36340", - "reference": "5e4c87d404788c61ea55e3c62e29e5df48c36340", + "url": "https://api.github.com/repos/newfold-labs/wp-module-performance/zipball/6eeca8c6f52a09b8e384b7b62c72121c77d72c52", + "reference": "6eeca8c6f52a09b8e384b7b62c72121c77d72c52", "shasum": "" }, "require": { "newfold-labs/wp-module-context": "^1.0", - "wp-forge/collection": "^1.0", + "newfold-labs/wp-module-features": "^1.3", + "wp-forge/collection": "^1.0.2", "wp-forge/wp-htaccess-manager": "^1.0", - "wpscholar/url": "^1.2" + "wpscholar/url": "^1.2.2" + }, + "require-dev": { + "newfold-labs/wp-php-standards": "^1.2.3" }, "type": "library", "autoload": { @@ -1347,6 +1360,7 @@ "NewfoldLabs\\WP\\Module\\Performance\\": "includes" }, "files": [ + "includes/PerformanceFeature.php", "includes/functions.php", "bootstrap.php" ] @@ -1362,10 +1376,10 @@ ], "description": "A module for managing caching functionality.", "support": { - "source": "https://github.com/newfold-labs/wp-module-performance/tree/1.4.1", + "source": "https://github.com/newfold-labs/wp-module-performance/tree/add/feature-module", "issues": "https://github.com/newfold-labs/wp-module-performance/issues" }, - "time": "2024-04-22T22:30:42+00:00" + "time": "2024-05-21T21:20:02+00:00" }, { "name": "newfold-labs/wp-module-runtime", @@ -1515,23 +1529,24 @@ }, { "name": "newfold-labs/wp-module-staging", - "version": "1.3.3", + "version": "dev-add/staging-feature", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-staging.git", - "reference": "c464472e3a5886d9639563262e776b33f8135398" + "reference": "ae85ec034b3764438d53b08df409883a48435f3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-staging/zipball/c464472e3a5886d9639563262e776b33f8135398", - "reference": "c464472e3a5886d9639563262e776b33f8135398", + "url": "https://api.github.com/repos/newfold-labs/wp-module-staging/zipball/ae85ec034b3764438d53b08df409883a48435f3f", + "reference": "ae85ec034b3764438d53b08df409883a48435f3f", "shasum": "" }, "require": { - "newfold-labs/wp-module-context": "^1.0" + "newfold-labs/wp-module-context": "^1.0", + "newfold-labs/wp-module-features": "^1.3.0" }, "require-dev": { - "newfold-labs/wp-php-standards": "^1.2" + "newfold-labs/wp-php-standards": "^1.2.2" }, "type": "library", "autoload": { @@ -1561,10 +1576,10 @@ ], "description": "Newfold module for staging functionality in brand plugins", "support": { - "source": "https://github.com/newfold-labs/wp-module-staging/tree/1.3.3", + "source": "https://github.com/newfold-labs/wp-module-staging/tree/add/staging-feature", "issues": "https://github.com/newfold-labs/wp-module-staging/issues" }, - "time": "2024-04-10T20:37:51+00:00" + "time": "2024-05-21T21:27:16+00:00" }, { "name": "wp-cli/wp-config-transformer", @@ -4172,9 +4187,38 @@ "time": "2024-05-07T16:46:52+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "newfold-labs/wp-module-help-center", + "version": "dev-feature/help-center-feature", + "alias": "2.0.0", + "alias_normalized": "2.0.0.0" + }, + { + "package": "newfold-labs/wp-module-patterns", + "version": "dev-add/feature-module", + "alias": "1.9.0", + "alias_normalized": "1.9.0.0" + }, + { + "package": "newfold-labs/wp-module-performance", + "version": "dev-add/feature-module", + "alias": "1.9.0", + "alias_normalized": "1.9.0.0" + }, + { + "package": "newfold-labs/wp-module-staging", + "version": "dev-add/staging-feature", + "alias": "2.0.0", + "alias_normalized": "2.0.0.0" + } + ], "minimum-stability": "stable", "stability-flags": { + "newfold-labs/wp-module-help-center": 20, + "newfold-labs/wp-module-patterns": 20, + "newfold-labs/wp-module-performance": 20, + "newfold-labs/wp-module-staging": 20, "roave/security-advisories": 20 }, "prefer-stable": false, From 69791f1e8cdbcd03c2255ea1372c1d27948ccf8e Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Tue, 28 May 2024 16:58:41 -0400 Subject: [PATCH 21/25] use error state and eslint cleanup --- src/app/pages/admin/index.js | 1 - src/app/pages/settings/helpCenterSettings.js | 1 + src/app/pages/settings/performanceFeatureSettings.js | 1 + src/app/pages/settings/stagingFeatureSettings.js | 1 + src/app/pages/settings/wonderBlocksSettings.js | 1 + src/app/util/helpers.js | 10 ++++++---- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/pages/admin/index.js b/src/app/pages/admin/index.js index e5bdeb324..cccebc8fe 100644 --- a/src/app/pages/admin/index.js +++ b/src/app/pages/admin/index.js @@ -6,7 +6,6 @@ import PerformanceFeatureSettings from '../settings/performanceFeatureSettings'; import { Container, Page } from '@newfold/ui-component-library'; const Admin = () => { - return ( diff --git a/src/app/pages/settings/helpCenterSettings.js b/src/app/pages/settings/helpCenterSettings.js index f19ad9d18..75ed9d4c1 100644 --- a/src/app/pages/settings/helpCenterSettings.js +++ b/src/app/pages/settings/helpCenterSettings.js @@ -38,6 +38,7 @@ const HelpCenterSettings = () => { setHelpCenter( ! helpCenter ); } else { setHelpCenterLocked( true ); + setError( true ); notifyError(); } } ); diff --git a/src/app/pages/settings/performanceFeatureSettings.js b/src/app/pages/settings/performanceFeatureSettings.js index 100cde219..beab8ce94 100644 --- a/src/app/pages/settings/performanceFeatureSettings.js +++ b/src/app/pages/settings/performanceFeatureSettings.js @@ -37,6 +37,7 @@ const PerformanceFeatureSettings = () => { setPerformance( ! performance ); } else { setPerformanceLocked( true ); + setError( true ); notifyError(); } } ); diff --git a/src/app/pages/settings/stagingFeatureSettings.js b/src/app/pages/settings/stagingFeatureSettings.js index 4a8784804..599d17cfc 100644 --- a/src/app/pages/settings/stagingFeatureSettings.js +++ b/src/app/pages/settings/stagingFeatureSettings.js @@ -34,6 +34,7 @@ const StagingFeatureSettings = () => { setStaging( ! staging ); } else { setStagingLocked( true ); + setError( true ); notifyError(); } } ); diff --git a/src/app/pages/settings/wonderBlocksSettings.js b/src/app/pages/settings/wonderBlocksSettings.js index df0779cfc..f1b489be0 100644 --- a/src/app/pages/settings/wonderBlocksSettings.js +++ b/src/app/pages/settings/wonderBlocksSettings.js @@ -40,6 +40,7 @@ const WonderBlocksSettings = () => { setWonderBlocks( ! wonderBlocks ); } else { setWonderBlocksLocked( true ); + setError( true ); notifyError(); } } ); diff --git a/src/app/util/helpers.js b/src/app/util/helpers.js index 50e5f7daa..0af5e1209 100644 --- a/src/app/util/helpers.js +++ b/src/app/util/helpers.js @@ -70,10 +70,12 @@ export const featureToggle = async ( featureName, thenCallback ) => { }; /** - * Helper to update UI elements with a class - * @param {boolean} enabled whether the element should be activated or deactivated - * @param {string} selector the css selector to find the element - * @param {string} className the css class to add/remove + * Helper to update UI elements as features are enabled/disabled + * + * @param {string} selector css selector to find the element + * @param {boolean} enabled whether the element is now activated/deactivated + * @param {string} className the css class to add/remove - default 'nfd-disabled' + * @param {boolean} forceReload whether this update requires a forced page reload - default false */ export const updateUI = ( selector, From 0dcc62a1ca023408205b337d781090e08a76ebb2 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Tue, 28 May 2024 18:03:11 -0400 Subject: [PATCH 22/25] only show help center toggle on settings if not locked but always display on admin page --- inc/Data.php | 2 -- src/app/pages/admin/index.js | 2 +- src/app/pages/settings/helpCenterSettings.js | 26 +++++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/inc/Data.php b/inc/Data.php index 8bc23b44a..4f04c9113 100644 --- a/inc/Data.php +++ b/inc/Data.php @@ -7,8 +7,6 @@ namespace Bluehost; -use function NewfoldLabs\WP\Module\Features\getFeatures; - /** * \Bluehost\Data * This class does not have a constructor to get instantiated, just static methods. diff --git a/src/app/pages/admin/index.js b/src/app/pages/admin/index.js index cccebc8fe..4f0e2dcd2 100644 --- a/src/app/pages/admin/index.js +++ b/src/app/pages/admin/index.js @@ -29,7 +29,7 @@ const Admin = () => { >
- +

diff --git a/src/app/pages/settings/helpCenterSettings.js b/src/app/pages/settings/helpCenterSettings.js index 75ed9d4c1..56fa6a6ae 100644 --- a/src/app/pages/settings/helpCenterSettings.js +++ b/src/app/pages/settings/helpCenterSettings.js @@ -5,7 +5,7 @@ import AppStore from '../../data/store'; import { featureToggle, updateUI } from '../../util/helpers'; import { useNotification } from 'App/components/notifications'; -const HelpCenterSettings = () => { +const HelpCenterSettings = ( { forceShow = false } ) => { const { store, setStore } = useContext( AppStore ); const [ helpCenter, setHelpCenter ] = useState( store.features.helpCenter ); const [ helpCenterLocked, setHelpCenterLocked ] = useState( @@ -75,17 +75,19 @@ const HelpCenterSettings = () => { return (
- + { ( ! helpCenterLocked || forceShow ) && ( + + ) } { isError && ( From bc73580f53a59d7495a583ac2b45179bd41a1f91 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Wed, 29 May 2024 11:41:19 -0400 Subject: [PATCH 23/25] update help and staging modules to 2.0 releases --- composer.json | 4 ++-- composer.lock | 40 +++++++++++++--------------------------- 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/composer.json b/composer.json index 294bfd0a9..d703b6714 100644 --- a/composer.json +++ b/composer.json @@ -83,7 +83,7 @@ "newfold-labs/wp-module-features": "^1.4.1", "newfold-labs/wp-module-global-ctb": "^1.0.11", "newfold-labs/wp-module-facebook": "^1.0.7", - "newfold-labs/wp-module-help-center": "dev-feature/help-center-feature as 2.0.0", + "newfold-labs/wp-module-help-center": "^2.0.0", "newfold-labs/wp-module-loader": "^1.0.10", "newfold-labs/wp-module-marketplace": "^2.2.4", "newfold-labs/wp-module-notifications": "^1.3.0", @@ -93,7 +93,7 @@ "newfold-labs/wp-module-runtime": "^1.0.11", "newfold-labs/wp-module-secure-passwords": "^1.1.1", "newfold-labs/wp-module-sso": "^1.0.5", - "newfold-labs/wp-module-staging": "dev-add/staging-feature as 2.0.0", + "newfold-labs/wp-module-staging": "^2.0.0", "wp-forge/wp-update-handler": "^1.0.2", "wp-forge/wp-upgrade-handler": "^1.0" } diff --git a/composer.lock b/composer.lock index 2933b1573..9bb730c4d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e2b0e3e7dfbfc769a19e1f0abe1c269a", + "content-hash": "f634968d6e647346ab9624a415b15218", "packages": [ { "name": "doctrine/inflector", @@ -835,16 +835,16 @@ }, { "name": "newfold-labs/wp-module-help-center", - "version": "dev-feature/help-center-feature", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-help-center.git", - "reference": "8486ea254648ac0782561ff6b121de0fd6390009" + "reference": "da9d0d08d5067285c7d36d31b8db58434af2184e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-help-center/zipball/8486ea254648ac0782561ff6b121de0fd6390009", - "reference": "8486ea254648ac0782561ff6b121de0fd6390009", + "url": "https://api.github.com/repos/newfold-labs/wp-module-help-center/zipball/da9d0d08d5067285c7d36d31b8db58434af2184e", + "reference": "da9d0d08d5067285c7d36d31b8db58434af2184e", "shasum": "" }, "require": { @@ -875,10 +875,10 @@ ], "description": "HelpCenter", "support": { - "source": "https://github.com/newfold-labs/wp-module-help-center/tree/feature/help-center-feature", + "source": "https://github.com/newfold-labs/wp-module-help-center/tree/2.0.0", "issues": "https://github.com/newfold-labs/wp-module-help-center/issues" }, - "time": "2024-05-28T19:50:56+00:00" + "time": "2024-05-29T14:37:29+00:00" }, { "name": "newfold-labs/wp-module-install-checker", @@ -1529,16 +1529,16 @@ }, { "name": "newfold-labs/wp-module-staging", - "version": "dev-add/staging-feature", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-staging.git", - "reference": "ae85ec034b3764438d53b08df409883a48435f3f" + "reference": "dae822eec83521f6538844877ee98e637004514d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-staging/zipball/ae85ec034b3764438d53b08df409883a48435f3f", - "reference": "ae85ec034b3764438d53b08df409883a48435f3f", + "url": "https://api.github.com/repos/newfold-labs/wp-module-staging/zipball/dae822eec83521f6538844877ee98e637004514d", + "reference": "dae822eec83521f6538844877ee98e637004514d", "shasum": "" }, "require": { @@ -1576,10 +1576,10 @@ ], "description": "Newfold module for staging functionality in brand plugins", "support": { - "source": "https://github.com/newfold-labs/wp-module-staging/tree/add/staging-feature", + "source": "https://github.com/newfold-labs/wp-module-staging/tree/2.0.0", "issues": "https://github.com/newfold-labs/wp-module-staging/issues" }, - "time": "2024-05-21T21:27:16+00:00" + "time": "2024-05-29T14:18:17+00:00" }, { "name": "wp-cli/wp-config-transformer", @@ -4188,12 +4188,6 @@ } ], "aliases": [ - { - "package": "newfold-labs/wp-module-help-center", - "version": "dev-feature/help-center-feature", - "alias": "2.0.0", - "alias_normalized": "2.0.0.0" - }, { "package": "newfold-labs/wp-module-patterns", "version": "dev-add/feature-module", @@ -4205,20 +4199,12 @@ "version": "dev-add/feature-module", "alias": "1.9.0", "alias_normalized": "1.9.0.0" - }, - { - "package": "newfold-labs/wp-module-staging", - "version": "dev-add/staging-feature", - "alias": "2.0.0", - "alias_normalized": "2.0.0.0" } ], "minimum-stability": "stable", "stability-flags": { - "newfold-labs/wp-module-help-center": 20, "newfold-labs/wp-module-patterns": 20, "newfold-labs/wp-module-performance": 20, - "newfold-labs/wp-module-staging": 20, "roave/security-advisories": 20 }, "prefer-stable": false, From a2394f154a51e72ffa5680027a3866e525b2fdbb Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Wed, 29 May 2024 12:22:51 -0400 Subject: [PATCH 24/25] update performance and patterns modules to 2.0.0 releases both as 1.9.9 since onboarding still requires 1.x versions of each module --- composer.json | 4 ++-- composer.lock | 44 +++++++++++++++++++++----------------------- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/composer.json b/composer.json index 49cb75361..ce7442043 100644 --- a/composer.json +++ b/composer.json @@ -88,8 +88,8 @@ "newfold-labs/wp-module-marketplace": "^2.2.4", "newfold-labs/wp-module-notifications": "^1.3.0", "newfold-labs/wp-module-onboarding": "^2.3.2", - "newfold-labs/wp-module-patterns": "dev-add/feature-module as 1.9.0", - "newfold-labs/wp-module-performance": "dev-add/feature-module as 1.9.0", + "newfold-labs/wp-module-patterns": "2.0.0 as 1.9.9", + "newfold-labs/wp-module-performance": "2.0.0 as 1.9.9", "newfold-labs/wp-module-runtime": "^1.0.11", "newfold-labs/wp-module-secure-passwords": "^1.1.1", "newfold-labs/wp-module-sso": "^1.0.5", diff --git a/composer.lock b/composer.lock index 6718ca945..b6569b0c3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bd29965207b2d311031511c37d5d269f", + "content-hash": "dbf95386853f10764034496007450852", "packages": [ { "name": "doctrine/inflector", @@ -1278,24 +1278,24 @@ }, { "name": "newfold-labs/wp-module-patterns", - "version": "dev-add/feature-module", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-patterns.git", - "reference": "ba95bc31e16c9a3a06a8890c529398528f3ab9dd" + "reference": "89c05ae08ebffe28521c876eb839a7bc9b60d02a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-patterns/zipball/ba95bc31e16c9a3a06a8890c529398528f3ab9dd", - "reference": "ba95bc31e16c9a3a06a8890c529398528f3ab9dd", + "url": "https://api.github.com/repos/newfold-labs/wp-module-patterns/zipball/89c05ae08ebffe28521c876eb839a7bc9b60d02a", + "reference": "89c05ae08ebffe28521c876eb839a7bc9b60d02a", "shasum": "" }, "require": { - "newfold-labs/wp-module-data": "^2.0", + "newfold-labs/wp-module-data": "^2.5.1", "newfold-labs/wp-module-features": "^1.4" }, "require-dev": { - "newfold-labs/wp-php-standards": "^1.2" + "newfold-labs/wp-php-standards": "^1.2.2" }, "type": "library", "autoload": { @@ -1325,23 +1325,23 @@ ], "description": "WordPress Cloud Patterns", "support": { - "source": "https://github.com/newfold-labs/wp-module-patterns/tree/add/feature-module", + "source": "https://github.com/newfold-labs/wp-module-patterns/tree/2.0.0", "issues": "https://github.com/newfold-labs/wp-module-patterns/issues" }, - "time": "2024-05-24T19:54:52+00:00" + "time": "2024-05-29T16:10:58+00:00" }, { "name": "newfold-labs/wp-module-performance", - "version": "dev-add/feature-module", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-performance.git", - "reference": "6eeca8c6f52a09b8e384b7b62c72121c77d72c52" + "reference": "91021b0f90e8a778fc7b96e71d1d4b25c1eebdfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-performance/zipball/6eeca8c6f52a09b8e384b7b62c72121c77d72c52", - "reference": "6eeca8c6f52a09b8e384b7b62c72121c77d72c52", + "url": "https://api.github.com/repos/newfold-labs/wp-module-performance/zipball/91021b0f90e8a778fc7b96e71d1d4b25c1eebdfb", + "reference": "91021b0f90e8a778fc7b96e71d1d4b25c1eebdfb", "shasum": "" }, "require": { @@ -1376,10 +1376,10 @@ ], "description": "A module for managing caching functionality.", "support": { - "source": "https://github.com/newfold-labs/wp-module-performance/tree/add/feature-module", + "source": "https://github.com/newfold-labs/wp-module-performance/tree/2.0.0", "issues": "https://github.com/newfold-labs/wp-module-performance/issues" }, - "time": "2024-05-21T21:20:02+00:00" + "time": "2024-05-29T15:57:11+00:00" }, { "name": "newfold-labs/wp-module-runtime", @@ -4190,21 +4190,19 @@ "aliases": [ { "package": "newfold-labs/wp-module-patterns", - "version": "dev-add/feature-module", - "alias": "1.9.0", - "alias_normalized": "1.9.0.0" + "version": "2.0.0.0", + "alias": "1.9.9", + "alias_normalized": "1.9.9.0" }, { "package": "newfold-labs/wp-module-performance", - "version": "dev-add/feature-module", - "alias": "1.9.0", - "alias_normalized": "1.9.0.0" + "version": "2.0.0.0", + "alias": "1.9.9", + "alias_normalized": "1.9.9.0" } ], "minimum-stability": "stable", "stability-flags": { - "newfold-labs/wp-module-patterns": 20, - "newfold-labs/wp-module-performance": 20, "roave/security-advisories": 20 }, "prefer-stable": false, From f9021a903d5838f8fa0a99dc14429ef3d4d2a967 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Wed, 29 May 2024 13:34:47 -0400 Subject: [PATCH 25/25] remove unused icon for route --- src/app/data/routes.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/data/routes.js b/src/app/data/routes.js index 15c190544..aa04a7f89 100644 --- a/src/app/data/routes.js +++ b/src/app/data/routes.js @@ -164,7 +164,6 @@ export const routes = [ name: '/admin', title: __( 'Admin', 'wp-plugin-bluehost' ), Component: Admin, - Icon: WrenchScrewdriverIcon, condition: true, }, ];