From 33c232a9410c8a8937c1557ebc90ea6e715ef9be Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Wed, 30 Mar 2022 19:45:38 +0200 Subject: [PATCH] Google Fonts: mark feature as Beta and remove from dashboard. Follow-up from #23295 The feature is still under development, and we'll need to make some more changes before it's ready for prime-time. Let's make that clear in the plugin by marking the module as beta and removing the toggle from the dashboard to avoid setting wrong expectations. Internal reference: p1HpG7-flD-p2#comment-53417 --- .../settings-card/test/component.js | 1 - .../settings-group/test/component.js | 1 - .../jetpack/_inc/client/writing/index.jsx | 1 - .../client/writing/theme-enhancements.jsx | 28 ++----------------- .../changelog/update-google-fonts-beta | 4 +++ .../plugins/jetpack/modules/google-fonts.php | 4 +-- .../plugins/jetpack/modules/module-info.php | 2 +- 7 files changed, 9 insertions(+), 32 deletions(-) create mode 100644 projects/plugins/jetpack/changelog/update-google-fonts-beta diff --git a/projects/plugins/jetpack/_inc/client/components/settings-card/test/component.js b/projects/plugins/jetpack/_inc/client/components/settings-card/test/component.js index 638f80a79f62..a1e628644188 100644 --- a/projects/plugins/jetpack/_inc/client/components/settings-card/test/component.js +++ b/projects/plugins/jetpack/_inc/client/components/settings-card/test/component.js @@ -68,7 +68,6 @@ describe( 'SettingsCard', () => { 'comments', 'json-api', 'photon', - 'google-fonts', ], allCardsForNonAdmin = [ 'post-by-email' ]; diff --git a/projects/plugins/jetpack/_inc/client/components/settings-group/test/component.js b/projects/plugins/jetpack/_inc/client/components/settings-group/test/component.js index 6c885a6f60c6..e2ae9fc22206 100644 --- a/projects/plugins/jetpack/_inc/client/components/settings-group/test/component.js +++ b/projects/plugins/jetpack/_inc/client/components/settings-group/test/component.js @@ -48,7 +48,6 @@ describe( 'SettingsGroup', () => { 'comments', 'json-api', 'photon', - 'google-fonts', ], allGroupsForNonAdmin = [ 'post-by-email' ]; diff --git a/projects/plugins/jetpack/_inc/client/writing/index.jsx b/projects/plugins/jetpack/_inc/client/writing/index.jsx index af90e89a1ea6..8935d9f5a3bc 100644 --- a/projects/plugins/jetpack/_inc/client/writing/index.jsx +++ b/projects/plugins/jetpack/_inc/client/writing/index.jsx @@ -45,7 +45,6 @@ export class Writing extends React.Component { 'carousel', 'copy-post', 'custom-css', - 'google-fonts', 'latex', 'masterbar', 'markdown', diff --git a/projects/plugins/jetpack/_inc/client/writing/theme-enhancements.jsx b/projects/plugins/jetpack/_inc/client/writing/theme-enhancements.jsx index 958463327732..370b1f798024 100644 --- a/projects/plugins/jetpack/_inc/client/writing/theme-enhancements.jsx +++ b/projects/plugins/jetpack/_inc/client/writing/theme-enhancements.jsx @@ -107,16 +107,14 @@ class ThemeEnhancements extends React.Component { render() { const foundInfiniteScroll = this.props.isModuleFound( 'infinite-scroll' ), - foundCustomCSS = this.props.isModuleFound( 'custom-css' ), - foundGoogleFonts = this.props.isModuleFound( 'google-fonts' ); + foundCustomCSS = this.props.isModuleFound( 'custom-css' ); - if ( ! foundInfiniteScroll && ! foundCustomCSS && ! foundGoogleFonts ) { + if ( ! foundInfiniteScroll && ! foundCustomCSS ) { return null; } const infScr = this.props.getModule( 'infinite-scroll' ); const customCSS = this.props.getModule( 'custom-css' ); - const googleFonts = this.props.getModule( 'google-fonts' ); const infiniteScrollDisabledByOverride = 'inactive' === this.props.getModuleOverride( 'infinite-scroll' ); @@ -216,27 +214,6 @@ class ThemeEnhancements extends React.Component { ) } - { foundGoogleFonts && this.props.isWebfontsSupported && ( - - - - { __( 'Use Google Fonts in your block enabled theme', 'jetpack' ) } - - - - ) } ); } @@ -247,6 +224,5 @@ export default connect( state => { module: module_name => getModule( state, module_name ), isInfiniteScrollSupported: currentThemeSupports( state, 'infinite-scroll' ), isModuleFound: module_name => isModuleFound( state, module_name ), - isWebfontsSupported: currentThemeSupports( state, 'webfonts' ), }; } )( withModuleSettingsFormHelpers( ThemeEnhancements ) ); diff --git a/projects/plugins/jetpack/changelog/update-google-fonts-beta b/projects/plugins/jetpack/changelog/update-google-fonts-beta new file mode 100644 index 000000000000..34e80cd96fe3 --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-google-fonts-beta @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Google Fonts: mark the feature as Beta, and remove toggle from dashboard. diff --git a/projects/plugins/jetpack/modules/google-fonts.php b/projects/plugins/jetpack/modules/google-fonts.php index e1ca012c342f..7d3fa33e7556 100644 --- a/projects/plugins/jetpack/modules/google-fonts.php +++ b/projects/plugins/jetpack/modules/google-fonts.php @@ -1,7 +1,7 @@