diff --git a/admin/class-admin-asset-manager.php b/admin/class-admin-asset-manager.php index d9c16f15333..5904b2d592d 100644 --- a/admin/class-admin-asset-manager.php +++ b/admin/class-admin-asset-manager.php @@ -482,6 +482,7 @@ protected function load_renamed_scripts() { 'feature-flag' => 'feature-flag-package', 'helpers' => 'helpers-package', 'jed' => 'jed-package', + 'chart.js' => 'chart.js-package', 'legacy-components' => 'components-package', 'network-admin-script' => 'network-admin', 'redux' => 'redux-package', diff --git a/admin/views/redirects.php b/admin/views/redirects.php index f37a264bfa9..bae929682f4 100644 --- a/admin/views/redirects.php +++ b/admin/views/redirects.php @@ -17,7 +17,7 @@

- + '20.5', Icons::class => '20.5', Old_Premium_Integration::class => '20.10', + Wincher::class => '21.6', + Wordproof_Integration_Toggle::class => '21.6', ]; foreach ( $deprecated_classes as $original_class => $version ) { diff --git a/config/jenkins/Jenkinsfile_artifact b/config/jenkins/Jenkinsfile_artifact deleted file mode 100644 index e4d13330bc7..00000000000 --- a/config/jenkins/Jenkinsfile_artifact +++ /dev/null @@ -1,25 +0,0 @@ -node( 'docker-agent' ) { - checkout scm - env.GIT_COMMIT = sh(returnStdout: true, script: "git log -n 1 --pretty=format:'%h'") - docker.withServer( 'tcp://172.17.0.1:2375' ) { - def ubuntu = docker.image( 'yoastseo/docker-php-composer-node' ) - ubuntu.pull() - ubuntu.inside() { - stage( 'Set Version'){ - // sed using '#' as separators. overwriting php files with the new plugin name. - sh "SEARCH_STRING=\"[Pp]lugin [Nn]ame.*\" && REPLACE_STRING=\'* Plugin Name: Yoast SEO (beta) | ${env.BRANCH_NAME} | ${env.GIT_COMMIT}\' && sed -i \"s#\$SEARCH_STRING#\$REPLACE_STRING#\" wp-seo.php" - } - stage( 'Build' ){ - sh 'composer install' - sh 'yarn' - sh 'grunt build' - sh 'grunt artifact' - } - stage( 'Expose Artifact' ) { - def BRANCH_NAME = sh(returnStdout: true, script: "echo ${env.BRANCH_NAME} | sed -e s#/#-# | tr --delete '\n'") - sh "mv artifact.zip wordpress-seo-${BRANCH_NAME}.zip" - archiveArtifacts artifacts: "wordpress-seo-${BRANCH_NAME}.zip", fingerprint: true - } - } - } -} \ No newline at end of file diff --git a/config/webpack/externals.js b/config/webpack/externals.js index 03f564ae81e..2a26a0926d2 100644 --- a/config/webpack/externals.js +++ b/config/webpack/externals.js @@ -1,11 +1,13 @@ -const { camelCaseDash } = require( "@wordpress/dependency-extraction-webpack-plugin/lib/util" ); +const { + camelCaseDash, +} = require("@wordpress/dependency-extraction-webpack-plugin/lib/util"); /** * Yoast dependencies, declared as such in the package.json. */ -const { dependencies } = require( "../../packages/js/package" ); -const legacyYoastPackages = [ "yoast-components", "yoastseo" ]; -const additionalPackages = [ +const { dependencies } = require("../../packages/js/package"); +const legacyYoastPackages = ["yoast-components", "yoastseo"]; +const additionalPackages = [ "draft-js", "styled-components", "jed", @@ -13,26 +15,26 @@ const additionalPackages = [ "redux", "@reduxjs/toolkit", "react-helmet", + "chart.js", ]; const YOAST_PACKAGE_NAMESPACE = "@yoast/"; // Fetch all packages from the dependencies list. -const yoastPackages = Object.keys( dependencies ) - .filter( - ( packageName ) => - packageName.startsWith( YOAST_PACKAGE_NAMESPACE ) || - legacyYoastPackages.includes( packageName ) || - additionalPackages.includes( packageName ) - ); +const yoastPackages = Object.keys(dependencies).filter( + (packageName) => + packageName.startsWith(YOAST_PACKAGE_NAMESPACE) || + legacyYoastPackages.includes(packageName) || + additionalPackages.includes(packageName) +); /** * Convert Yoast packages to externals configuration. */ -const yoastExternals = yoastPackages.reduce( ( memo, packageName ) => { - let useablePackageName = packageName.replace( YOAST_PACKAGE_NAMESPACE, "" ); +const yoastExternals = yoastPackages.reduce((memo, packageName) => { + let useablePackageName = packageName.replace(YOAST_PACKAGE_NAMESPACE, ""); - switch ( useablePackageName ) { + switch (useablePackageName) { case "components": useablePackageName = "components-new"; break; @@ -47,9 +49,9 @@ const yoastExternals = yoastPackages.reduce( ( memo, packageName ) => { break; } - memo[ packageName ] = camelCaseDash( useablePackageName ); + memo[packageName] = camelCaseDash(useablePackageName); return memo; -}, {} ); +}, {}); module.exports = { YOAST_PACKAGE_NAMESPACE, diff --git a/config/webpack/webpack.config.base.js b/config/webpack/webpack.config.base.js index b31bf148d59..0b661d108dc 100644 --- a/config/webpack/webpack.config.base.js +++ b/config/webpack/webpack.config.base.js @@ -10,7 +10,7 @@ const { yoastExternals } = require( "./externals" ); let analyzerPort = 8888; module.exports = function( { entry, output, combinedOutputFile, cssExtractFileName } ) { - const exclude = /node_modules[/\\](?!(yoast-components|gutenberg|yoastseo|@wordpress|@yoast|parse5)[/\\]).*/; + const exclude = /node_modules[/\\](?!(yoast-components|gutenberg|yoastseo|@wordpress|@yoast|parse5|chart.js)[/\\]).*/; // The index of the babel-loader rule. let ruleIndex = 0; if ( process.env.NODE_ENV !== "production" ) { diff --git a/css/src/introductions.css b/css/src/introductions.css index a047f9f9d91..aa72b205234 100644 --- a/css/src/introductions.css +++ b/css/src/introductions.css @@ -6,4 +6,11 @@ focus:yst-outline-none focus:yst-ring-offset-0; } + .yst-introduction-modal-panel { + background-image: linear-gradient(180deg, rgba(166, 30, 105, 0.25) 10%, rgba(255, 255, 255, 0.25) 50%); + } + .yst-introduction-modal-uppercase{ + letter-spacing: 0.8px; + @apply yst-uppercase yst-text-slate-500; + } } diff --git a/css/src/modal.css b/css/src/modal.css index 714ac12d7ec..e3484058d3e 100644 --- a/css/src/modal.css +++ b/css/src/modal.css @@ -64,6 +64,7 @@ @media (min-width: 600px) { border-radius: 8px; + max-height: calc( 100% - 48px ); } } @@ -80,6 +81,10 @@ margin: 0; } +.yoast-gutenberg-modal .components-modal__content .components-modal__header { + border-bottom: 1px solid #e2e8f0 !important; +} + .yoast-gutenberg-modal .components-modal__icon-container { display: inline-flex; } diff --git a/package.json b/package.json index e9ac12c7200..4ec7ed46108 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "typescript": "^4.2.4" }, "yoast": { - "pluginVersion": "21.5-RC1" + "pluginVersion": "21.5-RC4" }, "version": "0.0.0" } diff --git a/packages/babel-preset/index.js b/packages/babel-preset/index.js index b9b6601be29..51798047fda 100644 --- a/packages/babel-preset/index.js +++ b/packages/babel-preset/index.js @@ -3,7 +3,11 @@ module.exports = ( api ) => { return { presets: [ "@wordpress/babel-preset-default" ], - plugins: [ "@babel/plugin-proposal-optional-chaining", "@babel/plugin-transform-runtime" ], + plugins: [ + "@babel/plugin-proposal-optional-chaining", + "@babel/plugin-transform-runtime", + "@babel/plugin-transform-class-properties", + ], sourceType: "unambiguous", }; }; diff --git a/packages/babel-preset/package.json b/packages/babel-preset/package.json index cf427199114..df81cbc8084 100644 --- a/packages/babel-preset/package.json +++ b/packages/babel-preset/package.json @@ -13,6 +13,7 @@ "private": false, "dependencies": { "@babel/plugin-proposal-optional-chaining": "^7.17.12", + "@babel/plugin-transform-class-properties": "^7.22.5", "@babel/plugin-transform-runtime": "^7.17.12", "@wordpress/babel-preset-default": "^6.13.0" }, diff --git a/packages/js/package.json b/packages/js/package.json index ea70d872a91..f130756f2d6 100644 --- a/packages/js/package.json +++ b/packages/js/package.json @@ -11,8 +11,9 @@ "@draft-js-plugins/mention": "^5.0.0", "@headlessui/react": "^1.7.8", "@heroicons/react": "^1.0.6", - "@wordpress/api-fetch": "^6.13.0", + "@reduxjs/toolkit": "^1.8.3", "@wordpress/a11y": "^2.15.1", + "@wordpress/api-fetch": "^6.13.0", "@wordpress/block-editor": "^5.3.1", "@wordpress/blocks": "^11.1.2", "@wordpress/components": "^13.0.3", @@ -40,9 +41,13 @@ "@yoast/ui-library": "^3.2.1", "a11y-speak": "git+https://github.com/Yoast/a11y-speak.git#master", "babel-polyfill": "^6.26.0", + "bowser": "^2.11.0", + "chart.js": "^4.2.1", + "chartjs-adapter-moment": "^1.0.1", "classnames": "^2.3.2", "draft-js": "^0.11.7", "find-with-regex": "~1.0.2", + "formik": "^2.2.9", "interpolate-components": "^1.1.0", "jed": "^1.1.1", "lodash": "^4.17.21", @@ -51,22 +56,20 @@ "moment-duration-format": "^2.2.2", "prop-types": "^15.5.10", "react-animate-height": "^2.0.23", + "react-aria-live": "^2.0.5", + "react-chartjs-2": "^5.2.0", "react-helmet": "^6.1.0", + "react-hotkeys-hook": "^4.0.5", "react-intl": "^2.4.0", "react-redux": "^5.0.6", + "react-router-dom": "^6.3.0", "react-select": "^3.1.0", "redux": "^3.7.2", "redux-thunk": "^2.2.0", "styled-components": "^5.3.6", "yoast-components": "^5.24.0", "yoastseo": "^1.91.1", - "formik": "^2.2.9", - "@reduxjs/toolkit": "^1.8.3", - "react-router-dom": "^6.3.0", - "yup": "^0.32.11", - "bowser": "^2.11.0", - "react-hotkeys-hook": "^4.0.5", - "react-aria-live": "^2.0.5" + "yup": "^0.32.11" }, "devDependencies": { "@babel/core": "^7.17.9", diff --git a/packages/js/src/ai-generator/initialize.js b/packages/js/src/ai-generator/initialize.js index 974645e9661..e048379933e 100644 --- a/packages/js/src/ai-generator/initialize.js +++ b/packages/js/src/ai-generator/initialize.js @@ -32,7 +32,7 @@ const AiGeneratorUpsell = ( { fieldId } ) => { { __( "Use AI", "wordpress-seo" ) } - + diff --git a/packages/js/src/components/UpsellBox.js b/packages/js/src/components/UpsellBox.js index 0d5b22d44a3..6fc8bd6e47a 100644 --- a/packages/js/src/components/UpsellBox.js +++ b/packages/js/src/components/UpsellBox.js @@ -117,7 +117,6 @@ class UpsellBox extends Component { const price = newPrice ? newPrice : defaultPrice; return ( -
{ isBlackFriday &&
{ __( "BLACK FRIDAY", "wordpress-seo" ) }
@@ -134,9 +133,11 @@ class UpsellBox extends Component { { this.props.upsellButtonHasCaret &&