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.

feat: trace-filter style and light mode fixes (#5142)

SagarRajput-7c703f5290abc
diff --git a/frontend/src/pages/TracesExplorer/Filter/DurationSection.tsx b/frontend/src/pages/TracesExplorer/Filter/DurationSection.tsx
index af06027139..ce124f623e 100644
--- a/frontend/src/pages/TracesExplorer/Filter/DurationSection.tsx
+++ b/frontend/src/pages/TracesExplorer/Filter/DurationSection.tsx
@@ -66,13 +66,9 @@ export function DurationSection(props: DurationProps): JSX.Element {
setPreMax(max);
};
- const debouncedFunction = useDebouncedFn(
- (min, max) => {
- updateDurationFilter(min as string, max as string);
- },
- 1500,
- undefined,
- );
+ const debouncedFunction = useDebouncedFn((min, max) => {
+ updateDurationFilter(min as string, max as string);
+ }, 1500);
const onChangeMaxHandler: ChangeEventHandler<HTMLInputElement> = (event) => {
const { value } = event.target;
diff --git a/frontend/src/pages/TracesExplorer/Filter/Filter.styles.scss b/frontend/src/pages/TracesExplorer/Filter/Filter.styles.scss
index f45b9b5e37..497ac75ba8 100644
--- a/frontend/src/pages/TracesExplorer/Filter/Filter.styles.scss
+++ b/frontend/src/pages/TracesExplorer/Filter/Filter.styles.scss
@@ -182,9 +182,14 @@
.arrow-icon {
background-color: var(--bg-vanilla-100);
}
+
+ .sync-icon {
+ background-color: var(--bg-vanilla-100);
+ }
}
.section-card {
background-color: var(--bg-vanilla-100);
+ box-shadow: none;
}
}
diff --git a/frontend/src/pages/TracesExplorer/Filter/SectionContent.tsx b/frontend/src/pages/TracesExplorer/Filter/SectionContent.tsx
index ed9cf08542..05fc7bb1f3 100644
--- a/frontend/src/pages/TracesExplorer/Filter/SectionContent.tsx
+++ b/frontend/src/pages/TracesExplorer/Filter/SectionContent.tsx
@@ -2,9 +2,8 @@ import './Filter.styles.scss';
import { Button, Card, Checkbox, Input, Tooltip } from 'antd';
import { CheckboxChangeEvent } from 'antd/es/checkbox';
-import { DEBOUNCE_DELAY } from 'constants/queryBuilderFilterConfig';
import { ParaGraph } from 'container/Trace/Filters/Panel/PanelBody/Common/styles';
-import useDebounce from 'hooks/useDebounce';
+import useDebouncedFn from 'hooks/useDebouncedFunction';
import { defaultTo, isEmpty } from 'lodash-es';
import {
ChangeEvent,
@@ -36,6 +35,7 @@ export function SectionBody(props: SectionBodyProps): JSX.Element {
const { type, setSelectedFilters, selectedFilters, handleRun } = props;
const [visibleItemsCount, setVisibleItemsCount] = useState(10);
const [searchFilter, setSearchFilter] = useState<string>('');
+ const [searchText, setSearchText] = useState<string>('');
const [checkedItems, setCheckedItems] = useState<string[]>(
defaultTo(selectedFilters?.[type]?.values as string[], []),
);
@@ -48,11 +48,14 @@ export function SectionBody(props: SectionBodyProps): JSX.Element {
setCheckedItems(defaultTo(selectedFilters?.[type]?.values as string[], [])),
[selectedFilters, type],
);
- const debouncedSearchText = useDebounce(searchFilter, DEBOUNCE_DELAY);
+
+ const handleDebouncedSearch = useDebouncedFn((searchText): void => {
+ setSearchText(searchText as string);
+ }, 500);
const { isFetching: fetching, keys, results: res } = useGetAggregateValues({
value: type,
- searchText: debouncedSearchText,
+ searchText,
});
useEffect(() => {
@@ -111,6 +114,7 @@ export function SectionBody(props: SectionBodyProps): JSX.Element {
const handleSearch = (e: ChangeEvent<HTMLInputElement>): void => {
const inputValue = e.target.value;
setSearchFilter(inputValue);
+ handleDebouncedSearch(inputValue || '');
};
return (
diff --git a/frontend/src/pages/TracesExplorer/TracesExplorer.styles.scss b/frontend/src/pages/TracesExplorer/TracesExplorer.styles.scss
index e26e38dbaa..cf6eb52b10 100644
--- a/frontend/src/pages/TracesExplorer/TracesExplorer.styles.scss
+++ b/frontend/src/pages/TracesExplorer/TracesExplorer.styles.scss
@@ -64,7 +64,7 @@
.trace-explorer-page {
.filter {
border: 1px solid var(--bg-vanilla-200);
- background-color: var(--bg-vanilla-200);
+ background-color: var(--bg-vanilla-100);
}
.trace-explorer {
@@ -79,4 +79,15 @@
border-color: var(--bg-vanilla-200);
}
}
+
+ .trace-explorer-header {
+ .filter-outlined-btn {
+ border-radius: 0px 2px 2px 0px;
+ border-top: 1px solid var(--bg-vanilla-200);
+ border-right: 1px solid var(--bg-vanilla-200);
+ border-bottom: 1px solid var(--bg-vanilla-200);
+ background: var(--bg-vanilla-100);
+ box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0);
+ }
+ }
}