From f77b0d7d53749ecd678ae73f1b569d20a9733d61 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Wed, 16 Aug 2023 16:42:04 -0400 Subject: [PATCH 01/24] hook into activated plugin and check if woo or jp --- inc/jetpack.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/inc/jetpack.php b/inc/jetpack.php index 6c076047a..5157f9fd5 100644 --- a/inc/jetpack.php +++ b/inc/jetpack.php @@ -55,4 +55,21 @@ function jetpack_construction() { return true; } } -add_filter( 'jetpack_is_under_construction_plugin', __NAMESPACE__ . '\\jetpack_construction' ); \ No newline at end of file +add_filter( 'jetpack_is_under_construction_plugin', __NAMESPACE__ . '\\jetpack_construction' ); + +/** + * Enable Sharing with Jetpack and WooCommerce + */ +function plugin_activated( $plugin, $network_activation ) { + switch( $plugin ) { + case 'woocommerce/woocommerce.php': + // Enable the usage tracking option by default https://woocommerce.com/usage-tracking/ + update_option( 'woocommerce_allow_tracking', 'yes' ); + break; + case 'jetpack/jetpack.php': + // set the privacy settings to allow sharing information with analytics by default https://automattic.com/cookies/ + break; + } +} + +add_action( 'activated_plugin', __NAMESPACE__ . '\\plugin_activated', 10, 2 ); \ No newline at end of file From 9372916dd3ae2c67504d516f469ae99b832e691c Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 18 Aug 2023 15:35:19 -0400 Subject: [PATCH 02/24] replace yaost ui library with newfold ui component library update tailwind config and pcss update classes from yst to nfd --- inc/alt-experience/index.html | 208 +++++++------- package-lock.json | 67 ++++- package.json | 2 +- src/app/components/app-nav/index.js | 46 ++-- src/app/components/app-nav/logo.js | 2 +- src/app/components/notifications/feed.js | 2 +- src/app/components/page/index.js | 2 +- src/app/components/section/index.js | 34 +-- src/app/components/site-info/index.js | 26 +- src/app/index.js | 6 +- src/app/pages/ecommerce/styles.scss | 10 +- src/app/pages/example/index.js | 4 +- src/app/pages/help/index.js | 8 +- src/app/pages/home/accountCard.js | 26 +- src/app/pages/home/helpCard.js | 6 +- src/app/pages/home/index.js | 2 +- src/app/pages/marketplace/MarketplaceError.js | 8 +- src/app/pages/marketplace/MarketplaceItem.js | 22 +- src/app/pages/marketplace/MarketplaceList.js | 2 +- .../pages/marketplace/MarketplaceLoading.js | 4 +- src/app/pages/marketplace/index.js | 2 +- src/app/pages/performance/performance.js | 14 +- src/app/pages/settings/automaticUpdates.js | 4 +- src/app/pages/settings/comingSoon.js | 4 +- src/app/pages/settings/commentSettings.js | 10 +- src/app/pages/settings/contentSettings.js | 8 +- src/app/pages/staging/index.js | 24 +- src/app/tailwind.pcss | 260 +++++++++--------- tailwind.config.js | 68 ++--- tests/cypress/integration/settings.cy.js | 26 +- 30 files changed, 477 insertions(+), 430 deletions(-) diff --git a/inc/alt-experience/index.html b/inc/alt-experience/index.html index 62b067361..0c7cdfc5f 100644 --- a/inc/alt-experience/index.html +++ b/inc/alt-experience/index.html @@ -1,13 +1,13 @@
-
+
+ class="wppbh-app-container min-[783px]:nfd-p-8 min-[783px]:nfd-flex nfd-gap-6 nfd-max-w-full xl:nfd-max-w-screen-xl 2xl:nfd-max-w-screen-2xl nfd-my-0">
+ class="wpadmin-brand-bluehost wppbh-wp-6.2.2 wppbh-page-help nfd-w-full nfd-p-4 min-[783px]:nfd-p-0">
-
- -
+
+ class="wppbh-app-section-container nfd-bg-white nfd-w-full nfd-rounded-lg nfd-shadow wppbh-app-help-container">
-
-

Help

+ class="wppbh-app-section-header nfd-p-8 nfd-border-b nfd-border-line nfd-flex nfd-flex-col xl:nfd-flex-row nfd-items-baseline nfd-gap-4"> +
+

Help

We are available 24/7 to help answer questions and solve your problems.

-
-
+
+
-
-
-

Phone

+ class="nfd-grid nfd-gap-6 nfd-grid-cols-1 sm:nfd-grid-cols-2 xl:nfd-grid-cols-3 2xl:nfd-grid-cols-4"> +
+
+

Phone

Contact one of our friendly Customer Care Specialists, as we are waiting to help at 888-401-4678. Open 24 hours - 7 days.

-
-
-
-

Chat

+
+
+

Chat

Chat with one of our friendly Customer Care Specialists, as we are waiting to help. Open 24 hours - 7 days.

-
-
-
-

Tweet

+
+
+

Tweet

Find our team at @bluehost for updates on our products and support from our team.

-
-
-
-

YouTube

+
+
+

YouTube

Find tutorials, answers, interviews and guides on our YouTube channel.

-
-
-
-

Knowledge Base

+
+
+

Knowledge Base

Articles, guides, how-tos, instructions, and answers to our client's most frequently asked questions.

-
-
-
-

Resources

+
+
+

Resources

Boost your online knowledge and get ahead of the competition.

-
-
-
-

Events and Webinars

+
+
+

Events and Webinars

Team Bluehost organizes multiple webinars and events throughout the year. We are also sponsors and speak at most WordCamps across the world. Join us at our next event!

-
-
-
-

Bluehost Website

+
+
+

Bluehost Website

Not finding what you need? Visit our website for more information about our products and services.

-
@@ -282,6 +282,6 @@

Bluehost Website

- +
\ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 78bdb76b4..a3bf2718a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,13 +12,13 @@ "@heroicons/react": "^2.0.18", "@newfold-labs/wp-module-ecommerce": "^1.1.1", "@newfold-labs/wp-module-runtime": "^1.0.2", + "@newfold/ui-component-library": "^0.1.1-3", "@reduxjs/toolkit": "^1.9.5", "@wordpress/compose": "^6.16.0", "@wordpress/dom-ready": "^3.39.0", "@wordpress/element": "^5.16.0", "@wordpress/i18n": "^4.35.0", "@wordpress/icons": "^9.30.0", - "@yoast/ui-library": "^3.1.0", "classnames": "^2.3.2", "jquery": "^3.7.0", "lodash": "^4.17.21", @@ -3042,6 +3042,47 @@ "node": ">=12" } }, + "node_modules/@newfold/ui-component-library": { + "version": "0.1.1-3", + "resolved": "https://registry.npmjs.org/@newfold/ui-component-library/-/ui-component-library-0.1.1-3.tgz", + "integrity": "sha512-nUcNiqeNjqzdsfXaPLCcmEQW87MF3OukiNqeaYdBh+D87U5WJ/Ib0gBOiemQ1mPSjFL8EC2QzUV78C7vOm5jnw==", + "dependencies": { + "@headlessui/react": "^1.7.8", + "@heroicons/react": "^1.0.6", + "classnames": "^2.3.2", + "lodash": "^4.17.21", + "postcss-import": "^15.1.0", + "prop-types": "^15.8.1", + "react-animate-height": "^3.1.0", + "react-error-boundary": "^3.1.4" + }, + "peerDependencies": { + "@wordpress/element": "^4.1.1" + } + }, + "node_modules/@newfold/ui-component-library/node_modules/@heroicons/react": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-1.0.6.tgz", + "integrity": "sha512-JJCXydOFWMDpCP4q13iEplA503MQO3xLoZiKum+955ZCtHINWnx26CUxVxxFQu/uLb4LW3ge15ZpzIkXKkJ8oQ==", + "peerDependencies": { + "react": ">= 16" + } + }, + "node_modules/@newfold/ui-component-library/node_modules/react-error-boundary": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-3.1.4.tgz", + "integrity": "sha512-uM9uPzZJTF6wRQORmSrvOIgt4lJ9MC1sNgEOj2XGsDTRE4kmpWxg7ENK9EWNKJRMAOY9z0MuF4yIfl6gp4sotA==", + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + }, + "peerDependencies": { + "react": ">=16.13.1" + } + }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", @@ -8274,13 +8315,13 @@ } }, "node_modules/cypress": { - "version": "12.17.3", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.3.tgz", - "integrity": "sha512-/R4+xdIDjUSLYkiQfwJd630S81KIgicmQOLXotFxVXkl+eTeVO+3bHXxdi5KBh/OgC33HWN33kHX+0tQR/ZWpg==", + "version": "12.17.4", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.17.4.tgz", + "integrity": "sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ==", "dev": true, "hasInstallScript": true, "dependencies": { - "@cypress/request": "^2.88.11", + "@cypress/request": "2.88.12", "@cypress/xvfb": "^1.2.4", "@types/node": "^16.18.39", "@types/sinonjs__fake-timers": "8.1.1", @@ -8315,6 +8356,7 @@ "minimist": "^1.2.8", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", + "process": "^0.11.10", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", "semver": "^7.5.3", @@ -15831,7 +15873,6 @@ "version": "15.1.0", "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", - "dev": true, "dependencies": { "postcss-value-parser": "^4.0.0", "read-cache": "^1.0.0", @@ -16377,8 +16418,7 @@ "node_modules/postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/prelude-ls": { "version": "1.2.1", @@ -16461,6 +16501,15 @@ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -17070,7 +17119,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "dev": true, "dependencies": { "pify": "^2.3.0" } @@ -17079,7 +17127,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, "engines": { "node": ">=0.10.0" } diff --git a/package.json b/package.json index 315389933..5c489b766 100644 --- a/package.json +++ b/package.json @@ -27,13 +27,13 @@ "@heroicons/react": "^2.0.18", "@newfold-labs/wp-module-ecommerce": "^1.1.1", "@newfold-labs/wp-module-runtime": "^1.0.2", + "@newfold/ui-component-library": "^0.1.1-3", "@reduxjs/toolkit": "^1.9.5", "@wordpress/compose": "^6.16.0", "@wordpress/dom-ready": "^3.39.0", "@wordpress/element": "^5.16.0", "@wordpress/i18n": "^4.35.0", "@wordpress/icons": "^9.30.0", - "@yoast/ui-library": "^3.1.0", "classnames": "^2.3.2", "jquery": "^3.7.0", "lodash": "^4.17.21", diff --git a/src/app/components/app-nav/index.js b/src/app/components/app-nav/index.js index fe4f0124f..636c4a176 100644 --- a/src/app/components/app-nav/index.js +++ b/src/app/components/app-nav/index.js @@ -1,4 +1,4 @@ -import { Modal, SidebarNavigation } from "@yoast/ui-library" +import { Modal, SidebarNavigation } from "@newfold/ui-component-library" import { NavLink, useLocation } from 'react-router-dom'; import { useViewportMatch } from '@wordpress/compose'; import Logo from "./logo"; @@ -9,7 +9,7 @@ import { handleHelpLinksClick } from "../../util/helpers"; export const SideNavHeader = () => { return ( -
+
); @@ -20,7 +20,7 @@ export const SideNavMenu = () => { const primaryMenu = () => { return ( -
    +
      {topRoutes.map((page) => ( { const secondaryMenu = () => { return ( -
        +
          {utilityRoutes.map((page) => ( { // close any open submenus const subMenus = document.querySelectorAll('.wppbh-app-navitem-submenu'); subMenus.forEach((subMenu) => { - subMenu.classList.add('yst-hidden'); + subMenu.classList.add('nfd-hidden'); }); // open active's submenu if it exists const activeMenu = document.querySelector('.wppbh-app-sidenav .active'); if (activeMenu && null !== activeMenu.nextSibling && activeMenu.nextSibling.classList.contains('wppbh-app-navitem-submenu')) { - activeMenu.nextSibling.classList.remove('yst-hidden'); + activeMenu.nextSibling.classList.remove('nfd-hidden'); } } @@ -78,7 +78,7 @@ export const SideNavMenu = () => { }, [location]); return ( -
          +
          {primaryMenu()} {secondaryMenu()}
          @@ -87,20 +87,20 @@ export const SideNavMenu = () => { export const SideNavMenuItem = ({ label, name, icon: Icon = null, path, action, subItems }) => { return ( -
        • +
        • {Icon && - + } {label} {subItems && subItems.length > 0 && -
            +
              {subItems.map((subItem) => ( { return ( -
            • +
            • {label} @@ -132,7 +132,7 @@ export const SideNavMenuSubItem = ({ label, name, path, action }) => { export const SideNav = () => { return ( -