-
+
{ copyText }
{ buttonComponent ? (
diff --git a/client/my-sites/stats/stats-email-top-row/top-card.jsx b/client/my-sites/stats/stats-email-top-row/top-card.jsx
index 72b4b75248821a..bb0c0a722a0587 100644
--- a/client/my-sites/stats/stats-email-top-row/top-card.jsx
+++ b/client/my-sites/stats/stats-email-top-row/top-card.jsx
@@ -1,5 +1,5 @@
-import { Card, ShortenedNumber, Spinner } from '@automattic/components';
-import { useTranslate } from 'i18n-calypso';
+import { Card, Spinner } from '@automattic/components';
+import { useTranslate, numberFormat } from 'i18n-calypso';
/* This is a very stripped down version of HighlightCard
* HighlightCard doesn't support non-numeric values
@@ -25,7 +25,12 @@ const TopCardValue = ( { value, isLoading } ) => {
return (
-
+ { numberFormat( value, {
+ numberFormatOptions: {
+ notation: 'compact',
+ maximumFractionDigits: 1,
+ },
+ } ) }
);
};
diff --git a/client/my-sites/stats/stats-plan-usage/index.tsx b/client/my-sites/stats/stats-plan-usage/index.tsx
index b444f226a0e594..ba9dafde57bb87 100644
--- a/client/my-sites/stats/stats-plan-usage/index.tsx
+++ b/client/my-sites/stats/stats-plan-usage/index.tsx
@@ -1,6 +1,5 @@
-import { formattedNumber } from '@automattic/components';
import clsx from 'clsx';
-import { useTranslate } from 'i18n-calypso';
+import { useTranslate, numberFormat } from 'i18n-calypso';
import React from 'react';
import usePlanUsageQuery from 'calypso/my-sites/stats/hooks/use-plan-usage-query';
@@ -86,8 +85,8 @@ const PlanUsage: React.FC< PlanUsageProps > = ( {
{ translate( '%(numberOfUsage)s / %(numberOfLimit)s views', {
args: {
- numberOfUsage: formattedNumber( usage ),
- numberOfLimit: formattedNumber( limit ),
+ numberOfUsage: numberFormat( usage ),
+ numberOfLimit: typeof limit === 'number' ? numberFormat( limit ) : '-',
},
} ) }
diff --git a/client/my-sites/subscribers/components/subscriber-stats-card/subscriber-stats-card.tsx b/client/my-sites/subscribers/components/subscriber-stats-card/subscriber-stats-card.tsx
index b98bb4b64d330e..18bdd33cefec78 100644
--- a/client/my-sites/subscribers/components/subscriber-stats-card/subscriber-stats-card.tsx
+++ b/client/my-sites/subscribers/components/subscriber-stats-card/subscriber-stats-card.tsx
@@ -1,4 +1,5 @@
-import { Card, ShortenedNumber, Spinner } from '@automattic/components';
+import { Card, Spinner } from '@automattic/components';
+import { numberFormat } from 'i18n-calypso';
import { ReactNode } from 'react';
import InfoPopover from 'calypso/components/info-popover';
import '@automattic/components/src/highlight-cards/style.scss';
@@ -41,7 +42,14 @@ const SubscriberStatsCardValue = ( {
className="highlight-card-count-value subscriber-stats-card__value"
title={ String( value ) }
>
-
+ { typeof value === 'number'
+ ? numberFormat( value, {
+ numberFormatOptions: {
+ notation: 'compact',
+ maximumFractionDigits: 1,
+ },
+ } )
+ : '-' }
);
};
diff --git a/client/reader/onboarding/style.scss b/client/reader/onboarding/style.scss
index af0db23c492f46..161d9552e4999e 100644
--- a/client/reader/onboarding/style.scss
+++ b/client/reader/onboarding/style.scss
@@ -1,28 +1,17 @@
-@import "@wordpress/base-styles/breakpoints";
.reader-onboarding {
- display: flex;
- flex-wrap: wrap;
- background-color: var(--color-surface-1);
+ background-color: var( --color-surface-1 );
border-radius: 6px; /* stylelint-disable-line scales/radii */
- box-shadow: rgba(0, 0, 0, 0.05) 0 0 0 1px inset;
+ box-shadow: rgba( 0, 0, 0, 0.05 ) 0 0 0 1px inset;
margin-bottom: 24px;
- padding: 10px;
- gap: 20px;
+ padding: 20px 20px 5px 20px;
h2 {
font-weight: 600;
- margin-top: 20px;
+ clear: initial;
}
- &__steps-column {
- flex-grow: 2;
- }
-
- @media ( min-width: $break-mobile ) {
- padding: 20px;
- }
-
- @media ( min-width: $break-huge ) {
- gap: 40px;
+ .circular__progress-bar {
+ float: right;
+ margin: 5px 5px 5px 10px;
}
}
diff --git a/client/server/middleware/assets.js b/client/server/middleware/assets.js
index 986dc03e475fe8..983aeb61fad13f 100644
--- a/client/server/middleware/assets.js
+++ b/client/server/middleware/assets.js
@@ -1,4 +1,4 @@
-import { readFile } from 'fs/promises';
+import { open } from 'fs/promises';
import path from 'path';
import asyncHandler from 'express-async-handler';
import { defaults, groupBy } from 'lodash';
@@ -21,14 +21,30 @@ const getAssetType = ( asset ) => {
const groupAssetsByType = ( assets ) => defaults( groupBy( assets, getAssetType ), EMPTY_ASSETS );
export default () => {
- let assetsFile;
- async function readAssets() {
- if ( ! assetsFile ) {
- assetsFile = JSON.parse( await readFile( ASSETS_FILE, 'utf8' ) );
+ let assetsFile = null;
+ let assetsFileModified = 0;
+ async function doReadAssets() {
+ const fd = await open( ASSETS_FILE );
+ const stats = await fd.stat();
+ if ( ! assetsFile || stats.mtimeMs > assetsFileModified ) {
+ assetsFile = JSON.parse( await fd.readFile( 'utf8' ) );
+ assetsFileModified = stats.mtimeMs;
}
+ await fd.close();
return assetsFile;
}
+ let checking = null;
+ function readAssets() {
+ if ( ! checking ) {
+ checking = doReadAssets().finally( () => {
+ checking = null;
+ } );
+ }
+
+ return checking;
+ }
+
return asyncHandler( async ( req, res, next ) => {
const assets = await readAssets();
diff --git a/client/signup/steps/woocommerce-install/transfer/install-plugins.tsx b/client/signup/steps/woocommerce-install/transfer/install-plugins.tsx
index 6f531f9a0ee21a..6d3f04f4b2b183 100644
--- a/client/signup/steps/woocommerce-install/transfer/install-plugins.tsx
+++ b/client/signup/steps/woocommerce-install/transfer/install-plugins.tsx
@@ -90,7 +90,7 @@ export default function InstallPlugins( {
return;
}
- setProgress( progress + 0.2 );
+ setProgress( progress + 20 );
dispatch( requestAtomicSoftwareStatus( siteId, 'woo-on-plans' ) );
},
!! installFailed || softwareApplied ? null : 3000
@@ -104,7 +104,7 @@ export default function InstallPlugins( {
if ( softwareApplied ) {
trackRedirect();
- setProgress( 1 );
+ setProgress( 100 );
// Allow progress bar to complete
setTimeout( () => {
window.location.assign( wcAdminUrl );
diff --git a/client/signup/steps/woocommerce-install/transfer/transfer-site.tsx b/client/signup/steps/woocommerce-install/transfer/transfer-site.tsx
index 596d87f64e28eb..56c3b9fcb9b1f0 100644
--- a/client/signup/steps/woocommerce-install/transfer/transfer-site.tsx
+++ b/client/signup/steps/woocommerce-install/transfer/transfer-site.tsx
@@ -92,21 +92,21 @@ export default function TransferSite( {
switch ( transferStatus ) {
case transferStates.PENDING:
- setProgress( 0.2 );
+ setProgress( 20 );
break;
case transferStates.ACTIVE:
- setProgress( 0.4 );
+ setProgress( 40 );
break;
case transferStates.PROVISIONED:
- setProgress( 0.5 );
+ setProgress( 50 );
break;
case transferStates.COMPLETED:
- setProgress( 0.7 );
+ setProgress( 70 );
break;
}
if ( isTransferringStatusFailed || transferStatus === transferStates.ERROR ) {
- setProgress( 1 );
+ setProgress( 100 );
setTransferFailed( true );
onFailure( {
@@ -133,7 +133,7 @@ export default function TransferSite( {
if ( softwareApplied ) {
trackRedirect();
- setProgress( 1 );
+ setProgress( 100 );
// Allow progress bar to complete
setTimeout( () => {
window.location.assign( wcAdminUrl );
diff --git a/client/state/global-sidebar/selectors.ts b/client/state/global-sidebar/selectors.ts
index 5168558e5cecdc..dfeecad2a0ae8f 100644
--- a/client/state/global-sidebar/selectors.ts
+++ b/client/state/global-sidebar/selectors.ts
@@ -28,6 +28,9 @@ const SITE_DASHBOARD_ROUTES = [
'/domains/manage/all/overview',
'/domains/manage/all/email',
'/domains/manage/all/contact-info',
+
+ // Bulk Plugins management
+ '/plugins/manage/sites',
];
function isInRoute( state: AppState, routes: string[] ) {
diff --git a/config/a8c-for-agencies-development.json b/config/a8c-for-agencies-development.json
index 310e3d2b83290c..cd17d7260f0399 100644
--- a/config/a8c-for-agencies-development.json
+++ b/config/a8c-for-agencies-development.json
@@ -46,7 +46,8 @@
"a4a-migrations-page-v2": true,
"a8c-for-agencies-agency-tier": true,
"a4a-pressable-referrals": true,
- "a4a-updated-add-new-site": true
+ "a4a-updated-add-new-site": true,
+ "a4a-wc-asia-signup-enabled": true
},
"enable_all_sections": false,
"sections": {
diff --git a/config/a8c-for-agencies-horizon.json b/config/a8c-for-agencies-horizon.json
index 1ce052f46e5d04..186080d3ca5589 100644
--- a/config/a8c-for-agencies-horizon.json
+++ b/config/a8c-for-agencies-horizon.json
@@ -39,7 +39,8 @@
"a4a-migrations-page-v2": true,
"a8c-for-agencies-agency-tier": true,
"a4a-pressable-referrals": true,
- "a4a-updated-add-new-site": true
+ "a4a-updated-add-new-site": true,
+ "a4a-wc-asia-signup-enabled": true
},
"enable_all_sections": false,
"sections": {
diff --git a/config/development.json b/config/development.json
index 46554005f5a285..1b579894b964c1 100644
--- a/config/development.json
+++ b/config/development.json
@@ -102,7 +102,6 @@
"jetpack/simplify-pricing-structure": false,
"jetpack/social-plans-v1": true,
"jetpack/standalone-plugin-onboarding-update-v1": true,
- "jetpack/offer-complete-after-activation": false,
"jetpack/zendesk-chat-for-logged-in-users": true,
"jitms": true,
"lasagna": true,
diff --git a/config/horizon.json b/config/horizon.json
index c97c4ccf97dea5..0059065f4e036a 100644
--- a/config/horizon.json
+++ b/config/horizon.json
@@ -64,7 +64,6 @@
"jetpack/simplify-pricing-structure": false,
"jetpack/social-plans-v1": true,
"jetpack/standalone-plugin-onboarding-update-v1": true,
- "jetpack/offer-complete-after-activation": false,
"jitms": true,
"lasagna": true,
"launchpad-updates": false,
diff --git a/config/production.json b/config/production.json
index 46e08bf8a589b6..e7ce22247c1dd4 100644
--- a/config/production.json
+++ b/config/production.json
@@ -79,7 +79,6 @@
"jetpack/social-plans-v1": true,
"jetpack/standalone-plugin-onboarding-update-v1": true,
"jetpack-social/advanced-plan": false,
- "jetpack/offer-complete-after-activation": false,
"jetpack/zendesk-chat-for-logged-in-users": true,
"jitms": true,
"lasagna": true,
diff --git a/config/stage.json b/config/stage.json
index 8157daddaa51d6..81b50d0fc80d05 100644
--- a/config/stage.json
+++ b/config/stage.json
@@ -76,7 +76,6 @@
"jetpack/social-plans-v1": true,
"jetpack/standalone-plugin-onboarding-update-v1": true,
"jetpack-social/advanced-plan": true,
- "jetpack/offer-complete-after-activation": false,
"jetpack/zendesk-chat-for-logged-in-users": true,
"jitms": true,
"lasagna": true,
diff --git a/config/test.json b/config/test.json
index 9f0a5079fd12a4..5ea47c345e4043 100644
--- a/config/test.json
+++ b/config/test.json
@@ -62,7 +62,6 @@
"jetpack/sharing-buttons-block-enabled": false,
"jetpack/simplify-pricing-structure": false,
"jetpack-social/advanced-plan": false,
- "jetpack/offer-complete-after-activation": false,
"jitms": true,
"lasagna": false,
"launchpad-updates": false,
diff --git a/config/wpcalypso.json b/config/wpcalypso.json
index 64149c9d79923b..154af23dbaf9de 100644
--- a/config/wpcalypso.json
+++ b/config/wpcalypso.json
@@ -79,7 +79,6 @@
"jetpack/sharing-buttons-block-enabled": false,
"jetpack/simplify-pricing-structure": false,
"jetpack-social/advanced-plan": false,
- "jetpack/offer-complete-after-activation": false,
"jetpack/zendesk-chat-for-logged-in-users": true,
"jitms": true,
"lasagna": true,
@@ -106,7 +105,7 @@
"migration-flow/experiment": false,
"migration-flow/introductory-offer": true,
"network-connection": true,
- "newsletter-categories-section": false,
+ "newsletter-categories-section": true,
"onboarding/import": true,
"onboarding/import-from-blogger": true,
"onboarding/import-from-medium": true,
diff --git a/packages/calypso-e2e/src/lib/components/editor-welcome-guide-component.ts b/packages/calypso-e2e/src/lib/components/editor-welcome-guide-component.ts
new file mode 100644
index 00000000000000..90211a9f7bdd49
--- /dev/null
+++ b/packages/calypso-e2e/src/lib/components/editor-welcome-guide-component.ts
@@ -0,0 +1,40 @@
+import { Page } from 'playwright';
+import { EditorComponent } from './editor-component';
+
+const selectors = {
+ welcomeGuideWrapper: '.edit-post-welcome-guide',
+ // Welcome guide
+ welcomeGuideCloseButton: 'button[aria-label="Close"]',
+};
+
+/**
+ * Represents the welcome guide that shows in a popover when the editor loads.
+ */
+export class EditorWelcomeGuideComponent {
+ private page: Page;
+ private editor: EditorComponent;
+
+ /**
+ * Constructs an instance of the component.
+ *
+ * @param {Page} page The underlying page.
+ * @param {EditorComponent} editor The EditorComponent instance.
+ */
+ constructor( page: Page, editor: EditorComponent ) {
+ this.page = page;
+ this.editor = editor;
+ }
+
+ /**
+ * close the welcome guide if needed.
+ */
+ async closeWelcomeGuideIfNeeded(): Promise< void > {
+ const editorParent = await this.editor.parent();
+
+ const welcomGuideWrapper = editorParent.locator( selectors.welcomeGuideWrapper );
+ await welcomGuideWrapper.waitFor( { state: 'visible' } );
+
+ const closeBtn = editorParent.locator( selectors.welcomeGuideCloseButton );
+ await closeBtn.click();
+ }
+}
diff --git a/packages/calypso-e2e/src/lib/components/index.ts b/packages/calypso-e2e/src/lib/components/index.ts
index ce968888a8dbc9..71f96086925448 100644
--- a/packages/calypso-e2e/src/lib/components/index.ts
+++ b/packages/calypso-e2e/src/lib/components/index.ts
@@ -24,6 +24,7 @@ export * from './editor-gutenberg-component';
export * from './editor-block-list-view-component';
export * from './editor-sidebar-block-inserter-component';
export * from './editor-welcome-tour-component';
+export * from './editor-welcome-guide-component';
export * from './editor-popover-menu-component';
export * from './editor-site-styles-component';
export * from './editor-color-picker-component';
diff --git a/packages/calypso-e2e/src/lib/pages/editor-page.ts b/packages/calypso-e2e/src/lib/pages/editor-page.ts
index 0f72675f313b8c..6a78f8293369a4 100644
--- a/packages/calypso-e2e/src/lib/pages/editor-page.ts
+++ b/packages/calypso-e2e/src/lib/pages/editor-page.ts
@@ -13,6 +13,7 @@ import {
EditorInlineBlockInserterComponent,
EditorSidebarBlockInserterComponent,
EditorWelcomeTourComponent,
+ EditorWelcomeGuideComponent,
EditorBlockToolbarComponent,
EditorTemplateModalComponent,
EditorPopoverMenuComponent,
@@ -57,6 +58,7 @@ export class EditorPage {
private editorSidebarBlockInserterComponent: EditorSidebarBlockInserterComponent;
private editorInlineBlockInserterComponent: EditorInlineBlockInserterComponent;
private editorWelcomeTourComponent: EditorWelcomeTourComponent;
+ private editorWelcomeGuideComponent: EditorWelcomeGuideComponent;
private editorBlockToolbarComponent: EditorBlockToolbarComponent;
private editorTemplateModalComponent: EditorTemplateModalComponent;
private editorPopoverMenuComponent: EditorPopoverMenuComponent;
@@ -78,6 +80,7 @@ export class EditorPage {
this.editorPublishPanelComponent = new EditorPublishPanelComponent( page, this.editor );
this.editorBlockListViewComponent = new EditorBlockListViewComponent( page, this.editor );
this.editorWelcomeTourComponent = new EditorWelcomeTourComponent( page, this.editor );
+ this.editorWelcomeGuideComponent = new EditorWelcomeGuideComponent( page, this.editor );
this.editorBlockToolbarComponent = new EditorBlockToolbarComponent( page, this.editor );
this.editorSidebarBlockInserterComponent = new EditorSidebarBlockInserterComponent(
page,
@@ -990,5 +993,12 @@ export class EditorPage {
return this.editorToolbarComponent.openMoreOptionsMenu();
}
+ /**
+ * Close the
+ */
+ async closeWelcomeGuideIfNeeded(): Promise< void > {
+ return this.editorWelcomeGuideComponent.closeWelcomeGuideIfNeeded();
+ }
+
//#endregion
}
diff --git a/packages/calypso-e2e/src/lib/pages/signup/user-signup-page.ts b/packages/calypso-e2e/src/lib/pages/signup/user-signup-page.ts
index 31b8b19c4fb196..ae72f0aa21e785 100644
--- a/packages/calypso-e2e/src/lib/pages/signup/user-signup-page.ts
+++ b/packages/calypso-e2e/src/lib/pages/signup/user-signup-page.ts
@@ -154,10 +154,13 @@ export class UserSignupPage {
async signupWoo( email: string ): Promise< NewUserResponse > {
await this.page.fill( selectors.emailInput, email );
- const [ , response ] = await Promise.all( [
- this.page.waitForURL( /.*woocommerce\.com*/, { waitUntil: 'networkidle' } ),
- this.page.waitForResponse( /.*new\?.*/ ),
+ const [ response ] = await Promise.all( [
+ this.page.waitForResponse( /.*users\/new\?.*/ ),
this.page.click( selectors.submitButton ),
+ this.page.waitForURL( /.*woocommerce\.com*/, {
+ waitUntil: 'networkidle',
+ timeout: 25000,
+ } ),
] );
if ( ! response ) {
diff --git a/packages/calypso-products/src/constants/jetpack.ts b/packages/calypso-products/src/constants/jetpack.ts
index 830c788a9703af..2ba835a85c18c3 100644
--- a/packages/calypso-products/src/constants/jetpack.ts
+++ b/packages/calypso-products/src/constants/jetpack.ts
@@ -816,15 +816,6 @@ export const JETPACK_PRODUCT_CATEGORIES = < const >[
];
// URL
-export const JETPACK_BACKUP_PRODUCT_LANDING_PAGE_URL = 'https://jetpack.com/upgrade/backup/';
-export const JETPACK_SEARCH_PRODUCT_LANDING_PAGE_URL = 'https://jetpack.com/upgrade/search/';
-export const JETPACK_STATS_PRODUCT_LANDING_PAGE_URL = 'https://jetpack.com/stats/';
-export const JETPACK_SCAN_PRODUCT_LANDING_PAGE_URL = 'https://jetpack.com/upgrade/scan/';
-export const JETPACK_ANTI_SPAM_PRODUCT_LANDING_PAGE_URL = 'https://jetpack.com/upgrade/anti-spam/';
-export const JETPACK_BOOST_PRODUCT_LANDING_PAGE_URL = 'https://jetpack.com/boost/';
-export const JETPACK_SOCIAL_PRODUCT_LANDING_PAGE_URL = 'https://jetpack.com/social/';
-export const JETPACK_VIDEOPRESS_PRODUCT_LANDING_PAGE_URL = 'https://jetpack.com/videopress/';
-export const JETPACK_CRM_PRODUCT_LANDING_PAGE_URL = 'https://jetpackcrm.com/';
// If JETPACK_CLOUD_REDIRECT_CHECKOUT_TO_WPADMIN is true, checkout will redirect to the site's wp-admin,
// otherwise it will redirect to the JETPACK_REDIRECT_URL. Checkout references these constants in:
// client/my-sites/checkout/src/hooks/use-get-thank-you-url/get-thank-you-page-url.ts
diff --git a/packages/calypso-products/src/is-global-styles-on-personal-enabled.ts b/packages/calypso-products/src/is-global-styles-on-personal-enabled.ts
index 6443d064ce91ca..874b40c825df63 100644
--- a/packages/calypso-products/src/is-global-styles-on-personal-enabled.ts
+++ b/packages/calypso-products/src/is-global-styles-on-personal-enabled.ts
@@ -1,3 +1,5 @@
+import { isEnabled } from '@automattic/calypso-config';
+
declare global {
interface Window {
isGlobalStylesOnPersonal?: boolean;
@@ -7,5 +9,12 @@ export function isGlobalStylesOnPersonalEnabled(): boolean {
if ( typeof window === 'undefined' ) {
return false;
}
+
+ if ( window.isGlobalStylesOnPersonal ) {
+ return true;
+ }
+
+ window.isGlobalStylesOnPersonal = isEnabled( 'global-styles/on-personal-plan' );
+
return !! window.isGlobalStylesOnPersonal;
}
diff --git a/packages/components/src/horizontal-bar-list/horizontal-bar-grid-item.tsx b/packages/components/src/horizontal-bar-list/horizontal-bar-grid-item.tsx
index 2a8e1362eb7794..52043f220abcc5 100644
--- a/packages/components/src/horizontal-bar-list/horizontal-bar-grid-item.tsx
+++ b/packages/components/src/horizontal-bar-list/horizontal-bar-grid-item.tsx
@@ -3,7 +3,6 @@ import { Icon, chevronDown, chevronUp, tag, file } from '@wordpress/icons';
import clsx from 'clsx';
import { numberFormat } from 'i18n-calypso';
import React, { Fragment, useState } from 'react';
-import ShortenedNumber from '../number-formatters';
import type { HorizontalBarListItemProps } from './types';
import './style.scss';
@@ -106,8 +105,18 @@ const HorizontalBarListItem = ( {
const renderValue = () => {
if ( useShortNumber ) {
- return
;
+ return (
+
+ { numberFormat( value, {
+ numberFormatOptions: {
+ notation: 'compact',
+ maximumFractionDigits: 1,
+ },
+ } ) }
+
+ );
}
+
if ( formatValue ) {
return formatValue( value, data );
}
diff --git a/packages/components/src/post-stats-card/index.tsx b/packages/components/src/post-stats-card/index.tsx
index 50a630a486ae55..9e5a3c88ae3a98 100644
--- a/packages/components/src/post-stats-card/index.tsx
+++ b/packages/components/src/post-stats-card/index.tsx
@@ -1,9 +1,9 @@
import { recordTracksEvent } from '@automattic/calypso-analytics';
import { Icon, commentContent, starEmpty } from '@wordpress/icons';
import clsx from 'clsx';
-import { useTranslate } from 'i18n-calypso';
+import { useTranslate, numberFormat } from 'i18n-calypso';
import { useMemo } from 'react';
-import { Card, ShortenedNumber, Button } from '../';
+import { Card, Button } from '../';
import { eye } from '../icons';
import './style.scss';
@@ -78,21 +78,48 @@ export default function PostStatsCard( {
{ translate( 'Views' ) }
-
+
+ { ! isLoading && viewCount !== null
+ ? numberFormat( viewCount, {
+ numberFormatOptions: {
+ notation: 'compact',
+ maximumFractionDigits: 1,
+ },
+ } )
+ : '-' }
+