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.

fix(warning-popover): background color to l2 & message alignment (#12302)

Gaurav Tewari591837152e4b
diff --git a/frontend/src/components/WarningPopover/WarningPopover.styles.scss b/frontend/src/components/WarningPopover/WarningPopover.styles.scss
index faba076b10..fb11d0fdd4 100644
--- a/frontend/src/components/WarningPopover/WarningPopover.styles.scss
+++ b/frontend/src/components/WarningPopover/WarningPopover.styles.scss
@@ -1,6 +1,11 @@
+.warning-popover-overlay {
+ --antd-arrow-background-color: var(--l2-background);
+}
+
.warning-content {
display: flex;
flex-direction: column;
+ background-color: var(--l2-background);
// === SECTION: Summary (Top)
&__summary-section {
@@ -10,16 +15,25 @@
&__summary {
display: flex;
+ align-items: flex-start;
justify-content: space-between;
+ gap: var(--spacing-8);
padding: 16px;
}
&__summary-left {
display: flex;
- align-items: baseline;
+ align-items: flex-start;
gap: 8px;
}
+ &__icon-wrapper {
+ display: flex;
+ align-items: center;
+ flex-shrink: 0;
+ height: var(--spacing-12);
+ }
+
&__summary-text {
display: flex;
flex-direction: column;
diff --git a/frontend/src/components/WarningPopover/WarningPopover.tsx b/frontend/src/components/WarningPopover/WarningPopover.tsx
index 57aa7a176f..95904233cd 100644
--- a/frontend/src/components/WarningPopover/WarningPopover.tsx
+++ b/frontend/src/components/WarningPopover/WarningPopover.tsx
@@ -2,6 +2,7 @@ import { ReactNode, useMemo } from 'react';
import { Color } from '@signozhq/design-tokens';
import { Button, Popover, PopoverProps } from 'antd';
import ErrorIcon from 'assets/Error';
+import cx from 'classnames';
import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';
import { BookOpenText, ChevronsDown, TriangleAlert } from '@signozhq/icons';
import KeyValueLabel from 'periscope/components/KeyValueLabel';
@@ -30,16 +31,18 @@ export function WarningContent({ warning }: WarningContentProps): JSX.Element {
{/* Summary Header */}
<section className="warning-content__summary-section">
<header className="warning-content__summary">
- <div className="warning-content__summary-left">
- <div className="warning-content__icon-wrapper">
- <ErrorIcon />
- </div>
+ {(warningCode || warningMessage) && (
+ <div className="warning-content__summary-left">
+ <div className="warning-content__icon-wrapper">
+ <ErrorIcon />
+ </div>
- <div className="warning-content__summary-text">
- <h2 className="warning-content__warning-code">{warningCode}</h2>
- <p className="warning-content__warning-message">{warningMessage}</p>
+ <div className="warning-content__summary-text">
+ <h2 className="warning-content__warning-code">{warningCode}</h2>
+ <p className="warning-content__warning-message">{warningMessage}</p>
+ </div>
</div>
- </div>
+ )}
{warningUrl && (
<div className="warning-content__summary-right">
@@ -154,6 +157,10 @@ function WarningPopover({
overlayInnerStyle={{ padding: 0 }}
autoAdjustOverflow
{...popoverProps}
+ overlayClassName={cx(
+ 'warning-popover-overlay',
+ popoverProps.overlayClassName,
+ )}
>
{children || (
<TriangleAlert