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: query builder overall UI improvements (#9577)

Shaheer Kochai2b79678e6396
diff --git a/frontend/src/components/InputWithLabel/InputWithLabel.styles.scss b/frontend/src/components/InputWithLabel/InputWithLabel.styles.scss
index c459b54b2c..2c5906fff3 100644
--- a/frontend/src/components/InputWithLabel/InputWithLabel.styles.scss
+++ b/frontend/src/components/InputWithLabel/InputWithLabel.styles.scss
@@ -37,7 +37,6 @@
border-radius: 2px 0px 0px 2px;
border: 1px solid var(--bg-slate-400);
- background: var(--bg-ink-300);
border-right: none;
border-left: none;
@@ -45,6 +44,12 @@
border-bottom-right-radius: 0px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
+ font-size: 12px !important;
+ line-height: 27px;
+ &::placeholder {
+ color: var(--bg-vanilla-400) !important;
+ font-size: 12px !important;
+ }
}
.close-btn {
diff --git a/frontend/src/components/QueryBuilderV2/QueryBuilderV2.styles.scss b/frontend/src/components/QueryBuilderV2/QueryBuilderV2.styles.scss
index e0195ef0fe..078030738d 100644
--- a/frontend/src/components/QueryBuilderV2/QueryBuilderV2.styles.scss
+++ b/frontend/src/components/QueryBuilderV2/QueryBuilderV2.styles.scss
@@ -251,6 +251,10 @@
.ant-input-group-addon {
border-top-left-radius: 0px !important;
border-top-right-radius: 0px !important;
+ background: var(--bg-ink-300);
+ color: var(--bg-vanilla-400);
+ font-size: 12px;
+ font-weight: 300;
}
.ant-input {
diff --git a/frontend/src/components/QueryBuilderV2/QueryBuilderV2.tsx b/frontend/src/components/QueryBuilderV2/QueryBuilderV2.tsx
index 9e2ba8ce77..e617ea152f 100644
--- a/frontend/src/components/QueryBuilderV2/QueryBuilderV2.tsx
+++ b/frontend/src/components/QueryBuilderV2/QueryBuilderV2.tsx
@@ -179,6 +179,7 @@ export const QueryBuilderV2 = memo(function QueryBuilderV2({
isListViewPanel={isListViewPanel}
onSignalSourceChange={onSignalSourceChange || ((): void => {})}
signalSourceChangeEnabled={signalSourceChangeEnabled}
+ queriesCount={1}
/>
) : (
currentQuery.builder.queryData.map((query, index) => (
@@ -200,6 +201,7 @@ export const QueryBuilderV2 = memo(function QueryBuilderV2({
signalSource={query.source as 'meter' | ''}
onSignalSourceChange={onSignalSourceChange || ((): void => {})}
signalSourceChangeEnabled={signalSourceChangeEnabled}
+ queriesCount={currentQuery.builder.queryData.length}
/>
))
)}
diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/MerticsAggregateSection/MetricsAggregateSection.styles.scss b/frontend/src/components/QueryBuilderV2/QueryV2/MerticsAggregateSection/MetricsAggregateSection.styles.scss
index ee73f643ae..e1667555a3 100644
--- a/frontend/src/components/QueryBuilderV2/QueryV2/MerticsAggregateSection/MetricsAggregateSection.styles.scss
+++ b/frontend/src/components/QueryBuilderV2/QueryV2/MerticsAggregateSection/MetricsAggregateSection.styles.scss
@@ -98,6 +98,13 @@
border-radius: 2px;
border: 1.005px solid var(--Slate-400, #1d212d);
background: var(--Ink-300, #16181d);
+ color: var(--bg-vanilla-400);
+ font-family: 'Geist Mono';
+ font-size: 13px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 20px;
+ letter-spacing: -0.07px;
}
.input-with-label {
diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/MetricsSelect/MetricsSelect.styles.scss b/frontend/src/components/QueryBuilderV2/QueryV2/MetricsSelect/MetricsSelect.styles.scss
index cfa74f8c93..32537399ad 100644
--- a/frontend/src/components/QueryBuilderV2/QueryV2/MetricsSelect/MetricsSelect.styles.scss
+++ b/frontend/src/components/QueryBuilderV2/QueryV2/MetricsSelect/MetricsSelect.styles.scss
@@ -6,6 +6,15 @@
gap: 8px;
width: 100%;
+ .ant-select-selection-search-input {
+ font-size: 12px !important;
+ line-height: 27px;
+ &::placeholder {
+ color: var(--bg-vanilla-400) !important;
+ font-size: 12px !important;
+ }
+ }
+
.source-selector {
width: 120px;
}
@@ -22,6 +31,11 @@
font-weight: 400;
line-height: 20px; /* 142.857% */
min-height: 36px;
+
+ .ant-select-selection-placeholder {
+ color: var(--bg-vanilla-400) !important;
+ font-size: 12px !important;
+ }
}
.ant-select-dropdown {
diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/QueryAddOns/QueryAddOns.styles.scss b/frontend/src/components/QueryBuilderV2/QueryV2/QueryAddOns/QueryAddOns.styles.scss
index db7bd881f4..23d54d1e4e 100644
--- a/frontend/src/components/QueryBuilderV2/QueryV2/QueryAddOns/QueryAddOns.styles.scss
+++ b/frontend/src/components/QueryBuilderV2/QueryV2/QueryAddOns/QueryAddOns.styles.scss
@@ -236,6 +236,10 @@
background: var(--bg-ink-100) !important;
opacity: 0.5 !important;
}
+
+ .cm-activeLine > span {
+ font-size: 12px !important;
+ }
}
}
@@ -271,6 +275,9 @@
box-sizing: border-box;
position: relative;
+ .cm-placeholder {
+ font-size: 12px !important;
+ }
}
}
diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/QueryAggregation/QueryAggregation.styles.scss b/frontend/src/components/QueryBuilderV2/QueryV2/QueryAggregation/QueryAggregation.styles.scss
index e5f5fae037..9041ea2167 100644
--- a/frontend/src/components/QueryBuilderV2/QueryV2/QueryAggregation/QueryAggregation.styles.scss
+++ b/frontend/src/components/QueryBuilderV2/QueryV2/QueryAggregation/QueryAggregation.styles.scss
@@ -20,6 +20,8 @@
border-radius: 2px;
flex: 1;
min-width: 0;
+ font-size: 12px;
+ color: var(--bg-vanilla-400) !important;
&.error {
.cm-editor {
@@ -231,6 +233,9 @@
.query-aggregation-interval-input {
input {
max-width: 120px;
+ &::placeholder {
+ color: var(--bg-vanilla-400);
+ }
}
}
}
diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/QueryFooter/QueryFooter.styles.scss b/frontend/src/components/QueryBuilderV2/QueryV2/QueryFooter/QueryFooter.styles.scss
new file mode 100644
index 0000000000..1ceea9f340
--- /dev/null
+++ b/frontend/src/components/QueryBuilderV2/QueryV2/QueryFooter/QueryFooter.styles.scss
@@ -0,0 +1,7 @@
+.add-trace-operator-button,
+.add-new-query-button,
+.add-formula-button {
+ border: 1px solid var(--bg-slate-400);
+ background: var(--bg-ink-300);
+ box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+}
diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/QueryFooter/QueryFooter.tsx b/frontend/src/components/QueryBuilderV2/QueryV2/QueryFooter/QueryFooter.tsx
index 9907cbdc5d..31c8f4720c 100644
--- a/frontend/src/components/QueryBuilderV2/QueryV2/QueryFooter/QueryFooter.tsx
+++ b/frontend/src/components/QueryBuilderV2/QueryV2/QueryFooter/QueryFooter.tsx
@@ -1,3 +1,5 @@
+import './QueryFooter.styles.scss';
+
/* eslint-disable react/require-default-props */
import { Button, Tooltip, Typography } from 'antd';
import { DraftingCompass, Plus, Sigma } from 'lucide-react';
@@ -22,8 +24,7 @@ export default function QueryFooter({
<div className="qb-add-new-query">
<Tooltip title={<div style={{ textAlign: 'center' }}>Add New Query</div>}>
<Button
- className="add-new-query-button periscope-btn secondary"
- type="text"
+ className="add-new-query-button periscope-btn "
icon={<Plus size={16} />}
onClick={addNewBuilderQuery}
/>
@@ -49,7 +50,7 @@ export default function QueryFooter({
}
>
<Button
- className="add-formula-button periscope-btn secondary"
+ className="add-formula-button periscope-btn "
icon={<Sigma size={16} />}
onClick={addNewFormula}
>
@@ -77,7 +78,7 @@ export default function QueryFooter({
}
>
<Button
- className="add-trace-operator-button periscope-btn secondary"
+ className="add-trace-operator-button periscope-btn "
icon={<DraftingCompass size={16} />}
onClick={(): void => addTraceOperator?.()}
>
diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/QueryV2.tsx b/frontend/src/components/QueryBuilderV2/QueryV2/QueryV2.tsx
index 51ae0c94be..39f3c7897b 100644
--- a/frontend/src/components/QueryBuilderV2/QueryV2/QueryV2.tsx
+++ b/frontend/src/components/QueryBuilderV2/QueryV2/QueryV2.tsx
@@ -35,10 +35,12 @@ export const QueryV2 = memo(function QueryV2({
isMultiQueryAllowed = false,
onSignalSourceChange,
signalSourceChangeEnabled = false,
+ queriesCount = 1,
}: QueryProps & {
ref: React.RefObject<HTMLDivElement>;
onSignalSourceChange: (value: string) => void;
signalSourceChangeEnabled: boolean;
+ queriesCount: number;
}): JSX.Element {
const { cloneQuery, panelType } = useQueryBuilder();
@@ -192,12 +194,16 @@ export const QueryV2 = memo(function QueryV2({
icon: <Copy size={14} />,
onClick: handleCloneEntity,
},
- {
- label: 'Delete',
- key: 'delete-query',
- icon: <Trash size={14} />,
- onClick: handleDeleteQuery,
- },
+ ...(queriesCount && queriesCount > 1
+ ? [
+ {
+ label: 'Delete',
+ key: 'delete-query',
+ icon: <Trash size={14} />,
+ onClick: handleDeleteQuery,
+ },
+ ]
+ : []),
],
}}
placement="bottomRight"
diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/TraceOperator.styles.scss b/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/TraceOperator.styles.scss
index 6e9eca66a4..d8945d5b30 100644
--- a/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/TraceOperator.styles.scss
+++ b/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/TraceOperator.styles.scss
@@ -92,6 +92,9 @@
.qb-trace-operator-editor-container {
flex: 1;
+ .cm-activeLine > span {
+ font-size: 12px;
+ }
}
&.arrow-left {
@@ -113,6 +116,8 @@
text-overflow: ellipsis;
padding: 0px 8px;
border-right: 1px solid var(--bg-slate-400);
+ font-size: 12px;
+ font-weight: 300;
}
}
}
diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/TraceOperator.tsx b/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/TraceOperator.tsx
index 764ae9426b..179d092982 100644
--- a/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/TraceOperator.tsx
+++ b/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/TraceOperator.tsx
@@ -68,7 +68,7 @@ export default function TraceOperator({
!isListViewPanel && 'qb-trace-operator-arrow',
)}
>
- <Typography.Text className="label">TRACE OPERATOR</Typography.Text>
+ <Typography.Text className="label">Trace Operator</Typography.Text>
<div className="qb-trace-operator-editor-container">
<TraceOperatorEditor
value={traceOperator?.expression || ''}
diff --git a/frontend/src/constants/theme.ts b/frontend/src/constants/theme.ts
index 8481f0578b..9ce8849cfa 100644
--- a/frontend/src/constants/theme.ts
+++ b/frontend/src/constants/theme.ts
@@ -34,7 +34,7 @@ const themeColors = {
cyan: '#00FFFF',
},
chartcolors: {
- robin: '#3F5ECC',
+ radicalRed: '#FF1A66',
dodgerBlue: '#2F80ED',
mediumOrchid: '#BB6BD9',
seaBuckthorn: '#F2994A',
@@ -58,7 +58,7 @@ const themeColors = {
oliveDrab: '#66991A',
lavenderRose: '#FF99E6',
electricLime: '#CCFF1A',
- radicalRed: '#FF1A66',
+ robin: '#3F5ECC',
harleyOrange: '#E6331A',
turquoise: '#33FFCC',
gladeGreen: '#66994D',
@@ -80,7 +80,7 @@ const themeColors = {
maroon: '#800000',
navy: '#000080',
aquamarine: '#7FFFD4',
- gold: '#FFD700',
+ darkSeaGreen: '#8FBC8F',
gray: '#808080',
skyBlue: '#87CEEB',
indigo: '#4B0082',
@@ -105,7 +105,7 @@ const themeColors = {
lawnGreen: '#7CFC00',
mediumSeaGreen: '#3CB371',
lightCoral: '#F08080',
- darkSeaGreen: '#8FBC8F',
+ gold: '#FFD700',
sandyBrown: '#F4A460',
darkKhaki: '#BDB76B',
cornflowerBlue: '#6495ED',
@@ -113,7 +113,7 @@ const themeColors = {
paleGreen: '#98FB98',
},
lightModeColor: {
- robin: '#3F5ECC',
+ radicalRed: '#FF1A66',
dodgerBlueDark: '#0C6EED',
steelgrey: '#2f4b7c',
steelpurple: '#665191',
@@ -143,7 +143,7 @@ const themeColors = {
oliveDrab: '#66991A',
lavenderRoseDark: '#F024BD',
electricLimeDark: '#84A800',
- radicalRed: '#FF1A66',
+ robin: '#3F5ECC',
harleyOrange: '#E6331A',
gladeGreen: '#66994D',
hemlock: '#66664D',
@@ -181,7 +181,7 @@ const themeColors = {
darkOrchid: '#9932CC',
mediumSeaGreenDark: '#109E50',
lightCoralDark: '#F85959',
- darkSeaGreenDark: '#509F50',
+ gold: '#FFD700',
sandyBrownDark: '#D97117',
darkKhakiDark: '#99900A',
cornflowerBlueDark: '#3371E6',
diff --git a/frontend/src/container/CreateAlertV2/CreateAlertHeader/styles.scss b/frontend/src/container/CreateAlertV2/CreateAlertHeader/styles.scss
index b1d0511262..875ca32652 100644
--- a/frontend/src/container/CreateAlertV2/CreateAlertHeader/styles.scss
+++ b/frontend/src/container/CreateAlertV2/CreateAlertHeader/styles.scss
@@ -137,7 +137,7 @@
font-size: 13px;
&::placeholder {
- color: #888;
+ color: var(--bg-vanilla-400);
}
&:focus,
diff --git a/frontend/src/periscope.scss b/frontend/src/periscope.scss
index daa768139c..d0d98426ad 100644
--- a/frontend/src/periscope.scss
+++ b/frontend/src/periscope.scss
@@ -160,6 +160,8 @@
min-width: 0;
.ant-select {
+ font-family: 'Space Mono', monospace !important;
+
border: none;
height: 36px;
}
@@ -167,6 +169,10 @@
.ant-select-selector {
border: none;
}
+
+ .ant-select-selection-placeholder {
+ color: var(--bg-vanilla-400);
+ }
}
.close-btn {