diff --git a/_inc/client/at-a-glance/search.jsx b/_inc/client/at-a-glance/search.jsx index 0ef5c13d89de7..18f673d1da119 100644 --- a/_inc/client/at-a-glance/search.jsx +++ b/_inc/client/at-a-glance/search.jsx @@ -19,7 +19,7 @@ import Card from 'components/card'; import JetpackBanner from 'components/jetpack-banner'; import { isDevMode } from 'state/connection'; import { getSitePlan, hasActiveSearchPurchase, isFetchingSitePurchases } from 'state/site'; -import { getUpgradeUrl, isAtomicSite } from 'state/initial-state'; +import { getUpgradeUrl } from 'state/initial-state'; /** * Displays a card for Search based on the props given. @@ -74,11 +74,6 @@ class DashSearch extends Component { }; render() { - // NOTE: Jetpack Search currently does not support atomic sites. - if ( this.props.isAtomicSite ) { - return null; - } - if ( this.props.isFetching ) { return renderCard( { status: '', @@ -171,7 +166,6 @@ class DashSearch extends Component { export default connect( state => { return { - isAtomicSite: isAtomicSite( state ), isBusinessPlan: 'is-business-plan' === getPlanClass( getSitePlan( state ).product_slug ), isDevMode: isDevMode( state ), isFetching: isFetchingSitePurchases( state ), diff --git a/_inc/client/components/plans/plan-icon/index.jsx b/_inc/client/components/plans/plan-icon/index.jsx index cf0eaf5a4180c..19e204f5a40ef 100644 --- a/_inc/client/components/plans/plan-icon/index.jsx +++ b/_inc/client/components/plans/plan-icon/index.jsx @@ -26,6 +26,8 @@ import { PLAN_VIP, PLAN_JETPACK_SEARCH, PLAN_JETPACK_SEARCH_MONTHLY, + PLAN_WPCOM_SEARCH, + PLAN_WPCOM_SEARCH_MONTHLY, getPlanClass, } from 'lib/plans/constants'; @@ -225,6 +227,8 @@ export default class PlanIcon extends Component { return this.getBusinessIcon(); case PLAN_JETPACK_SEARCH: case PLAN_JETPACK_SEARCH_MONTHLY: + case PLAN_WPCOM_SEARCH: + case PLAN_WPCOM_SEARCH_MONTHLY: return this.getSearchIcon(); default: return this.getDefaultIcon(); diff --git a/_inc/client/components/settings-card/index.jsx b/_inc/client/components/settings-card/index.jsx index 6faf21a77aa72..d83d0c688b9df 100644 --- a/_inc/client/components/settings-card/index.jsx +++ b/_inc/client/components/settings-card/index.jsx @@ -30,7 +30,6 @@ import { import { getSiteAdminUrl, getUpgradeUrl, - isAtomicSite, isMultisite, userCanManageModules, } from 'state/initial-state'; @@ -189,8 +188,7 @@ export const SettingsCard = props => { ); case FEATURE_SEARCH_JETPACK: - // NOTE: Jetpack Search currently does not support atomic sites. - if ( props.hasActiveSearchPurchase || props.isAtomicSite ) { + if ( props.hasActiveSearchPurchase ) { return ''; } @@ -390,6 +388,5 @@ export default connect( state => { spamUpgradeUrl: getUpgradeUrl( state, 'settings-spam' ), multisite: isMultisite( state ), hasActiveSearchPurchase: hasActiveSearchPurchase( state ), - isAtomicSite: isAtomicSite( state ), }; } )( SettingsCard ); diff --git a/_inc/client/lib/plans/constants.js b/_inc/client/lib/plans/constants.js index d733cf618fd11..056b898c7055a 100644 --- a/_inc/client/lib/plans/constants.js +++ b/_inc/client/lib/plans/constants.js @@ -30,6 +30,8 @@ export const PLAN_JETPACK_BACKUP_REALTIME = 'jetpack_backup_realtime'; export const PLAN_JETPACK_BACKUP_REALTIME_MONTHLY = 'jetpack_backup_realtime_monthly'; export const PLAN_JETPACK_SEARCH = 'jetpack_search'; export const PLAN_JETPACK_SEARCH_MONTHLY = 'jetpack_search_monthly'; +export const PLAN_WPCOM_SEARCH = 'wpcom_search'; +export const PLAN_WPCOM_SEARCH_MONTHLY = 'wpcom_search_monthly'; export const PLAN_JETPACK_SCAN = 'jetpack_scan'; export const PLAN_JETPACK_SCAN_MONTHLY = 'jetpack_scan_monthly'; export const PLAN_HOST_BUNDLE = 'host-bundle'; @@ -52,7 +54,12 @@ export const JETPACK_BACKUP_PRODUCTS = [ PLAN_JETPACK_BACKUP_REALTIME_MONTHLY, ]; -export const JETPACK_SEARCH_PRODUCTS = [ PLAN_JETPACK_SEARCH, PLAN_JETPACK_SEARCH_MONTHLY ]; +export const JETPACK_SEARCH_PRODUCTS = [ + PLAN_JETPACK_SEARCH, + PLAN_JETPACK_SEARCH_MONTHLY, + PLAN_WPCOM_SEARCH, + PLAN_WPCOM_SEARCH_MONTHLY, +]; export const JETPACK_SCAN_PRODUCTS = [ PLAN_JETPACK_SCAN, PLAN_JETPACK_SCAN_MONTHLY ]; @@ -193,6 +200,8 @@ export function getPlanClass( plan ) { return 'is-realtime-backup-plan'; case PLAN_JETPACK_SEARCH: case PLAN_JETPACK_SEARCH_MONTHLY: + case PLAN_WPCOM_SEARCH: + case PLAN_WPCOM_SEARCH_MONTHLY: return 'is-search-plan'; case PLAN_JETPACK_SCAN: case PLAN_JETPACK_SCAN_MONTHLY: diff --git a/_inc/client/performance/search.jsx b/_inc/client/performance/search.jsx index aa8aa101d8624..70d75155987c4 100644 --- a/_inc/client/performance/search.jsx +++ b/_inc/client/performance/search.jsx @@ -18,7 +18,6 @@ import { FormFieldset } from 'components/forms'; import CompactFormToggle from 'components/form/form-toggle/compact'; import { FEATURE_SEARCH_JETPACK, getPlanClass } from 'lib/plans/constants'; import { SEARCH_DESCRIPTION, SEARCH_CUSTOMIZE_CTA, SEARCH_SUPPORT } from 'plans/constants'; -import { isAtomicSite } from 'state/initial-state'; import { hasUpdatedSetting, isSettingActivated, isUpdatingSetting } from 'state/settings'; import { getSitePlan, @@ -92,27 +91,24 @@ function Search( props ) { { __( 'Enable Search' ) } - { ! props.isAtomicSite && ( - // NOTE: Jetpack Search currently does not support atomic sites. - - - - { __( 'Enable instant search experience (recommended)' ) } - - -

- { __( - 'Instant search will allow your visitors to get search results as soon as they start typing. ' + - 'If deactivated, Jetpack Search will still optimize your search results but visitors will have to submit a search query before seeing any results.' - ) } -

-
- ) } + + + + { __( 'Enable instant search experience (recommended)' ) } + + +

+ { __( + 'Instant search will allow your visitors to get search results as soon as they start typing. ' + + 'If deactivated, Jetpack Search will still optimize your search results but visitors will have to submit a search query before seeing any results.' + ) } +

+
) } @@ -144,7 +140,6 @@ function Search( props ) { export default connect( state => { const planClass = getPlanClass( getSitePlan( state ).product_slug ); return { - isAtomicSite: isAtomicSite( state ), isLoading: isFetchingSitePurchases( state ), hasActiveSearchPurchase: selectHasActiveSearchPurchase( state ), isBusinessPlan: 'is-business-plan' === planClass,