From 12ce54f029f8c59805a02b5d123808aeb83d2fc2 Mon Sep 17 00:00:00 2001 From: Evan Mattson Date: Fri, 25 Oct 2019 14:43:50 +0300 Subject: [PATCH 1/7] remove Context::is_beta and usage --- includes/Context.php | 9 --------- includes/Core/Admin/Dashboard.php | 5 ++--- tests/phpunit/integration/ContextTest.php | 6 ------ 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/includes/Context.php b/includes/Context.php index 5066da0e73d..b20788f1a2e 100644 --- a/includes/Context.php +++ b/includes/Context.php @@ -220,15 +220,6 @@ public function get_reference_canonical() { return false; } - /** - * Gets the current version is beta released. - * - * @return bool True if the version is in beta mode, false otherwise. - */ - public function is_beta() { - return false !== strpos( GOOGLESITEKIT_VERSION, 'beta' ); - } - /** * Checks whether AMP content is being served. * diff --git a/includes/Core/Admin/Dashboard.php b/includes/Core/Admin/Dashboard.php index 592323c8aab..233335752d5 100644 --- a/includes/Core/Admin/Dashboard.php +++ b/includes/Core/Admin/Dashboard.php @@ -96,7 +96,6 @@ private function add_widgets() { if ( ! current_user_can( Permissions::VIEW_DASHBOARD ) ) { return; } - $is_beta = $this->context->is_beta(); $logo = $this->assets->svg_sprite( 'logo-g', @@ -107,10 +106,10 @@ private function add_widgets() { ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped. $logo_text = $this->assets->svg_sprite( - 'logo-sitekit' . ( $is_beta ? '-beta' : '' ), + 'logo-sitekit', [ 'height' => '17', - 'width' => ( $is_beta ? '102' : '78' ), + 'width' => '78', ] ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped. diff --git a/tests/phpunit/integration/ContextTest.php b/tests/phpunit/integration/ContextTest.php index 4a87dcf706b..22eb040af80 100644 --- a/tests/phpunit/integration/ContextTest.php +++ b/tests/phpunit/integration/ContextTest.php @@ -154,12 +154,6 @@ public function test_get_reference_permalink() { $this->assertEquals( 'https://test.com/hello-world/', $context->get_reference_permalink( $post_id ) ); } - public function test_is_beta() { - $context = new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE ); - - $this->assertEquals( false !== strpos( GOOGLESITEKIT_VERSION, 'beta' ), $context->is_beta() ); - } - /** * @group ms-excluded */ From 458a2b6e196ffcb92dac27fbae2fe36697e91cbf Mon Sep 17 00:00:00 2001 From: Evan Mattson Date: Fri, 25 Oct 2019 14:54:07 +0300 Subject: [PATCH 2/7] remove beta logo svgs and styles --- .../global/_googlesitekit-logo.scss | 23 ------------------- assets/svg/logo-g-beta.svg | 15 ------------ assets/svg/logo-sitekit-beta.svg | 18 --------------- 3 files changed, 56 deletions(-) delete mode 100644 assets/svg/logo-g-beta.svg delete mode 100644 assets/svg/logo-sitekit-beta.svg diff --git a/assets/sass/components/global/_googlesitekit-logo.scss b/assets/sass/components/global/_googlesitekit-logo.scss index ca45cd72f4b..39e39cb0cde 100644 --- a/assets/sass/components/global/_googlesitekit-logo.scss +++ b/assets/sass/components/global/_googlesitekit-logo.scss @@ -47,22 +47,6 @@ } } - .googlesitekit-logo__logo-sitekit--beta, - .googlesitekit-svg-logo-sitekit-beta { - fill: currentColor; - height: 18px; - margin-left: $grid-gap-phone / 2; - margin-top: 2px; - vertical-align: middle; - width: 132px; - - @media (min-width: $bp-tablet) { - height: 28px; - margin-left: $grid-gap-phone; - width: 206px; - } - } - &--mini { .googlesitekit-logo__logo-g, @@ -77,12 +61,5 @@ margin-left: $grid-gap-phone / 4; width: 78px; } - - .googlesitekit-logo__logo-sitekit--beta, - .googlesitekit-svg-logo-sitekit-beta { - height: 17px; - margin-left: $grid-gap-phone / 2; - width: 102px; - } } } diff --git a/assets/svg/logo-g-beta.svg b/assets/svg/logo-g-beta.svg deleted file mode 100644 index c20d598db79..00000000000 --- a/assets/svg/logo-g-beta.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - logo-g-beta - Created with Sketch. - - - - - - - - - - \ No newline at end of file diff --git a/assets/svg/logo-sitekit-beta.svg b/assets/svg/logo-sitekit-beta.svg deleted file mode 100644 index 0076dcad0be..00000000000 --- a/assets/svg/logo-sitekit-beta.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - logo-sitekit-beta - Created with Sketch. - - - - - - - - - - - - - \ No newline at end of file From 74ad2a4f6d8bc6758a27aaab6224a514eaf956c2 Mon Sep 17 00:00:00 2001 From: Evan Mattson Date: Fri, 25 Oct 2019 14:54:32 +0300 Subject: [PATCH 3/7] update svg used in Activation notice --- includes/Core/Util/Activation.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/Core/Util/Activation.php b/includes/Core/Util/Activation.php index c068e0c20b7..95382560506 100644 --- a/includes/Core/Util/Activation.php +++ b/includes/Core/Util/Activation.php @@ -178,10 +178,10 @@ private function get_activation_notice() { ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped echo $this->assets->svg_sprite( - 'logo-sitekit-beta', + 'logo-sitekit', array( - 'height' => '28', - 'width' => '206', + 'height' => '26', + 'width' => '99', ) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?> From 62fa77c803e919306f5f064dad958c9b8b8620d0 Mon Sep 17 00:00:00 2001 From: Evan Mattson Date: Fri, 25 Oct 2019 14:55:02 +0300 Subject: [PATCH 4/7] remove beta from Logo component --- assets/js/components/logo.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/assets/js/components/logo.js b/assets/js/components/logo.js index 1e4b1858732..4f0c8ebac14 100644 --- a/assets/js/components/logo.js +++ b/assets/js/components/logo.js @@ -22,9 +22,7 @@ import SvgIcon from 'GoogleUtil/svg-icon'; const { __ } = wp.i18n; -const Logo = ( props ) => { - const { beta = true } = props; - +const Logo = () => { return (