SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
chore: migrate Avatar from antd to signozhq/ui Avatar (#11478)
Manika Malhotrac074d0984225
diff --git a/frontend/package.json b/frontend/package.jsonindex 6fa0c103b9..bdd75409eb 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -50,7 +50,7 @@"@signozhq/design-tokens": "2.1.4","@signozhq/icons": "0.4.0","@signozhq/resizable": "0.0.2",- "@signozhq/ui": "0.0.22",+ "@signozhq/ui": "0.0.23","@tanstack/react-table": "8.21.3","@tanstack/react-virtual": "3.13.22","@uiw/codemirror-theme-copilot": "4.23.11",diff --git a/frontend/plugins/rules/no-antd-components.mjs b/frontend/plugins/rules/no-antd-components.mjsindex 10baf980fe..fbf342f6b8 100644--- a/frontend/plugins/rules/no-antd-components.mjs+++ b/frontend/plugins/rules/no-antd-components.mjs@@ -19,6 +19,7 @@ const BANNED_COMPONENTS = {Switch: 'Use @signozhq/ui/switch Switch instead of antd Switch.',Badge: 'Use @signozhq/ui/badge instead of antd Badge.',Progress: 'Use @signozhq/ui/progress instead of antd Progress.',+ Avatar: 'Use @signozhq/ui/avatar instead of antd Avatar.',};export default {diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yamlindex e0ed2139fd..fd0b32e19e 100644--- a/frontend/pnpm-lock.yaml+++ b/frontend/pnpm-lock.yaml@@ -77,8 +77,8 @@ importers:specifier: 0.0.2'@signozhq/ui':- specifier: 0.0.22- version: 0.0.22(@emotion/[email protected])(@signozhq/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected]([email protected]))([email protected]([email protected]))([email protected])+ specifier: 0.0.23+ version: 0.0.23(@emotion/[email protected])(@signozhq/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected]([email protected]))([email protected]([email protected]))([email protected])'@tanstack/react-table':specifier: 8.21.3@@ -3279,8 +3279,8 @@ packages:peerDependencies:react: ^18.2.0- '@signozhq/[email protected]':- resolution: {integrity: sha512-CJDyA4H+uXG/U2/d7/nRMNY6WIW0YWc843mfzUQALjm+xOhbO4T+qt67THjV4s1wTMs1cZLkmScbMddf+hXLIQ==}+ '@signozhq/[email protected]':+ resolution: {integrity: sha512-JqIYlVHksPf07rLGWm1mgV+qpaTFfXIrXUdW0YsDN57wnW5Mu2TaMcertegJVJz/XK/sWcUVVCGXwmx1F//wqQ==}peerDependencies:'@signozhq/icons': 0.3.0react: ^18.2.0@@ -12041,7 +12041,7 @@ snapshots:- react-dom- tailwindcss- '@signozhq/[email protected](@emotion/[email protected])(@signozhq/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected]([email protected]))([email protected]([email protected]))([email protected])':+ '@signozhq/[email protected](@emotion/[email protected])(@signozhq/[email protected])(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected]([email protected]))([email protected]([email protected]))([email protected])':dependencies:'@chenglou/pretext': 0.0.5'@radix-ui/react-checkbox': 1.3.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])diff --git a/frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/FormFields/TypeSelect.tsx b/frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/FormFields/TypeSelect.tsxindex 0e89853477..ca14316184 100644--- a/frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/FormFields/TypeSelect.tsx+++ b/frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/FormFields/TypeSelect.tsx@@ -15,7 +15,7 @@ function TypeSelect({ onChange, value }: TypeSelectProps): JSX.Element {return (<ProcessorTypeWrapper>- <PipelineIndexIcon size="small">1</PipelineIndexIcon>+ <PipelineIndexIcon>1</PipelineIndexIcon><ProcessorTypeContainer><ProcessorType>{t('processor_type')}</ProcessorType><StyledSelectdiff --git a/frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/ProcessorForm.tsx b/frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/ProcessorForm.tsxindex 12156c5752..948c687753 100644--- a/frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/ProcessorForm.tsx+++ b/frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/ProcessorForm.tsx@@ -76,9 +76,7 @@ function ProcessorFieldInput({}>{!fieldData?.compact && (- <PipelineIndexIcon size="small">- {Number(fieldData.id) + 1}- </PipelineIndexIcon>+ <PipelineIndexIcon>{Number(fieldData.id) + 1}</PipelineIndexIcon>)}<FormWrapper>{fieldData.name === 'enable_flattening' ? (diff --git a/frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/styles.ts b/frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/styles.tsxsimilarity index 71%rename from frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/styles.tsrename to frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/styles.tsxindex 585ad6284b..1069ca8e8f 100644--- a/frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/styles.ts+++ b/frontend/src/container/PipelinePage/PipelineListsView/AddNewProcessor/styles.tsx@@ -1,14 +1,15 @@-import { Avatar, Select } from 'antd';-import { themeColors } from 'constants/theme';+import { ReactNode } from 'react';+import { Badge } from '@signozhq/ui/badge';+import { Select } from 'antd';import styled from 'styled-components';-export const PipelineIndexIcon = styled(Avatar)`- background-color: ${themeColors.navyBlue};- height: 1.5rem;- width: 1.5rem;- font-size: 0.875rem;- line-height: 1.375rem;-`;+export function PipelineIndexIcon({+ children,+}: {+ children: ReactNode;+}): JSX.Element {+ return <Badge color="robin">{children}</Badge>;+}export const ProcessorTypeWrapper = styled.div`display: flex;diff --git a/frontend/src/container/PipelinePage/PipelineListsView/styles.ts b/frontend/src/container/PipelinePage/PipelineListsView/styles.tsxsimilarity index 88%rename from frontend/src/container/PipelinePage/PipelineListsView/styles.tsrename to frontend/src/container/PipelinePage/PipelineListsView/styles.tsxindex 5e7628431c..58c0d2f902 100644--- a/frontend/src/container/PipelinePage/PipelineListsView/styles.ts+++ b/frontend/src/container/PipelinePage/PipelineListsView/styles.tsx@@ -1,4 +1,6 @@-import { Avatar, Button, Table, TableProps } from 'antd';+import { ReactNode } from 'react';+import { Badge } from '@signozhq/ui/badge';+import { Button, Table, TableProps } from 'antd';import { Typography } from '@signozhq/ui/typography';import { themeColors } from 'constants/theme';import { StyledCSS } from 'container/GantChart/Trace/styles';@@ -34,14 +36,13 @@ export const ListDataStyle = styled.div`line-height: 1.25rem;`;-export const ProcessorIndexIcon = styled(Avatar)`- background-color: ${themeColors.navyBlue};- height: 1rem;- width: 1rem;- font-size: 0.75rem;- line-height: 0.813rem;- font-weight: 400;-`;+export function ProcessorIndexIcon({+ children,+}: {+ children: ReactNode;+}): JSX.Element {+ return <Badge color="robin">{children}</Badge>;+}export const StyledTable: React.FC<TableProps<any> & { isDarkMode: boolean }> =styled(Table)`diff --git a/frontend/src/container/PipelinePage/tests/__snapshots__/PipelineExpandView.test.tsx.snap b/frontend/src/container/PipelinePage/tests/__snapshots__/PipelineExpandView.test.tsx.snapindex 314550b437..84085c24bf 100644--- a/frontend/src/container/PipelinePage/tests/__snapshots__/PipelineExpandView.test.tsx.snap+++ b/frontend/src/container/PipelinePage/tests/__snapshots__/PipelineExpandView.test.tsx.snap@@ -2,7 +2,7 @@exports[`PipelinePage should render PipelineExpandView section 1`] = `<DocumentFragment>- .c2 {+ .c1 {margin: 0.125rem;padding: 0.313rem;border: none;@@ -12,15 +12,6 @@ exports[`PipelinePage should render PipelineExpandView section 1`] = `line-height: 1.25rem;}-.c1 {- background-color: #1668DC;- height: 1rem;- width: 1rem;- font-size: 0.75rem;- line-height: 0.813rem;- font-weight: 400;-}-.c0 .ant-table-tbody > tr > td {border: none;}@@ -72,14 +63,13 @@ exports[`PipelinePage should render PipelineExpandView section 1`] = `style="text-align: right;"><span- class="ant-avatar ant-avatar-circle c1 css-dev-only-do-not-override-2i2tap"+ class="_badge_1etd5_1"+ data-capitalize="false"+ data-color="robin"+ data-slot="badge"+ data-variant="default">- <span- class="ant-avatar-string"- style="transform: scale(1) translateX(-50%);"- >- 1- </span>+ 1</span></td><td@@ -87,7 +77,7 @@ exports[`PipelinePage should render PipelineExpandView section 1`] = `style="text-align: left;"><div- class="c2"+ class="c1">grok use common asd</div>@@ -103,14 +93,13 @@ exports[`PipelinePage should render PipelineExpandView section 1`] = `style="text-align: right;"><span- class="ant-avatar ant-avatar-circle c1 css-dev-only-do-not-override-2i2tap"+ class="_badge_1etd5_1"+ data-capitalize="false"+ data-color="robin"+ data-slot="badge"+ data-variant="default">- <span- class="ant-avatar-string"- style="transform: scale(1) translateX(-50%);"- >- 2- </span>+ 2</span></td><td@@ -118,7 +107,7 @@ exports[`PipelinePage should render PipelineExpandView section 1`] = `style="text-align: left;"><div- class="c2"+ class="c1">rename auth</div>@@ -134,14 +123,13 @@ exports[`PipelinePage should render PipelineExpandView section 1`] = `style="text-align: right;"><span- class="ant-avatar ant-avatar-circle c1 css-dev-only-do-not-override-2i2tap"+ class="_badge_1etd5_1"+ data-capitalize="false"+ data-color="robin"+ data-slot="badge"+ data-variant="default">- <span- class="ant-avatar-string"- style="transform: scale(1) translateX(-50%);"- >- 3- </span>+ 3</span></td><td@@ -149,7 +137,7 @@ exports[`PipelinePage should render PipelineExpandView section 1`] = `style="text-align: left;"><div- class="c2"+ class="c1">json parser</div>diff --git a/frontend/src/pages/WorkspaceLocked/CustomerStoryCard.tsx b/frontend/src/pages/WorkspaceLocked/CustomerStoryCard.tsxindex e14f4209a2..8e2033fd91 100644--- a/frontend/src/pages/WorkspaceLocked/CustomerStoryCard.tsx+++ b/frontend/src/pages/WorkspaceLocked/CustomerStoryCard.tsx@@ -1,4 +1,5 @@-import { Avatar, Card, Space } from 'antd';+import { Avatar } from '@signozhq/ui/avatar';+import { Card, Space } from 'antd';import './customerStoryCard.styles.scss';@@ -22,7 +23,7 @@ function CustomerStoryCard({<Card className="customer-story-card"><Space size="middle" direction="vertical"><Card.Meta- avatar={<Avatar size={48} src={avatar} />}+ avatar={<Avatar size="xl" src={avatar} />}title={personName}description={role}/>