diff --git a/plugins/woocommerce-admin/changelogs/update-7248-update-inbox-link-to-activity b/plugins/woocommerce-admin/changelogs/update-7248-update-inbox-link-to-activity new file mode 100644 index 00000000000..da94eb94ce1 --- /dev/null +++ b/plugins/woocommerce-admin/changelogs/update-7248-update-inbox-link-to-activity @@ -0,0 +1,4 @@ +Significance: minor +Type: Update + +Rename Inbox to Activity from the activity header #7879 diff --git a/plugins/woocommerce-admin/client/header/activity-panel/icon-flag.js b/plugins/woocommerce-admin/client/header/activity-panel/icon-flag.js new file mode 100644 index 00000000000..3ca30324240 --- /dev/null +++ b/plugins/woocommerce-admin/client/header/activity-panel/icon-flag.js @@ -0,0 +1,28 @@ +export const IconFlag = () => ( + + + + + + + + +); diff --git a/plugins/woocommerce-admin/client/header/activity-panel/index.js b/plugins/woocommerce-admin/client/header/activity-panel/index.js index f1d888b473f..2b907d482c6 100644 --- a/plugins/woocommerce-admin/client/header/activity-panel/index.js +++ b/plugins/woocommerce-admin/client/header/activity-panel/index.js @@ -5,12 +5,7 @@ import { __ } from '@wordpress/i18n'; import { lazy, useState } from '@wordpress/element'; import { useDispatch, useSelect } from '@wordpress/data'; import { uniqueId, find } from 'lodash'; -import { - Icon, - help as helpIcon, - inbox as inboxIcon, - external, -} from '@wordpress/icons'; +import { Icon, help as helpIcon, external } from '@wordpress/icons'; import { getAdminLink, getSetting } from '@woocommerce/wc-admin-settings'; import { H, Section } from '@woocommerce/components'; import { @@ -21,7 +16,6 @@ import { import { getHistory, getNewPath } from '@woocommerce/navigation'; import { recordEvent } from '@woocommerce/tracks'; import { useSlot } from '@woocommerce/experimental'; - /** * Internal dependencies */ @@ -30,6 +24,7 @@ import { isNotesPanelVisible } from './unread-indicators'; import { isWCAdmin } from '../../dashboard/utils'; import { Tabs } from './tabs'; import { SetupProgress } from './setup-progress'; +import { IconFlag } from './icon-flag'; import { DisplayOptions } from './display-options'; import { HighlightTooltip } from './highlight-tooltip'; import { Panel } from './panel'; @@ -224,10 +219,10 @@ export const ActivityPanel = ( { isEmbedded, query, userPreferencesData } ) => { // @todo Pull in dynamic unread status/count const getTabs = () => { - const inbox = { - name: 'inbox', - title: __( 'Inbox', 'woocommerce-admin' ), - icon: , + const activity = { + name: 'activity', + title: __( 'Activity', 'woocommerce-admin' ), + icon: , unread: hasUnreadNotes || hasAbbreviatedNotifications, visible: ( isEmbedded || ! isHomescreen() ) && ! isPerformingSetupTask(), @@ -300,7 +295,7 @@ export const ActivityPanel = ( { isEmbedded, query, userPreferencesData } ) => { }, }; - return [ inbox, setup, previewSite, displayOptions, help ].filter( + return [ activity, setup, previewSite, displayOptions, help ].filter( ( tab ) => tab.visible ); }; @@ -309,7 +304,7 @@ export const ActivityPanel = ( { isEmbedded, query, userPreferencesData } ) => { const { task } = query; switch ( tab ) { - case 'inbox': + case 'activity': return ( { it( 'should render inbox tab on embedded pages', () => { render( ); - expect( screen.getByText( 'Inbox' ) ).toBeDefined(); + expect( screen.getByText( 'Activity' ) ).toBeDefined(); } ); it( 'should render inbox tab if not on home screen', () => { @@ -78,7 +78,7 @@ describe( 'Activity Panel', () => { ); - expect( screen.getByText( 'Inbox' ) ).toBeDefined(); + expect( screen.getByText( 'Activity' ) ).toBeDefined(); } ); it( 'should not render inbox tab on home screen', () => {