From 8e3d310f1bf34ab06d802b03de7004d8b7cdb78f Mon Sep 17 00:00:00 2001 From: Gaby Zifferman Date: Fri, 9 Aug 2024 15:24:41 +0200 Subject: [PATCH 01/13] fix: icons rename some icons --- src/constants/Icons.ts | 48 ++++++++++++++++++++++++++++++++++++++++++ src/types/icons.ts | 10 +++++++++ 2 files changed, 58 insertions(+) diff --git a/src/constants/Icons.ts b/src/constants/Icons.ts index 6a27aec99..051d39945 100644 --- a/src/constants/Icons.ts +++ b/src/constants/Icons.ts @@ -95,6 +95,11 @@ export const Icons: Record = { chartLine: { light: ChartLineIcon, default: 'light', + deprecated: 'trends', + }, + trends: { + light: ChartLineIcon, + default: 'light', }, check: { light: CheckIcon, @@ -151,6 +156,11 @@ export const Icons: Record = { gear: { light: GearIcon, default: 'light', + deprecated: 'settings', + }, + settings: { + light: GearIcon, + default: 'light', }, grid: { light: GridIcon, @@ -187,6 +197,11 @@ export const Icons: Record = { messageQuestion: { light: MessageQuestionIcon, default: 'light', + deprecated: 'support', + }, + support: { + light: MessageQuestionIcon, + default: 'light', }, mpLogo: { light: MpLogoIcon, @@ -204,6 +219,10 @@ export const Icons: Record = { light: RemoveIcon, default: 'light', }, + close: { + light: RemoveIcon, + default: 'light', + }, search: { light: SearchIcon, default: 'light', @@ -215,14 +234,29 @@ export const Icons: Record = { shieldKeyhole: { light: ShieldKeyholeIcon, default: 'light', + deprecated: 'privacy', + }, + privacy: { + light: ShieldKeyholeIcon, + default: 'light', }, signout: { light: SignoutIcon, default: 'light', + deprecated: 'logout', + }, + logout: { + light: SignoutIcon, + default: 'light', }, siteMap: { 'duo-tone': DataPlatformIconDt, default: 'duo-tone', + deprecated: 'dataPlatform', + }, + dataPlatform: { + 'duo-tone': DataPlatformIconDt, + default: 'duo-tone', }, sparkles: { light: PredictionsIcon, @@ -238,6 +272,11 @@ export const Icons: Record = { split: { light: SplitIcon, default: 'light', + deprecated: 'journeys', + }, + journeys: { + light: SplitIcon, + default: 'light', }, systemAlerts: { light: SystemAlertsIcon, @@ -263,9 +302,18 @@ export const Icons: Record = { light: UsersIcon, default: 'light', }, + audiences: { + light: UsersIcon, + default: 'light', + }, wrench: { light: WrenchIcon, default: 'light', + deprecated: 'setup', + }, + setup: { + light: WrenchIcon, + default: 'light', }, zoomIn: { light: ZoomIn, diff --git a/src/types/icons.ts b/src/types/icons.ts index b106bdee4..5a7d37717 100644 --- a/src/types/icons.ts +++ b/src/types/icons.ts @@ -78,3 +78,13 @@ export type IconNames = | 'unlock' | 'notification' | 'overview' + | 'trends' + | 'settings' + | 'support' + | 'close' + | 'privacy' + | 'dataPlatform' + | 'journeys' + | 'setup' + | 'logout' + | 'audiences' From d4bc4db9c27c641820afb3b650cb74ac527fc61f Mon Sep 17 00:00:00 2001 From: Gaby Zifferman Date: Fri, 9 Aug 2024 16:24:22 +0200 Subject: [PATCH 02/13] fix: icons rename --- src/constants/Icons.ts | 36 ++++++++++++++++++++++++++++++++++++ src/types/icons.ts | 7 +++++++ 2 files changed, 43 insertions(+) diff --git a/src/constants/Icons.ts b/src/constants/Icons.ts index 051d39945..564bf8af0 100644 --- a/src/constants/Icons.ts +++ b/src/constants/Icons.ts @@ -104,14 +104,29 @@ export const Icons: Record = { check: { light: CheckIcon, default: 'light', + deprecated: 'selected', + }, + selected: { + light: CheckIcon, + default: 'light', }, circleNodes: { light: CircleNodesIcon, default: 'light', + deprecated: 'pipelines', + }, + pipelines: { + light: CircleNodesIcon, + default: 'light', }, cloud: { light: CloudIcon, default: 'light', + deprecated: 'api', + }, + api: { + light: CloudIcon, + default: 'light', }, connections: { light: ConnectionsIcon, @@ -148,6 +163,11 @@ export const Icons: Record = { folderClosed: { light: FolderClosedIcon, default: 'light', + deprecated: 'savedProjects', + }, + savedProjects: { + light: FolderClosedIcon, + default: 'light', }, forwarding: { light: ForwardingIcon, @@ -165,10 +185,21 @@ export const Icons: Record = { grid: { light: GridIcon, default: 'light', + deprecated: 'myHub', + }, + myHub: { + light: GridIcon, + default: 'light', }, heart: { light: HeartIcon, default: 'light', + deprecated: 'favorite', + }, + favorite: { + light: HeartIcon, + default: 'light', + deprecated: 'favorite', }, help: { light: HelpIcon, @@ -185,6 +216,11 @@ export const Icons: Record = { lightBulb: { light: LightBulbIcon, default: 'light', + deprecated: 'insights', + }, + insights: { + light: LightBulbIcon, + default: 'light', }, liveStream: { light: LiveStreamIcon, diff --git a/src/types/icons.ts b/src/types/icons.ts index 5a7d37717..965dfb484 100644 --- a/src/types/icons.ts +++ b/src/types/icons.ts @@ -88,3 +88,10 @@ export type IconNames = | 'setup' | 'logout' | 'audiences' + | 'selected' + | 'pipelines' + | 'api' + | 'savedProjects' + | 'myHub' + | 'favorite' + | 'insights' From a84954d5cdbb682efa280552d6c8d4b63147f671 Mon Sep 17 00:00:00 2001 From: Gaby Zifferman Date: Thu, 15 Aug 2024 15:12:23 +0200 Subject: [PATCH 03/13] fix: update deprecated icons --- src/components/general/Icon/Icon.stories.tsx | 5 +++-- src/constants/Icons.ts | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/general/Icon/Icon.stories.tsx b/src/components/general/Icon/Icon.stories.tsx index 9a17c9932..3f35db6d3 100644 --- a/src/components/general/Icon/Icon.stories.tsx +++ b/src/components/general/Icon/Icon.stories.tsx @@ -24,7 +24,7 @@ export const IconTable: React.FC = ({ color = 'black', size = 'lg', return ( -

+

{isDeprecated ? 'deprecated ' : ''} {iconName}

@@ -45,7 +45,8 @@ The \`IconTable\` component is used to display a table of all available icons in - \`variant\`: The variant of the icon. Available options are \`light\` and \`duo-tone\`. #### Updating Icons -To update the icons: + +The icon SVG and icon name are provided by the Design team. and the svg must be minified. 1. **Add New Icons**: Add the new icon SVGs to the \`src/constants/Icons\` directory. The icons should be curated by Design and the svg must be minified. 2. **Update Icon Constants**: Update the \`Icons\` object in \`src/constants/Icons\` to include the new icons. diff --git a/src/constants/Icons.ts b/src/constants/Icons.ts index 564bf8af0..28db23288 100644 --- a/src/constants/Icons.ts +++ b/src/constants/Icons.ts @@ -91,6 +91,7 @@ export const Icons: Record = { chartColumn: { light: ChartColumnIcon, default: 'light', + deprecated: 'this icon is not used anymore', }, chartLine: { light: ChartLineIcon, @@ -131,10 +132,12 @@ export const Icons: Record = { connections: { light: ConnectionsIcon, default: 'light', + deprecated: 'this icon is not used anymore', }, database: { light: DatabaseIcon, default: 'light', + deprecated: 'this icon is not used anymore', }, dsr: { light: DsrIcon, @@ -199,7 +202,6 @@ export const Icons: Record = { favorite: { light: HeartIcon, default: 'light', - deprecated: 'favorite', }, help: { light: HelpIcon, From c09f1fcd892bdf62088941dc315fec8e212e4079 Mon Sep 17 00:00:00 2001 From: mparticle-automation Date: Thu, 15 Aug 2024 13:41:47 +0000 Subject: [PATCH 04/13] chore(release): 1.27.1-fix-icons-name.1 [skip ci] ## [1.27.1-fix-icons-name.1](https://github.com/mParticle/aquarium/compare/v1.27.0...v1.27.1-fix-icons-name.1) (2024-08-15) ### Bug Fixes * icons rename ([d4bc4db](https://github.com/mParticle/aquarium/commit/d4bc4db9c27c641820afb3b650cb74ac527fc61f)) * icons rename some icons ([8e3d310](https://github.com/mParticle/aquarium/commit/8e3d310f1bf34ab06d802b03de7004d8b7cdb78f)) * update deprecated icons ([a84954d](https://github.com/mParticle/aquarium/commit/a84954d5cdbb682efa280552d6c8d4b63147f671)) --- CHANGELOG.md | 8 ++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b90b6121..87c902bca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [1.27.1-fix-icons-name.1](https://github.com/mParticle/aquarium/compare/v1.27.0...v1.27.1-fix-icons-name.1) (2024-08-15) + +### Bug Fixes + +- icons rename ([d4bc4db](https://github.com/mParticle/aquarium/commit/d4bc4db9c27c641820afb3b650cb74ac527fc61f)) +- icons rename some icons ([8e3d310](https://github.com/mParticle/aquarium/commit/8e3d310f1bf34ab06d802b03de7004d8b7cdb78f)) +- update deprecated icons ([a84954d](https://github.com/mParticle/aquarium/commit/a84954d5cdbb682efa280552d6c8d4b63147f671)) + # [1.27.0](https://github.com/mParticle/aquarium/compare/v1.26.0...v1.27.0) (2024-08-14) ### Bug Fixes diff --git a/package-lock.json b/package-lock.json index c3d0f4d47..75f708955 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mparticle/aquarium", - "version": "1.27.0", + "version": "1.27.1-fix-icons-name.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@mparticle/aquarium", - "version": "1.27.0", + "version": "1.27.1-fix-icons-name.1", "license": "Apache-2.0", "dependencies": { "lodash.clonedeep": "4.5.0" diff --git a/package.json b/package.json index 5fcd933df..ff7473ec4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mparticle/aquarium", - "version": "1.27.0", + "version": "1.27.1-fix-icons-name.1", "description": "mParticle Component Library", "license": "Apache-2.0", "keywords": [ From 6bb08578d40955733b7cd64a09d60591744c7af0 Mon Sep 17 00:00:00 2001 From: Gaby Zifferman Date: Thu, 15 Aug 2024 21:09:45 +0200 Subject: [PATCH 05/13] fix: rename icons --- .../data-display/Avatar/Avatar.stories.tsx | 2 +- .../Collapse/Collapse.stories.tsx | 2 +- .../Statistic/Statistic.stories.tsx | 8 +- .../data-entry/Switch/Switch.stories.tsx | 4 +- .../feedback/Skeleton/Skeleton.stories.tsx | 4 +- .../GlobalNavigation.stories.tsx | 88 +++++-------------- .../WorkspaceSelector/WorkspaceSelector.tsx | 2 +- .../navigation/Steps/Steps.stories.tsx | 6 +- 8 files changed, 35 insertions(+), 81 deletions(-) diff --git a/src/components/data-display/Avatar/Avatar.stories.tsx b/src/components/data-display/Avatar/Avatar.stories.tsx index ef2f303c7..51eef25d4 100644 --- a/src/components/data-display/Avatar/Avatar.stories.tsx +++ b/src/components/data-display/Avatar/Avatar.stories.tsx @@ -37,7 +37,7 @@ const meta: Meta = { options: ['Users', 'Sparkles'], mapping: { Users: , - Sparkles: , + Sparkles: , }, }, }, diff --git a/src/components/data-display/Collapse/Collapse.stories.tsx b/src/components/data-display/Collapse/Collapse.stories.tsx index 8a1f62e48..ff608aeb6 100644 --- a/src/components/data-display/Collapse/Collapse.stories.tsx +++ b/src/components/data-display/Collapse/Collapse.stories.tsx @@ -339,7 +339,7 @@ export const ExampleExtraNode: Story = { // If you don't want click extra trigger collapse, you can prevent this: event.stopPropagation() }}> - + ) diff --git a/src/components/data-display/Statistic/Statistic.stories.tsx b/src/components/data-display/Statistic/Statistic.stories.tsx index c3c8d88c4..5cb11ad6a 100644 --- a/src/components/data-display/Statistic/Statistic.stories.tsx +++ b/src/components/data-display/Statistic/Statistic.stories.tsx @@ -37,9 +37,9 @@ const meta: Meta = { control: 'select', options: ['check', 'alicorn', 'wrench'], mapping: { - check: , + check: , alicorn: , - wrench: , + wrench: , }, }, suffix: { @@ -96,7 +96,7 @@ export const CustomPrecision: Story = { export const CustomPrefix: Story = { args: { - prefix: , + prefix: , }, } @@ -194,7 +194,7 @@ export const ExampleWithCard: Story = { value={9.3} precision={2} valueStyle={{ color: ColorError }} - prefix={} + prefix={} suffix="%" /> diff --git a/src/components/data-entry/Switch/Switch.stories.tsx b/src/components/data-entry/Switch/Switch.stories.tsx index 8b9e31ee3..0b76d640d 100644 --- a/src/components/data-entry/Switch/Switch.stories.tsx +++ b/src/components/data-entry/Switch/Switch.stories.tsx @@ -121,8 +121,8 @@ export const ExampleTextAndIcon: Story = { } - unCheckedChildren={} + checkedChildren={} + unCheckedChildren={} defaultChecked /> diff --git a/src/components/feedback/Skeleton/Skeleton.stories.tsx b/src/components/feedback/Skeleton/Skeleton.stories.tsx index 581c9e422..e34b2caf8 100644 --- a/src/components/feedback/Skeleton/Skeleton.stories.tsx +++ b/src/components/feedback/Skeleton/Skeleton.stories.tsx @@ -249,7 +249,7 @@ export const ExampleList: Story = { ? [ } text="156" key="list-vertical-star-o" />, } text="156" key="list-vertical-like-o" />, - } text="2" key="list-vertical-message" />, + } text="2" key="list-vertical-message" />, ] : undefined } @@ -276,4 +276,4 @@ export const ExampleList: Story = { ) }, -} \ No newline at end of file +} diff --git a/src/components/navigation/GlobalNavigation/GlobalNavigation.stories.tsx b/src/components/navigation/GlobalNavigation/GlobalNavigation.stories.tsx index 0f316a7dd..1360c674a 100644 --- a/src/components/navigation/GlobalNavigation/GlobalNavigation.stories.tsx +++ b/src/components/navigation/GlobalNavigation/GlobalNavigation.stories.tsx @@ -1,6 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react' import { expect, fn, screen, userEvent } from '@storybook/test' -import React, { useState } from 'react' +import React from 'react' import { Button, Center, Flex, GlobalNavigation, Icon, type INavigationCreateProps, Space } from 'src/components' import { Badge } from 'src/components/data-display/Badge/Badge' import { @@ -34,7 +34,7 @@ const defaultTools: IGlobalNavigationItem[] = [ }, { label: 'Tool 2', - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -53,13 +53,13 @@ const defaultManagement: IGlobalNavigationItem[] = [ { label: 'Notifications', hideLabel: true, - icon: , + icon: , hrefOptions: { href: '/' }, }, { label: 'Support', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -70,7 +70,7 @@ const defaultManagement: IGlobalNavigationItem[] = [ { label: 'Settings', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -163,7 +163,7 @@ export const Primary: Story = { const mpLogo: IGlobalNavigationLogo = { label: 'Data Platform', - icon: , + icon: , onSuiteLogoClick: () => { alert('Going to mP Home!') }, @@ -199,7 +199,7 @@ function Beta(label: string) { const mpTools: IGlobalNavigationItem[] = [ { label: 'Activity', - icon: , + icon: , type: 'menu', children: [ { hrefOptions: { href: '/' }, label: 'Platform Trends' }, @@ -251,7 +251,7 @@ const mpTools: IGlobalNavigationItem[] = [ }, { label: 'Setup', - icon: , + icon: , type: 'menu', children: [ { hrefOptions: { href: '/' }, label: 'Inputs' }, @@ -262,7 +262,7 @@ const mpTools: IGlobalNavigationItem[] = [ }, { label: 'Directory', - icon: , + icon: , hrefOptions: { href: '/' }, }, ] @@ -272,7 +272,7 @@ const mpManagement: IGlobalNavigationItem[] = [ isActive: true, label: 'Support', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -283,7 +283,7 @@ const mpManagement: IGlobalNavigationItem[] = [ { label: 'Settings', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { hrefOptions: { href: '/' }, label: 'Platform Settings' }, @@ -546,13 +546,13 @@ const indLogo: IGlobalNavigationLogo = { const indTools: IGlobalNavigationItem[] = [ { label: 'My Hub', - icon: , + icon: , isActive: true, hrefOptions: { href: '/' }, }, { label: 'Saved', - icon: , + icon: , hrefOptions: { href: '/' }, }, { @@ -566,7 +566,7 @@ const indManagement: IGlobalNavigationItem[] = [ { label: 'Support', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -577,7 +577,7 @@ const indManagement: IGlobalNavigationItem[] = [ { label: 'Settings', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -866,7 +866,7 @@ export const Indicative: Story = { const cortexLogo: IGlobalNavigationLogo = { label: 'Predictions', - icon: 'sparkles', + icon: 'predictions', type: 'background-solid', onSuiteLogoClick: () => { alert('Going to Predictions Home!') @@ -876,12 +876,12 @@ const cortexLogo: IGlobalNavigationLogo = { const cortexTools: IGlobalNavigationItem[] = [ { label: 'Pipelines', - icon: , + icon: , hrefOptions: { href: '/' }, }, { label: 'Projects', - icon: , + icon: , hrefOptions: { href: '/' }, isActive: true, }, @@ -892,7 +892,7 @@ const cortexTools: IGlobalNavigationItem[] = [ }, { label: 'API', - icon: , + icon: , hrefOptions: { href: '/' }, }, { @@ -906,7 +906,7 @@ const cortexManagement: IGlobalNavigationItem[] = [ { label: 'Support', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -917,7 +917,7 @@ const cortexManagement: IGlobalNavigationItem[] = [ { label: 'Settings', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -1180,49 +1180,3 @@ export const MPWithoutCustomSizeLogo: Story = { showSuiteLogo: true, }, } - -export const MPWithNavSwitcherTour: Story = { - render: () => { - const [open, setOpen] = useState(false) - - const navigationButtonItemOptions = { - label: 'Sign Out of mParticle', - onClick: () => { - alert('Signout!') - }, - } - - const mpLogoWithTour: IGlobalNavigationLogo = { - label: 'Data Platform', - icon: 'catalog', - type: 'background-solid', - onSuiteLogoClick: () => { - setOpen(currentOpen => !currentOpen) - }, - navSwitcherTourOptions: { - open, - onClose: () => { - setOpen(false) - }, - }, - } - - return ( -
- { - alert('Searching!') - }} - logo={mpLogoWithTour} - tools={mpTools} - management={mpManagement} - orgs={mpOrgs} - onMpHomeClick={() => { - alert('going to overview map') - }} - navigationButtonItemOptions={navigationButtonItemOptions} - /> -
- ) - }, -} diff --git a/src/components/navigation/GlobalNavigation/WorkspaceSelector/WorkspaceSelector.tsx b/src/components/navigation/GlobalNavigation/WorkspaceSelector/WorkspaceSelector.tsx index 456d470d0..d05ac89bc 100644 --- a/src/components/navigation/GlobalNavigation/WorkspaceSelector/WorkspaceSelector.tsx +++ b/src/components/navigation/GlobalNavigation/WorkspaceSelector/WorkspaceSelector.tsx @@ -204,7 +204,7 @@ export function WorkspaceSelector(props: IWorkspaceSelectorProps) { label: ( {workspace.label} - {workspace.isActive && } + {workspace.isActive && } ), id: workspace.id, diff --git a/src/components/navigation/Steps/Steps.stories.tsx b/src/components/navigation/Steps/Steps.stories.tsx index 14e7d093b..6c03d3454 100644 --- a/src/components/navigation/Steps/Steps.stories.tsx +++ b/src/components/navigation/Steps/Steps.stories.tsx @@ -185,7 +185,7 @@ export const ExampleIcon: Story = { { title: 'Verification', status: 'finish', - icon: , + icon: , }, { title: 'Pay', @@ -195,7 +195,7 @@ export const ExampleIcon: Story = { { title: 'Done', status: 'wait', - icon: , + icon: , }, ]} /> @@ -737,4 +737,4 @@ export const ExampleInline: Story = { ) }, -} \ No newline at end of file +} From ea94ccd35edc022b9c7f917aff845dd01691427c Mon Sep 17 00:00:00 2001 From: Gaby Zifferman Date: Fri, 9 Aug 2024 15:24:41 +0200 Subject: [PATCH 06/13] fix: icons rename some icons --- src/constants/Icons.ts | 48 ++++++++++++++++++++++++++++++++++++++++++ src/types/icons.ts | 10 +++++++++ 2 files changed, 58 insertions(+) diff --git a/src/constants/Icons.ts b/src/constants/Icons.ts index 6a27aec99..051d39945 100644 --- a/src/constants/Icons.ts +++ b/src/constants/Icons.ts @@ -95,6 +95,11 @@ export const Icons: Record = { chartLine: { light: ChartLineIcon, default: 'light', + deprecated: 'trends', + }, + trends: { + light: ChartLineIcon, + default: 'light', }, check: { light: CheckIcon, @@ -151,6 +156,11 @@ export const Icons: Record = { gear: { light: GearIcon, default: 'light', + deprecated: 'settings', + }, + settings: { + light: GearIcon, + default: 'light', }, grid: { light: GridIcon, @@ -187,6 +197,11 @@ export const Icons: Record = { messageQuestion: { light: MessageQuestionIcon, default: 'light', + deprecated: 'support', + }, + support: { + light: MessageQuestionIcon, + default: 'light', }, mpLogo: { light: MpLogoIcon, @@ -204,6 +219,10 @@ export const Icons: Record = { light: RemoveIcon, default: 'light', }, + close: { + light: RemoveIcon, + default: 'light', + }, search: { light: SearchIcon, default: 'light', @@ -215,14 +234,29 @@ export const Icons: Record = { shieldKeyhole: { light: ShieldKeyholeIcon, default: 'light', + deprecated: 'privacy', + }, + privacy: { + light: ShieldKeyholeIcon, + default: 'light', }, signout: { light: SignoutIcon, default: 'light', + deprecated: 'logout', + }, + logout: { + light: SignoutIcon, + default: 'light', }, siteMap: { 'duo-tone': DataPlatformIconDt, default: 'duo-tone', + deprecated: 'dataPlatform', + }, + dataPlatform: { + 'duo-tone': DataPlatformIconDt, + default: 'duo-tone', }, sparkles: { light: PredictionsIcon, @@ -238,6 +272,11 @@ export const Icons: Record = { split: { light: SplitIcon, default: 'light', + deprecated: 'journeys', + }, + journeys: { + light: SplitIcon, + default: 'light', }, systemAlerts: { light: SystemAlertsIcon, @@ -263,9 +302,18 @@ export const Icons: Record = { light: UsersIcon, default: 'light', }, + audiences: { + light: UsersIcon, + default: 'light', + }, wrench: { light: WrenchIcon, default: 'light', + deprecated: 'setup', + }, + setup: { + light: WrenchIcon, + default: 'light', }, zoomIn: { light: ZoomIn, diff --git a/src/types/icons.ts b/src/types/icons.ts index b106bdee4..5a7d37717 100644 --- a/src/types/icons.ts +++ b/src/types/icons.ts @@ -78,3 +78,13 @@ export type IconNames = | 'unlock' | 'notification' | 'overview' + | 'trends' + | 'settings' + | 'support' + | 'close' + | 'privacy' + | 'dataPlatform' + | 'journeys' + | 'setup' + | 'logout' + | 'audiences' From c954833023c8e7fab44aa7ceacdc2370ba55686b Mon Sep 17 00:00:00 2001 From: Gaby Zifferman Date: Fri, 9 Aug 2024 16:24:22 +0200 Subject: [PATCH 07/13] fix: icons rename --- src/constants/Icons.ts | 36 ++++++++++++++++++++++++++++++++++++ src/types/icons.ts | 7 +++++++ 2 files changed, 43 insertions(+) diff --git a/src/constants/Icons.ts b/src/constants/Icons.ts index 051d39945..564bf8af0 100644 --- a/src/constants/Icons.ts +++ b/src/constants/Icons.ts @@ -104,14 +104,29 @@ export const Icons: Record = { check: { light: CheckIcon, default: 'light', + deprecated: 'selected', + }, + selected: { + light: CheckIcon, + default: 'light', }, circleNodes: { light: CircleNodesIcon, default: 'light', + deprecated: 'pipelines', + }, + pipelines: { + light: CircleNodesIcon, + default: 'light', }, cloud: { light: CloudIcon, default: 'light', + deprecated: 'api', + }, + api: { + light: CloudIcon, + default: 'light', }, connections: { light: ConnectionsIcon, @@ -148,6 +163,11 @@ export const Icons: Record = { folderClosed: { light: FolderClosedIcon, default: 'light', + deprecated: 'savedProjects', + }, + savedProjects: { + light: FolderClosedIcon, + default: 'light', }, forwarding: { light: ForwardingIcon, @@ -165,10 +185,21 @@ export const Icons: Record = { grid: { light: GridIcon, default: 'light', + deprecated: 'myHub', + }, + myHub: { + light: GridIcon, + default: 'light', }, heart: { light: HeartIcon, default: 'light', + deprecated: 'favorite', + }, + favorite: { + light: HeartIcon, + default: 'light', + deprecated: 'favorite', }, help: { light: HelpIcon, @@ -185,6 +216,11 @@ export const Icons: Record = { lightBulb: { light: LightBulbIcon, default: 'light', + deprecated: 'insights', + }, + insights: { + light: LightBulbIcon, + default: 'light', }, liveStream: { light: LiveStreamIcon, diff --git a/src/types/icons.ts b/src/types/icons.ts index 5a7d37717..965dfb484 100644 --- a/src/types/icons.ts +++ b/src/types/icons.ts @@ -88,3 +88,10 @@ export type IconNames = | 'setup' | 'logout' | 'audiences' + | 'selected' + | 'pipelines' + | 'api' + | 'savedProjects' + | 'myHub' + | 'favorite' + | 'insights' From e8d0384196a5fdebe82052c58d4b836f3db96c15 Mon Sep 17 00:00:00 2001 From: Gaby Zifferman Date: Thu, 15 Aug 2024 15:12:23 +0200 Subject: [PATCH 08/13] fix: update deprecated icons --- src/components/general/Icon/Icon.stories.tsx | 5 +++-- src/constants/Icons.ts | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/general/Icon/Icon.stories.tsx b/src/components/general/Icon/Icon.stories.tsx index 9a17c9932..3f35db6d3 100644 --- a/src/components/general/Icon/Icon.stories.tsx +++ b/src/components/general/Icon/Icon.stories.tsx @@ -24,7 +24,7 @@ export const IconTable: React.FC = ({ color = 'black', size = 'lg', return ( -

+

{isDeprecated ? 'deprecated ' : ''} {iconName}

@@ -45,7 +45,8 @@ The \`IconTable\` component is used to display a table of all available icons in - \`variant\`: The variant of the icon. Available options are \`light\` and \`duo-tone\`. #### Updating Icons -To update the icons: + +The icon SVG and icon name are provided by the Design team. and the svg must be minified. 1. **Add New Icons**: Add the new icon SVGs to the \`src/constants/Icons\` directory. The icons should be curated by Design and the svg must be minified. 2. **Update Icon Constants**: Update the \`Icons\` object in \`src/constants/Icons\` to include the new icons. diff --git a/src/constants/Icons.ts b/src/constants/Icons.ts index 564bf8af0..28db23288 100644 --- a/src/constants/Icons.ts +++ b/src/constants/Icons.ts @@ -91,6 +91,7 @@ export const Icons: Record = { chartColumn: { light: ChartColumnIcon, default: 'light', + deprecated: 'this icon is not used anymore', }, chartLine: { light: ChartLineIcon, @@ -131,10 +132,12 @@ export const Icons: Record = { connections: { light: ConnectionsIcon, default: 'light', + deprecated: 'this icon is not used anymore', }, database: { light: DatabaseIcon, default: 'light', + deprecated: 'this icon is not used anymore', }, dsr: { light: DsrIcon, @@ -199,7 +202,6 @@ export const Icons: Record = { favorite: { light: HeartIcon, default: 'light', - deprecated: 'favorite', }, help: { light: HelpIcon, From 8db01bf9316d9a781bf715924ed70fe7e0098827 Mon Sep 17 00:00:00 2001 From: Gaby Zifferman Date: Thu, 15 Aug 2024 21:09:45 +0200 Subject: [PATCH 09/13] fix: rename icons --- .../data-display/Avatar/Avatar.stories.tsx | 2 +- .../Collapse/Collapse.stories.tsx | 2 +- .../Statistic/Statistic.stories.tsx | 8 +- .../data-entry/Switch/Switch.stories.tsx | 4 +- .../feedback/Skeleton/Skeleton.stories.tsx | 4 +- .../GlobalNavigation.stories.tsx | 88 +++++-------------- .../WorkspaceSelector/WorkspaceSelector.tsx | 2 +- .../navigation/Steps/Steps.stories.tsx | 6 +- 8 files changed, 35 insertions(+), 81 deletions(-) diff --git a/src/components/data-display/Avatar/Avatar.stories.tsx b/src/components/data-display/Avatar/Avatar.stories.tsx index ef2f303c7..51eef25d4 100644 --- a/src/components/data-display/Avatar/Avatar.stories.tsx +++ b/src/components/data-display/Avatar/Avatar.stories.tsx @@ -37,7 +37,7 @@ const meta: Meta = { options: ['Users', 'Sparkles'], mapping: { Users: , - Sparkles: , + Sparkles: , }, }, }, diff --git a/src/components/data-display/Collapse/Collapse.stories.tsx b/src/components/data-display/Collapse/Collapse.stories.tsx index 8a1f62e48..ff608aeb6 100644 --- a/src/components/data-display/Collapse/Collapse.stories.tsx +++ b/src/components/data-display/Collapse/Collapse.stories.tsx @@ -339,7 +339,7 @@ export const ExampleExtraNode: Story = { // If you don't want click extra trigger collapse, you can prevent this: event.stopPropagation() }}> - + ) diff --git a/src/components/data-display/Statistic/Statistic.stories.tsx b/src/components/data-display/Statistic/Statistic.stories.tsx index c3c8d88c4..5cb11ad6a 100644 --- a/src/components/data-display/Statistic/Statistic.stories.tsx +++ b/src/components/data-display/Statistic/Statistic.stories.tsx @@ -37,9 +37,9 @@ const meta: Meta = { control: 'select', options: ['check', 'alicorn', 'wrench'], mapping: { - check: , + check: , alicorn: , - wrench: , + wrench: , }, }, suffix: { @@ -96,7 +96,7 @@ export const CustomPrecision: Story = { export const CustomPrefix: Story = { args: { - prefix: , + prefix: , }, } @@ -194,7 +194,7 @@ export const ExampleWithCard: Story = { value={9.3} precision={2} valueStyle={{ color: ColorError }} - prefix={} + prefix={} suffix="%" /> diff --git a/src/components/data-entry/Switch/Switch.stories.tsx b/src/components/data-entry/Switch/Switch.stories.tsx index 8b9e31ee3..0b76d640d 100644 --- a/src/components/data-entry/Switch/Switch.stories.tsx +++ b/src/components/data-entry/Switch/Switch.stories.tsx @@ -121,8 +121,8 @@ export const ExampleTextAndIcon: Story = { } - unCheckedChildren={} + checkedChildren={} + unCheckedChildren={} defaultChecked /> diff --git a/src/components/feedback/Skeleton/Skeleton.stories.tsx b/src/components/feedback/Skeleton/Skeleton.stories.tsx index 581c9e422..e34b2caf8 100644 --- a/src/components/feedback/Skeleton/Skeleton.stories.tsx +++ b/src/components/feedback/Skeleton/Skeleton.stories.tsx @@ -249,7 +249,7 @@ export const ExampleList: Story = { ? [ } text="156" key="list-vertical-star-o" />, } text="156" key="list-vertical-like-o" />, - } text="2" key="list-vertical-message" />, + } text="2" key="list-vertical-message" />, ] : undefined } @@ -276,4 +276,4 @@ export const ExampleList: Story = { ) }, -} \ No newline at end of file +} diff --git a/src/components/navigation/GlobalNavigation/GlobalNavigation.stories.tsx b/src/components/navigation/GlobalNavigation/GlobalNavigation.stories.tsx index 0f316a7dd..1360c674a 100644 --- a/src/components/navigation/GlobalNavigation/GlobalNavigation.stories.tsx +++ b/src/components/navigation/GlobalNavigation/GlobalNavigation.stories.tsx @@ -1,6 +1,6 @@ import { type Meta, type StoryObj } from '@storybook/react' import { expect, fn, screen, userEvent } from '@storybook/test' -import React, { useState } from 'react' +import React from 'react' import { Button, Center, Flex, GlobalNavigation, Icon, type INavigationCreateProps, Space } from 'src/components' import { Badge } from 'src/components/data-display/Badge/Badge' import { @@ -34,7 +34,7 @@ const defaultTools: IGlobalNavigationItem[] = [ }, { label: 'Tool 2', - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -53,13 +53,13 @@ const defaultManagement: IGlobalNavigationItem[] = [ { label: 'Notifications', hideLabel: true, - icon: , + icon: , hrefOptions: { href: '/' }, }, { label: 'Support', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -70,7 +70,7 @@ const defaultManagement: IGlobalNavigationItem[] = [ { label: 'Settings', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -163,7 +163,7 @@ export const Primary: Story = { const mpLogo: IGlobalNavigationLogo = { label: 'Data Platform', - icon: , + icon: , onSuiteLogoClick: () => { alert('Going to mP Home!') }, @@ -199,7 +199,7 @@ function Beta(label: string) { const mpTools: IGlobalNavigationItem[] = [ { label: 'Activity', - icon: , + icon: , type: 'menu', children: [ { hrefOptions: { href: '/' }, label: 'Platform Trends' }, @@ -251,7 +251,7 @@ const mpTools: IGlobalNavigationItem[] = [ }, { label: 'Setup', - icon: , + icon: , type: 'menu', children: [ { hrefOptions: { href: '/' }, label: 'Inputs' }, @@ -262,7 +262,7 @@ const mpTools: IGlobalNavigationItem[] = [ }, { label: 'Directory', - icon: , + icon: , hrefOptions: { href: '/' }, }, ] @@ -272,7 +272,7 @@ const mpManagement: IGlobalNavigationItem[] = [ isActive: true, label: 'Support', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -283,7 +283,7 @@ const mpManagement: IGlobalNavigationItem[] = [ { label: 'Settings', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { hrefOptions: { href: '/' }, label: 'Platform Settings' }, @@ -546,13 +546,13 @@ const indLogo: IGlobalNavigationLogo = { const indTools: IGlobalNavigationItem[] = [ { label: 'My Hub', - icon: , + icon: , isActive: true, hrefOptions: { href: '/' }, }, { label: 'Saved', - icon: , + icon: , hrefOptions: { href: '/' }, }, { @@ -566,7 +566,7 @@ const indManagement: IGlobalNavigationItem[] = [ { label: 'Support', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -577,7 +577,7 @@ const indManagement: IGlobalNavigationItem[] = [ { label: 'Settings', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -866,7 +866,7 @@ export const Indicative: Story = { const cortexLogo: IGlobalNavigationLogo = { label: 'Predictions', - icon: 'sparkles', + icon: 'predictions', type: 'background-solid', onSuiteLogoClick: () => { alert('Going to Predictions Home!') @@ -876,12 +876,12 @@ const cortexLogo: IGlobalNavigationLogo = { const cortexTools: IGlobalNavigationItem[] = [ { label: 'Pipelines', - icon: , + icon: , hrefOptions: { href: '/' }, }, { label: 'Projects', - icon: , + icon: , hrefOptions: { href: '/' }, isActive: true, }, @@ -892,7 +892,7 @@ const cortexTools: IGlobalNavigationItem[] = [ }, { label: 'API', - icon: , + icon: , hrefOptions: { href: '/' }, }, { @@ -906,7 +906,7 @@ const cortexManagement: IGlobalNavigationItem[] = [ { label: 'Support', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -917,7 +917,7 @@ const cortexManagement: IGlobalNavigationItem[] = [ { label: 'Settings', hideLabel: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -1180,49 +1180,3 @@ export const MPWithoutCustomSizeLogo: Story = { showSuiteLogo: true, }, } - -export const MPWithNavSwitcherTour: Story = { - render: () => { - const [open, setOpen] = useState(false) - - const navigationButtonItemOptions = { - label: 'Sign Out of mParticle', - onClick: () => { - alert('Signout!') - }, - } - - const mpLogoWithTour: IGlobalNavigationLogo = { - label: 'Data Platform', - icon: 'catalog', - type: 'background-solid', - onSuiteLogoClick: () => { - setOpen(currentOpen => !currentOpen) - }, - navSwitcherTourOptions: { - open, - onClose: () => { - setOpen(false) - }, - }, - } - - return ( -
- { - alert('Searching!') - }} - logo={mpLogoWithTour} - tools={mpTools} - management={mpManagement} - orgs={mpOrgs} - onMpHomeClick={() => { - alert('going to overview map') - }} - navigationButtonItemOptions={navigationButtonItemOptions} - /> -
- ) - }, -} diff --git a/src/components/navigation/GlobalNavigation/WorkspaceSelector/WorkspaceSelector.tsx b/src/components/navigation/GlobalNavigation/WorkspaceSelector/WorkspaceSelector.tsx index 456d470d0..d05ac89bc 100644 --- a/src/components/navigation/GlobalNavigation/WorkspaceSelector/WorkspaceSelector.tsx +++ b/src/components/navigation/GlobalNavigation/WorkspaceSelector/WorkspaceSelector.tsx @@ -204,7 +204,7 @@ export function WorkspaceSelector(props: IWorkspaceSelectorProps) { label: ( {workspace.label} - {workspace.isActive && } + {workspace.isActive && } ), id: workspace.id, diff --git a/src/components/navigation/Steps/Steps.stories.tsx b/src/components/navigation/Steps/Steps.stories.tsx index 14e7d093b..6c03d3454 100644 --- a/src/components/navigation/Steps/Steps.stories.tsx +++ b/src/components/navigation/Steps/Steps.stories.tsx @@ -185,7 +185,7 @@ export const ExampleIcon: Story = { { title: 'Verification', status: 'finish', - icon: , + icon: , }, { title: 'Pay', @@ -195,7 +195,7 @@ export const ExampleIcon: Story = { { title: 'Done', status: 'wait', - icon: , + icon: , }, ]} /> @@ -737,4 +737,4 @@ export const ExampleInline: Story = { ) }, -} \ No newline at end of file +} From 5832fdafc17e4e382de0dfa40499fa0428723a91 Mon Sep 17 00:00:00 2001 From: mparticle-automation Date: Thu, 15 Aug 2024 13:41:47 +0000 Subject: [PATCH 10/13] chore(release): 1.27.1-fix-icons-name.1 [skip ci] ## [1.27.1-fix-icons-name.1](https://github.com/mParticle/aquarium/compare/v1.27.0...v1.27.1-fix-icons-name.1) (2024-08-15) ### Bug Fixes * icons rename ([d4bc4db](https://github.com/mParticle/aquarium/commit/d4bc4db9c27c641820afb3b650cb74ac527fc61f)) * icons rename some icons ([8e3d310](https://github.com/mParticle/aquarium/commit/8e3d310f1bf34ab06d802b03de7004d8b7cdb78f)) * update deprecated icons ([a84954d](https://github.com/mParticle/aquarium/commit/a84954d5cdbb682efa280552d6c8d4b63147f671)) --- CHANGELOG.md | 8 ++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b90b6121..87c902bca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [1.27.1-fix-icons-name.1](https://github.com/mParticle/aquarium/compare/v1.27.0...v1.27.1-fix-icons-name.1) (2024-08-15) + +### Bug Fixes + +- icons rename ([d4bc4db](https://github.com/mParticle/aquarium/commit/d4bc4db9c27c641820afb3b650cb74ac527fc61f)) +- icons rename some icons ([8e3d310](https://github.com/mParticle/aquarium/commit/8e3d310f1bf34ab06d802b03de7004d8b7cdb78f)) +- update deprecated icons ([a84954d](https://github.com/mParticle/aquarium/commit/a84954d5cdbb682efa280552d6c8d4b63147f671)) + # [1.27.0](https://github.com/mParticle/aquarium/compare/v1.26.0...v1.27.0) (2024-08-14) ### Bug Fixes diff --git a/package-lock.json b/package-lock.json index c3d0f4d47..75f708955 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mparticle/aquarium", - "version": "1.27.0", + "version": "1.27.1-fix-icons-name.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@mparticle/aquarium", - "version": "1.27.0", + "version": "1.27.1-fix-icons-name.1", "license": "Apache-2.0", "dependencies": { "lodash.clonedeep": "4.5.0" diff --git a/package.json b/package.json index 5fcd933df..ff7473ec4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mparticle/aquarium", - "version": "1.27.0", + "version": "1.27.1-fix-icons-name.1", "description": "mParticle Component Library", "license": "Apache-2.0", "keywords": [ From cd70700274028e766623b4d75d568ab376688d84 Mon Sep 17 00:00:00 2001 From: Gaby Zifferman Date: Mon, 19 Aug 2024 14:03:04 +0200 Subject: [PATCH 11/13] fix: merge main correctly --- .../GlobalNavigation/GlobalNavigation.tsx | 6 +- .../GlobalNavigation/HomeButton.tsx | 58 +------------- .../navigation/GlobalNavigation/SuiteLogo.tsx | 75 ++++++++++++++++--- src/components/navigation/MiniMap/MiniMap.tsx | 10 +-- 4 files changed, 75 insertions(+), 74 deletions(-) diff --git a/src/components/navigation/GlobalNavigation/GlobalNavigation.tsx b/src/components/navigation/GlobalNavigation/GlobalNavigation.tsx index ae68ca8db..5ae753e05 100644 --- a/src/components/navigation/GlobalNavigation/GlobalNavigation.tsx +++ b/src/components/navigation/GlobalNavigation/GlobalNavigation.tsx @@ -53,7 +53,7 @@ export const GlobalNavigation = ({ showSuiteLogo = true, ...props }: IGlobalNavi
{showSuiteLogo && ( <> - +
)} @@ -82,9 +82,7 @@ export const GlobalNavigation = ({ showSuiteLogo = true, ...props }: IGlobalNavi /> ) )} - {!props.hideMpHome && ( - - )} + {!props.hideMpHome && }
diff --git a/src/components/navigation/GlobalNavigation/HomeButton.tsx b/src/components/navigation/GlobalNavigation/HomeButton.tsx index 31253d12f..82617ee2a 100644 --- a/src/components/navigation/GlobalNavigation/HomeButton.tsx +++ b/src/components/navigation/GlobalNavigation/HomeButton.tsx @@ -1,22 +1,15 @@ -import React, { useState } from 'react' -import { Center, Icon, Popover, Tooltip } from 'src/components' -import MiniMap from 'src/components/navigation/MiniMap/MiniMap' -import { IMiniMapOptions, MiniMapLink } from 'src/components/navigation/GlobalNavigation/GlobalNavigationItems' +import React from 'react' +import { Center, Icon, Tooltip } from 'src/components' interface MpHomeButtonProps { onClick: () => void } -interface MinimapWithPopoverProps extends IMiniMapOptions { - onPopoverClick: () => void -} - interface TooltipWithButtonProps { onTooltipClick: () => void } interface HomeButtonProps { - minimapOptions?: IMiniMapOptions onMpHomeClick: () => void } @@ -28,37 +21,6 @@ function MpHomeButton(props: MpHomeButtonProps) { ) } -function MinimapWithPopover(props: MinimapWithPopoverProps) { - const [isPopoverOpen, setIsPopoverOpen] = useState(false) - const handleLinkClick = (link: MiniMapLink) => { - setIsPopoverOpen(false) - props.onLinkClick(link) - } - const handlePopoverOpenChange = (newPopoverState: boolean) => { - setIsPopoverOpen(newPopoverState) - } - - return ( - - } - placement="rightBottom" - open={isPopoverOpen} - onOpenChange={handlePopoverOpenChange} - arrow={false}> - - - ) -} - function TooltipWithButton(props: TooltipWithButtonProps) { return ( @@ -68,19 +30,5 @@ function TooltipWithButton(props: TooltipWithButtonProps) { } export function HomeButton(props: HomeButtonProps) { - if (!props.minimapOptions) { - return - } - - return ( - - ) + return } diff --git a/src/components/navigation/GlobalNavigation/SuiteLogo.tsx b/src/components/navigation/GlobalNavigation/SuiteLogo.tsx index f0e39f858..630482357 100644 --- a/src/components/navigation/GlobalNavigation/SuiteLogo.tsx +++ b/src/components/navigation/GlobalNavigation/SuiteLogo.tsx @@ -1,16 +1,23 @@ -import React, { type ReactNode, useRef } from 'react' -import { Center, Icon, type ITourProps, Tour } from 'src/components' +import React, { type ReactNode, useRef, useState } from 'react' +import { Center, Icon, type ITourProps, Popover, Tour } from 'src/components' import { NavigationIcon } from 'src/components/navigation/GlobalNavigation/NavigationIcon' +import MiniMap from 'src/components/navigation/MiniMap/MiniMap' import { type Icons } from 'src/constants/Icons' import { type IGlobalNavigationLogo, + type IMiniMapOptions, type INavSwitcherTourOptions, + type MiniMapLink, } from 'src/components/navigation/GlobalNavigation/GlobalNavigationItems' import { type IconColor } from 'src/components/general/Icon/Icon' // custom-size is the default size to prevent breaking changes. type IconColorOptions = 'default' | 'background-solid' | 'custom-size' +interface SuiteLogoProps extends IGlobalNavigationLogo { + minimapOptions?: IMiniMapOptions +} + function isStringIcon(icon: ReactNode | string): icon is keyof typeof Icons { return typeof icon === 'string' } @@ -21,18 +28,68 @@ export function SuiteLogo({ type = 'custom-size', onSuiteLogoClick, navSwitcherTourOptions, -}: IGlobalNavigationLogo) { + minimapOptions, +}: SuiteLogoProps) { const logoRef = useRef(null) + if (!minimapOptions || navSwitcherTourOptions?.open) { + return + } + return ( - <> -
- {renderNavLogo()} - {navSwitcherTourOptions && renderNavTour(navSwitcherTourOptions)} -
- + ) + function SuiteLogoContent() { + return ( + <> +
+ {renderNavLogo()} + {navSwitcherTourOptions && renderNavTour(navSwitcherTourOptions)} +
+ + ) + } + + function MinimapWithPopover(props: IMiniMapOptions) { + const [isPopoverOpen, setIsPopoverOpen] = useState(false) + const handleLinkClick = (link: MiniMapLink) => { + setIsPopoverOpen(false) + props.onLinkClick(link) + } + const handlePopoverOpenChange = (newPopoverState: boolean) => { + setIsPopoverOpen(newPopoverState) + } + + return ( + + } + placement="bottomLeft" + open={isPopoverOpen} + trigger="hover" + onOpenChange={handlePopoverOpenChange} + arrow={false}> + + + ) + } + function renderNavLogo() { const classMap = { default: '', diff --git a/src/components/navigation/MiniMap/MiniMap.tsx b/src/components/navigation/MiniMap/MiniMap.tsx index ec6479b1d..7759eea12 100644 --- a/src/components/navigation/MiniMap/MiniMap.tsx +++ b/src/components/navigation/MiniMap/MiniMap.tsx @@ -2,7 +2,6 @@ import 'src/styles/_variables.css' import './miniMap.css' import React from 'react' import { Button, ConfigProvider } from 'src/components' -import Logo from 'src/assets/svg/mp-logo-wordmark.svg?react' import { minimap } from './minimap-svg' import { Flex } from 'src/components/layout/Flex/Flex' import { type ISvgLink, SvgLinker } from 'src/components/navigation/MiniMap/SvgLinker' @@ -33,15 +32,14 @@ const Minimap = (props: IMiniMapProps) => { return ( -
+
- - - - {minimap} + + +
From 24b072d52e8448f71d1deca494aeb0c816c04ad4 Mon Sep 17 00:00:00 2001 From: Gaby Zifferman Date: Mon, 19 Aug 2024 14:10:48 +0200 Subject: [PATCH 12/13] fix: cleanup w main - undo changelong --- CHANGELOG.md | 8 +++----- package-lock.json | 4 ++-- package.json | 2 +- src/utils/utils.css | 4 ++++ 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87c902bca..0183014b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,8 @@ -## [1.27.1-fix-icons-name.1](https://github.com/mParticle/aquarium/compare/v1.27.0...v1.27.1-fix-icons-name.1) (2024-08-15) +# [1.28.0](https://github.com/mParticle/aquarium/compare/v1.27.0...v1.28.0) (2024-08-15) -### Bug Fixes +### Features -- icons rename ([d4bc4db](https://github.com/mParticle/aquarium/commit/d4bc4db9c27c641820afb3b650cb74ac527fc61f)) -- icons rename some icons ([8e3d310](https://github.com/mParticle/aquarium/commit/8e3d310f1bf34ab06d802b03de7004d8b7cdb78f)) -- update deprecated icons ([a84954d](https://github.com/mParticle/aquarium/commit/a84954d5cdbb682efa280552d6c8d4b63147f671)) +- move minimap to suite logo ([#369](https://github.com/mParticle/aquarium/issues/369)) ([f2d2437](https://github.com/mParticle/aquarium/commit/f2d2437dfe777e5c1db75346913448513581b3b5)) # [1.27.0](https://github.com/mParticle/aquarium/compare/v1.26.0...v1.27.0) (2024-08-14) diff --git a/package-lock.json b/package-lock.json index 75f708955..df0bd7c01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mparticle/aquarium", - "version": "1.27.1-fix-icons-name.1", + "version": "1.28.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@mparticle/aquarium", - "version": "1.27.1-fix-icons-name.1", + "version": "1.28.0", "license": "Apache-2.0", "dependencies": { "lodash.clonedeep": "4.5.0" diff --git a/package.json b/package.json index ff7473ec4..123ebadf3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mparticle/aquarium", - "version": "1.27.1-fix-icons-name.1", + "version": "1.28.0", "description": "mParticle Component Library", "license": "Apache-2.0", "keywords": [ diff --git a/src/utils/utils.css b/src/utils/utils.css index 42be1f621..4933ea6a9 100644 --- a/src/utils/utils.css +++ b/src/utils/utils.css @@ -17,3 +17,7 @@ .u-padding-sm { padding:var(--padding-sm) !important; } + +.u-padding-xxs { + padding: var(--padding-xxs) !important; +} \ No newline at end of file From 6acd151be1bf4ce62b3545387af075676a79c31f Mon Sep 17 00:00:00 2001 From: Gaby Zifferman Date: Mon, 19 Aug 2024 14:40:12 +0200 Subject: [PATCH 13/13] fix: replace deprecated icons in stories --- src/components/general/Button/Button.stories.tsx | 2 +- src/components/general/Icon/Icon.tsx | 2 +- .../navigation/GlobalNavigation/GlobalNavigation.stories.tsx | 4 ++-- src/constants/Icons.ts | 4 +--- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/components/general/Button/Button.stories.tsx b/src/components/general/Button/Button.stories.tsx index e5618ec62..5aed7f238 100644 --- a/src/components/general/Button/Button.stories.tsx +++ b/src/components/general/Button/Button.stories.tsx @@ -131,7 +131,7 @@ export const WithIconDefaultColorSM: Story = { export const RoundIconButton: Story = { args: { - icon: , + icon: , children: ' ', type: 'default', shape: 'round', diff --git a/src/components/general/Icon/Icon.tsx b/src/components/general/Icon/Icon.tsx index 9a34515cb..1e2ce7342 100644 --- a/src/components/general/Icon/Icon.tsx +++ b/src/components/general/Icon/Icon.tsx @@ -29,7 +29,7 @@ export const Icon: React.FC = ({ name, color = 'default', size = 'lg const icon: IconOptions = Icons[name] if (icon?.deprecated) { - console.warn(`Icon with name "${name}" is deprecated. Please use ${icon?.deprecated} instead.`) + console.warn(`Icon with name "${name}" is deprecated. Please use "${icon?.deprecated}" instead.`) } const iconVariant = variant ?? icon.default diff --git a/src/components/navigation/GlobalNavigation/GlobalNavigation.stories.tsx b/src/components/navigation/GlobalNavigation/GlobalNavigation.stories.tsx index 97a420a41..787009a9a 100644 --- a/src/components/navigation/GlobalNavigation/GlobalNavigation.stories.tsx +++ b/src/components/navigation/GlobalNavigation/GlobalNavigation.stories.tsx @@ -25,7 +25,7 @@ const defaultTools: IGlobalNavigationItem[] = [ { label: 'Tool 1', isActive: true, - icon: , + icon: , type: 'menu', children: [ { label: 'option 1', hrefOptions: { href: '/' } }, @@ -898,7 +898,7 @@ const cortexTools: IGlobalNavigationItem[] = [ }, { label: 'Insights', - icon: , + icon: , hrefOptions: { href: '/' }, }, ] diff --git a/src/constants/Icons.ts b/src/constants/Icons.ts index 28db23288..65802bc65 100644 --- a/src/constants/Icons.ts +++ b/src/constants/Icons.ts @@ -91,7 +91,7 @@ export const Icons: Record = { chartColumn: { light: ChartColumnIcon, default: 'light', - deprecated: 'this icon is not used anymore', + deprecated: 'trends', }, chartLine: { light: ChartLineIcon, @@ -132,12 +132,10 @@ export const Icons: Record = { connections: { light: ConnectionsIcon, default: 'light', - deprecated: 'this icon is not used anymore', }, database: { light: DatabaseIcon, default: 'light', - deprecated: 'this icon is not used anymore', }, dsr: { light: DsrIcon,