diff --git a/projects/plugins/boost/app/assets/src/css/admin-style.scss b/projects/plugins/boost/app/assets/src/css/admin-style.scss index ac77d6b0a4578..fb0f03c51e008 100644 --- a/projects/plugins/boost/app/assets/src/css/admin-style.scss +++ b/projects/plugins/boost/app/assets/src/css/admin-style.scss @@ -8,7 +8,6 @@ // Components @import 'components/connection'; @import 'components/feature-toggle'; -@import 'components/benchmarks'; @import 'components/error-message'; @import 'components/critical-css'; @import 'components/close-button'; diff --git a/projects/plugins/boost/app/assets/src/js/layout/SettingsPage/SettingsPage.svelte b/projects/plugins/boost/app/assets/src/js/layout/SettingsPage/SettingsPage.svelte index adceaf8b8bf83..abb7431df80e2 100644 --- a/projects/plugins/boost/app/assets/src/js/layout/SettingsPage/SettingsPage.svelte +++ b/projects/plugins/boost/app/assets/src/js/layout/SettingsPage/SettingsPage.svelte @@ -1,7 +1,7 @@ - -
-
-
-

- {__( 'Did you know?', 'jetpack-boost' )} -

-
-
-
4x
-
- Pingdom).`, - 'jetpack-boost' - )} - vars={externalLinkTemplateVar( pingdomLink )} - /> -
-
-
-
20%
-
- Google).`, - 'jetpack-boost' - )} - vars={externalLinkTemplateVar( whySpeedLink )} - /> -
-
-
-
-
-
diff --git a/projects/plugins/boost/app/assets/src/css/components/benchmarks.scss b/projects/plugins/boost/app/assets/src/js/layout/SettingsPage/tips/tips.module.scss similarity index 78% rename from projects/plugins/boost/app/assets/src/css/components/benchmarks.scss rename to projects/plugins/boost/app/assets/src/js/layout/SettingsPage/tips/tips.module.scss index 14bb65050c494..be10eda352649 100644 --- a/projects/plugins/boost/app/assets/src/css/components/benchmarks.scss +++ b/projects/plugins/boost/app/assets/src/js/layout/SettingsPage/tips/tips.module.scss @@ -1,15 +1,19 @@ -.jb-dashboard .jb-tips { +@import '../../../../css/main/variables.scss'; +@import '../../../../css/main/mixins.scss'; + +.tips { margin: 0 auto; - &__title { + .tips-title { margin-bottom: $padding; } - &__items { + .tips-items { @include breakpoint(md) { display: grid; grid-template-columns: 1fr 1fr; - grid-gap: 2em; } + grid-gap: 2em; + } } .item { @@ -17,13 +21,12 @@ display: grid; grid-template-columns: 80px 1fr; grid-gap: 1em; - } margin-bottom: 2em; - &__rate { + .item-rate { font-size: 24px; font-weight: 400; line-height: 30px; @@ -36,7 +39,7 @@ } } - &__description { + .item-description { flex-basis: 70%; font-weight: 400; line-height: 24px; diff --git a/projects/plugins/boost/app/assets/src/js/layout/SettingsPage/tips/tips.tsx b/projects/plugins/boost/app/assets/src/js/layout/SettingsPage/tips/tips.tsx new file mode 100644 index 0000000000000..a11acbbc54495 --- /dev/null +++ b/projects/plugins/boost/app/assets/src/js/layout/SettingsPage/tips/tips.tsx @@ -0,0 +1,53 @@ +import { getRedirectUrl } from '@automattic/jetpack-components'; +import { createInterpolateElement } from '@wordpress/element'; +import { __ } from '@wordpress/i18n'; +import styles from './tips.module.scss'; + +const Tips = () => { + const pingdomLink = getRedirectUrl( 'jetpack-boost-pingdom' ); + const whySpeedLink = getRedirectUrl( 'jetpack-boost-why-speed' ); + + return ( +
+
+
+

{ __( 'Did you know?', 'jetpack-boost' ) }

+
+
+
4x
+
+ { createInterpolateElement( + __( + `Pages that take over 3 seconds to load have 4x the bounce rate of pages that load in 2 seconds or less. (source: Pingdom).`, + 'jetpack-boost' + ), + { + // eslint-disable-next-line jsx-a11y/anchor-has-content + link: , + } + ) } +
+
+
+
20%
+
+
+
+
+
+
+ ); +}; + +export default Tips; diff --git a/projects/plugins/boost/changelog/migrate-settings-page-tips b/projects/plugins/boost/changelog/migrate-settings-page-tips new file mode 100644 index 0000000000000..a85602a21b916 --- /dev/null +++ b/projects/plugins/boost/changelog/migrate-settings-page-tips @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Migrate Settings Page Tips to react. + +