Skip to content

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.

chore: replace antd badge with signozhq badge (#11377)

Manika Malhotrab753b95a8aa1
diff --git a/frontend/plugins/rules/no-antd-components.mjs b/frontend/plugins/rules/no-antd-components.mjs
index 74e632881f..8135816df1 100644
--- a/frontend/plugins/rules/no-antd-components.mjs
+++ b/frontend/plugins/rules/no-antd-components.mjs
@@ -15,6 +15,7 @@
const BANNED_COMPONENTS = {
Typography: 'Use @signozhq/ui Typography instead of antd Typography.',
+ Badge: 'Use @signozhq/ui/badge instead of antd Badge.',
};
export default {
diff --git a/frontend/src/container/NewExplorerCTA/NewExplorerCTA.styles.scss b/frontend/src/container/NewExplorerCTA/NewExplorerCTA.styles.scss
index 97df734e05..3a36eed052 100644
--- a/frontend/src/container/NewExplorerCTA/NewExplorerCTA.styles.scss
+++ b/frontend/src/container/NewExplorerCTA/NewExplorerCTA.styles.scss
@@ -1,17 +1,5 @@
-.new-explorer-cta {
- display: flex;
+.new-explorer-cta-with-badge {
+ display: inline-flex;
align-items: center;
- color: var(--muted-foreground);
-
- /* Bifrost (Ancient)/Content/sm */
- font-family: Inter;
- font-size: 12px;
- font-style: normal;
- font-weight: 400;
- line-height: 20px; /* 142.857% */
- letter-spacing: -0.07px;
-
- .ant-btn-icon {
- margin-inline-end: 0px;
- }
+ gap: 6px;
}
diff --git a/frontend/src/container/NewExplorerCTA/config.ts b/frontend/src/container/NewExplorerCTA/config.ts
index 2a0ca9fa8e..dde8845758 100644
--- a/frontend/src/container/NewExplorerCTA/config.ts
+++ b/frontend/src/container/NewExplorerCTA/config.ts
@@ -1,9 +1,5 @@
import ROUTES from 'constants/routes';
-export const RIBBON_STYLES = {
- top: '-0.75rem',
-};
-
export const buttonText: Record<string, string> = {
[ROUTES.LOGS_EXPLORER]: 'Old Explorer',
[ROUTES.TRACE]: 'New Explorer',
diff --git a/frontend/src/container/NewExplorerCTA/index.tsx b/frontend/src/container/NewExplorerCTA/index.tsx
index 23b890e889..695de96434 100644
--- a/frontend/src/container/NewExplorerCTA/index.tsx
+++ b/frontend/src/container/NewExplorerCTA/index.tsx
@@ -1,12 +1,13 @@
import React, { useCallback, useMemo } from 'react';
import { useLocation } from 'react-router-dom';
-import { Badge, Button } from 'antd';
+import { Button } from 'antd';
+import { Badge } from '@signozhq/ui/badge';
import ROUTES from 'constants/routes';
import { useSafeNavigate } from 'hooks/useSafeNavigate';
import { Undo } from '@signozhq/icons';
import { isModifierKeyPressed } from 'utils/app';
-import { buttonText, RIBBON_STYLES } from './config';
+import { buttonText } from './config';
import './NewExplorerCTA.styles.scss';
@@ -70,9 +71,12 @@ function NewExplorerCTA(): JSX.Element | null {
}
return (
- <Badge.Ribbon style={RIBBON_STYLES} text="New">
+ <span className="new-explorer-cta-with-badge">
{button}
- </Badge.Ribbon>
+ <Badge color="robin" variant="default">
+ New
+ </Badge>
+ </span>
);
}