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(quick-filters): filter sidebar scrolls the whole page (#12915)

Aditya Singh720810d42406
diff --git a/frontend/src/components/QuickFilters/QuickFilters.styles.scss b/frontend/src/components/QuickFilters/QuickFilters.styles.scss
index e98692e416..dc70ae66b5 100644
--- a/frontend/src/components/QuickFilters/QuickFilters.styles.scss
+++ b/frontend/src/components/QuickFilters/QuickFilters.styles.scss
@@ -2,6 +2,8 @@
display: flex;
flex-direction: row;
position: relative;
+ flex: 1;
+ min-height: 0;
.quick-filters-settings-container {
flex: 0 0 0;
diff --git a/frontend/src/components/QuickFilters/QuickFiltersLayout/QuickFiltersLayout.module.scss b/frontend/src/components/QuickFilters/QuickFiltersLayout/QuickFiltersLayout.module.scss
new file mode 100644
index 0000000000..6c923d0a10
--- /dev/null
+++ b/frontend/src/components/QuickFilters/QuickFiltersLayout/QuickFiltersLayout.module.scss
@@ -0,0 +1,33 @@
+// The one `overflow: hidden` in the chain. Ancestors (RouteTab, AppLayout)
+// only hand height down; each pane below owns its own scroll.
+.layout {
+ display: flex;
+ flex: 1;
+ height: 100%;
+ min-height: 0;
+ overflow: hidden;
+}
+
+// Positioned so overlays (settings drawer) paint above the content pane
+// without changing this pane's layout width.
+.filters {
+ width: 280px;
+ flex-shrink: 0;
+ display: flex;
+ flex-direction: column;
+ min-height: 0;
+ position: relative;
+ overflow: visible;
+ z-index: 2;
+}
+
+// Bounded box for the OverlayScrollbar inside it (`.overlay-scrollbar` is
+// `height: 100%`), which owns the scrolling.
+.content {
+ flex: 1;
+ min-width: 0;
+ min-height: 0;
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+}
diff --git a/frontend/src/components/QuickFilters/QuickFiltersLayout/QuickFiltersLayout.tsx b/frontend/src/components/QuickFilters/QuickFiltersLayout/QuickFiltersLayout.tsx
new file mode 100644
index 0000000000..798f6f0ba8
--- /dev/null
+++ b/frontend/src/components/QuickFilters/QuickFiltersLayout/QuickFiltersLayout.tsx
@@ -0,0 +1,54 @@
+import { ComponentProps, ReactNode } from 'react';
+import cx from 'classnames';
+import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';
+
+import QuickFilters from '../QuickFilters';
+
+import styles from './QuickFiltersLayout.module.scss';
+
+// Same optionality as `<QuickFilters />` in JSX (honours its defaultProps).
+type QuickFiltersElementProps = JSX.LibraryManagedAttributes<
+ typeof QuickFilters,
+ ComponentProps<typeof QuickFilters>
+>;
+
+export interface QuickFiltersLayoutProps {
+ quickFilterProps: QuickFiltersElementProps;
+ showFilters: boolean;
+ className?: string;
+ contentClassName?: string;
+ testId?: string;
+ children: ReactNode;
+}
+
+function QuickFiltersLayout({
+ quickFilterProps,
+ showFilters,
+ className,
+ contentClassName,
+ testId,
+ children,
+}: QuickFiltersLayoutProps): JSX.Element {
+ return (
+ <div className={cx(styles.layout, className)} data-testid={testId}>
+ {showFilters && (
+ <aside
+ className={styles.filters}
+ data-testid="quick-filters-layout-filters"
+ >
+ <QuickFilters {...quickFilterProps} />
+ </aside>
+ )}
+ <section
+ className={cx(styles.content, contentClassName)}
+ data-testid="quick-filters-layout-content"
+ >
+ <OverlayScrollbar>
+ <div>{children}</div>
+ </OverlayScrollbar>
+ </section>
+ </div>
+ );
+}
+
+export default QuickFiltersLayout;
diff --git a/frontend/src/components/QuickFilters/QuickFiltersLayout/__tests__/QuickFiltersLayout.test.tsx b/frontend/src/components/QuickFilters/QuickFiltersLayout/__tests__/QuickFiltersLayout.test.tsx
new file mode 100644
index 0000000000..353b04df13
--- /dev/null
+++ b/frontend/src/components/QuickFilters/QuickFiltersLayout/__tests__/QuickFiltersLayout.test.tsx
@@ -0,0 +1,79 @@
+import { render, screen } from 'tests/test-utils';
+
+import { QuickFiltersSource } from '../../types';
+import QuickFiltersLayout from '../QuickFiltersLayout';
+
+jest.mock('../QuickFiltersLayout.module.scss', () => ({
+ __esModule: true,
+ default: {
+ layout: 'layout',
+ filters: 'filters',
+ content: 'content',
+ },
+}));
+
+jest.mock('../../QuickFilters', () => ({
+ __esModule: true,
+ default: ({ source }: { source: string }): JSX.Element => (
+ <div data-testid="quick-filters">{source}</div>
+ ),
+}));
+
+const quickFilterProps = {
+ source: QuickFiltersSource.TRACES_EXPLORER,
+ handleFilterVisibilityChange: jest.fn(),
+};
+
+describe('QuickFiltersLayout', () => {
+ it('renders QuickFilters with the given props inside the filters pane', () => {
+ render(
+ <QuickFiltersLayout showFilters quickFilterProps={quickFilterProps}>
+ <div>content</div>
+ </QuickFiltersLayout>,
+ );
+
+ const filtersPane = screen.getByTestId('quick-filters-layout-filters');
+ expect(filtersPane).toContainElement(screen.getByTestId('quick-filters'));
+ expect(screen.getByTestId('quick-filters')).toHaveTextContent(
+ QuickFiltersSource.TRACES_EXPLORER,
+ );
+ expect(screen.getByTestId('quick-filters-layout-content')).toHaveTextContent(
+ 'content',
+ );
+ });
+
+ it('does not render the filters pane when showFilters is false', () => {
+ render(
+ <QuickFiltersLayout showFilters={false} quickFilterProps={quickFilterProps}>
+ <div>content</div>
+ </QuickFiltersLayout>,
+ );
+
+ expect(
+ screen.queryByTestId('quick-filters-layout-filters'),
+ ).not.toBeInTheDocument();
+ expect(screen.queryByTestId('quick-filters')).not.toBeInTheDocument();
+ expect(screen.getByText('content')).toBeInTheDocument();
+ });
+
+ it('merges classNames onto the root and content panes', () => {
+ render(
+ <QuickFiltersLayout
+ showFilters
+ quickFilterProps={quickFilterProps}
+ className="page-root"
+ contentClassName="page-content"
+ testId="page"
+ >
+ <div>content</div>
+ </QuickFiltersLayout>,
+ );
+
+ const root = screen.getByTestId('page');
+ expect(root).toHaveClass('layout', 'page-root');
+ expect(screen.getByTestId('quick-filters-layout-content')).toHaveClass(
+ 'content',
+ 'page-content',
+ );
+ });
+});
diff --git a/frontend/src/components/QuickFilters/QuickFiltersSettings/QuickFiltersSettings.styles.scss b/frontend/src/components/QuickFilters/QuickFiltersSettings/QuickFiltersSettings.styles.scss
index 9e8d9d8b6f..d08be67ff1 100644
--- a/frontend/src/components/QuickFilters/QuickFiltersSettings/QuickFiltersSettings.styles.scss
+++ b/frontend/src/components/QuickFilters/QuickFiltersSettings/QuickFiltersSettings.styles.scss
@@ -6,27 +6,12 @@
left: 0;
z-index: 999;
width: 342px;
+ height: 100%;
background: var(--l1-background);
transition: width 0.05s ease-in-out;
overflow: hidden;
color: var(--l1-foreground);
- &.qf-logs-explorer {
- height: calc(100vh - 45px);
- }
-
- &.qf-exceptions {
- height: 100vh;
- }
-
- &.qf-api-monitoring {
- height: calc(100vh - 45px);
- }
-
- &.qf-traces-explorer {
- height: calc(100vh - 45px);
- }
-
&.hidden {
width: 0;
}
diff --git a/frontend/src/components/RouteTab/RouteTab.module.scss b/frontend/src/components/RouteTab/RouteTab.module.scss
new file mode 100644
index 0000000000..3db0e9850c
--- /dev/null
+++ b/frontend/src/components/RouteTab/RouteTab.module.scss
@@ -0,0 +1,38 @@
+// Hands the parent's height down to the active pane and lets the pane scroll
+// its own content, so TopNav and the tab bar stay put. Child combinators only
+// (nested Tabs must not be caught).
+.routeTab {
+ flex: 1;
+ min-height: 0;
+}
+
+.routeTab > :global(.ant-tabs-content-holder) {
+ display: flex;
+ flex-direction: column;
+}
+
+.routeTab > :global(.ant-tabs-content-holder) > :global(.ant-tabs-content) {
+ flex: 1;
+ min-height: 0;
+ display: flex;
+ flex-direction: column;
+}
+
+.routeTab
+ > :global(.ant-tabs-content-holder)
+ > :global(.ant-tabs-content)
+ > :global(.ant-tabs-tabpane-active) {
+ flex: 1;
+ min-height: 0;
+ display: flex;
+ flex-direction: column;
+}
+
+.routeTab
+ > :global(.ant-tabs-content-holder)
+ > :global(.ant-tabs-content)
+ > :global(.ant-tabs-tabpane-active)
+ > :global(.overlay-scrollbar) {
+ flex: 1;
+ min-height: 0;
+}
diff --git a/frontend/src/components/RouteTab/RouteTab.test.tsx b/frontend/src/components/RouteTab/RouteTab.test.tsx
index 1d604b50e7..497b2d4eda 100644
--- a/frontend/src/components/RouteTab/RouteTab.test.tsx
+++ b/frontend/src/components/RouteTab/RouteTab.test.tsx
@@ -5,6 +5,11 @@ import { fireEvent, render, screen } from 'tests/test-utils';
import RouteTab from './index';
import { RouteTabProps } from './types';
+jest.mock('./RouteTab.module.scss', () => ({
+ __esModule: true,
+ default: { routeTab: 'routeTab' },
+}));
+
function DummyComponent1(): JSX.Element {
return <div>Dummy Component 1</div>;
}
@@ -74,6 +79,36 @@ describe('RouteTab component', () => {
expect(history.location.pathname).toBe('/tab2');
});
+ it('applies the layout class alongside a custom className', () => {
+ const history = createMemoryHistory();
+ const { container } = render(
+ <Router history={history}>
+ <RouteTab
+ history={history}
+ routes={testRoutes}
+ activeKey="Tab1"
+ className="custom-tabs"
+ />
+ </Router>,
+ );
+ expect(container.querySelector('.ant-tabs')).toHaveClass(
+ 'routeTab',
+ 'custom-tabs',
+ );
+ });
+
+ it('renders the active tab content inside an overlay scrollbar', () => {
+ const history = createMemoryHistory();
+ const { container } = render(
+ <Router history={history}>
+ <RouteTab history={history} routes={testRoutes} activeKey="Tab1" />
+ </Router>,
+ );
+ expect(
+ container.querySelector('.ant-tabs-tabpane-active > .overlay-scrollbar'),
+ ).toHaveTextContent('Dummy Component 1');
+ });
+
it('calls onChangeHandler on tab change', () => {
const onChangeHandler = jest.fn();
const history = createMemoryHistory();
diff --git a/frontend/src/components/RouteTab/index.tsx b/frontend/src/components/RouteTab/index.tsx
index 9edd72ba2a..19dccc54f6 100644
--- a/frontend/src/components/RouteTab/index.tsx
+++ b/frontend/src/components/RouteTab/index.tsx
@@ -5,20 +5,32 @@ import {
useParams,
} from 'react-router-dom';
import { Tabs, TabsProps } from 'antd';
+import cx from 'classnames';
import HeaderRightSection from 'components/HeaderRightSection/HeaderRightSection';
+import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';
import { RouteTabProps } from './types';
+import styles from './RouteTab.module.scss';
+
interface Params {
[key: string]: string;
}
+/**
+ * Each pane scrolls its own content inside an OverlayScrollbar, so the tab bar
+ * stays put. Mounted as the page root the pane is bounded to the viewport; inside
+ * a plain block wrapper the scroller is inert and the page scrolls as usual.
+ * Pane content that needs a bounded box must size itself with `height: 100%`
+ * (the scroller's viewport is block flow, so `flex: 1` has no effect there).
+ */
function RouteTab({
routes,
activeKey,
onChangeHandler,
history,
showRightSection,
+ className,
...rest
}: RouteTabProps & TabsProps): JSX.Element {
const params = useParams<Params>();
@@ -50,11 +62,16 @@ function RouteTab({
label: name,
key,
tabKey: route,
- children: <Component />,
+ children: (
+ <OverlayScrollbar>
+ <Component />
+ </OverlayScrollbar>
+ ),
}));
return (
<Tabs
+ className={cx(styles.routeTab, className)}
onChange={onChange}
destroyInactiveTabPane
activeKey={currentRoute?.key || activeKey}
diff --git a/frontend/src/container/ApiMonitoring/Explorer/Explorer.styles.scss b/frontend/src/container/ApiMonitoring/Explorer/Explorer.styles.scss
index 93cb68510b..333d619af4 100644
--- a/frontend/src/container/ApiMonitoring/Explorer/Explorer.styles.scss
+++ b/frontend/src/container/ApiMonitoring/Explorer/Explorer.styles.scss
@@ -1,23 +1,15 @@
-.api-monitoring-page {
- display: flex;
- height: 100%;
-
- .api-quick-filter-left-section {
- width: 0%;
- flex-shrink: 0;
-
- .api-quick-filters-header {
- padding: 12px;
- border-bottom: 1px solid var(--l1-border);
- border-right: 1px solid var(--l1-border);
+.api-monitoring-explorer {
+ .api-quick-filters-header {
+ padding: 12px;
+ border-bottom: 1px solid var(--l1-border);
+ border-right: 1px solid var(--l1-border);
- display: flex;
- align-items: center;
- gap: 6px;
+ display: flex;
+ align-items: center;
+ gap: 6px;
- font-size: 14px;
- line-height: 18px;
- }
+ font-size: 14px;
+ line-height: 18px;
}
.api-module-right-section {
@@ -161,16 +153,6 @@
}
}
}
-
- &.filter-visible {
- .api-quick-filter-left-section {
- width: 260px;
- }
-
- .api-module-right-section {
- width: calc(100% - 260px);
- }
- }
}
.no-filtered-domains-message-container {
diff --git a/frontend/src/container/ApiMonitoring/Explorer/Explorer.tsx b/frontend/src/container/ApiMonitoring/Explorer/Explorer.tsx
index 21100bfc14..4a9e84918d 100644
--- a/frontend/src/container/ApiMonitoring/Explorer/Explorer.tsx
+++ b/frontend/src/container/ApiMonitoring/Explorer/Explorer.tsx
@@ -1,8 +1,7 @@
import { useEffect } from 'react';
import * as Sentry from '@sentry/react';
import logEvent from 'api/common/logEvent';
-import cx from 'classnames';
-import QuickFilters from 'components/QuickFilters/QuickFilters';
+import QuickFiltersLayout from 'components/QuickFilters/QuickFiltersLayout/QuickFiltersLayout';
import { useSignalFieldApis } from 'components/QuickFilters/hooks/useSignalFieldApis';
import { QuickFiltersSource, SignalType } from 'components/QuickFilters/types';
import ErrorBoundaryFallback from 'pages/ErrorBoundaryFallback/ErrorBoundaryFallback';
@@ -20,20 +19,21 @@ function Explorer(): JSX.Element {
return (
<Sentry.ErrorBoundary fallback={<ErrorBoundaryFallback />}>
- <div className={cx('api-monitoring-page', 'filter-visible')}>
- <section className="api-quick-filter-left-section">
- <QuickFilters
- className="qf-api-monitoring"
- source={QuickFiltersSource.API_MONITORING}
- signal={SignalType.API_MONITORING}
- showFilterCollapse={false}
- showQueryName={false}
- handleFilterVisibilityChange={(): void => {}}
- useFieldApis={quickFilterFieldApis}
- />
- </section>
+ <QuickFiltersLayout
+ className="api-monitoring-explorer"
+ showFilters
+ quickFilterProps={{
+ className: 'qf-api-monitoring',
+ source: QuickFiltersSource.API_MONITORING,
+ signal: SignalType.API_MONITORING,
+ showFilterCollapse: false,
+ showQueryName: false,
+ handleFilterVisibilityChange: (): void => {},
+ useFieldApis: quickFilterFieldApis,
+ }}
+ >
<DomainList />
- </div>
+ </QuickFiltersLayout>
</Sentry.ErrorBoundary>
);
}
diff --git a/frontend/src/container/LLMObservability/Explorer/Explorer.styles.scss b/frontend/src/container/LLMObservability/Explorer/Explorer.styles.scss
index d4d3f11be6..e28fec0813 100644
--- a/frontend/src/container/LLMObservability/Explorer/Explorer.styles.scss
+++ b/frontend/src/container/LLMObservability/Explorer/Explorer.styles.scss
@@ -65,8 +65,6 @@
}
.trace-explorer-page {
- display: flex;
-
// Meant to fix the query builder colors
--input-background: var(--l2-background);
--input-hover-background: var(--l2-background);
@@ -75,32 +73,8 @@
--input-hover-border-color: var(--internal-ant-border-color-hover);
--input-focus-border-color: var(--internal-ant-border-color-hover);
- .filter {
- width: 260px;
- height: 100%;
- min-height: 100vh;
-
- border-right: 0px;
- border: 1px solid var(--l1-border);
- background-color: var(--l1-background);
-
- > .ant-card-body {
- padding: 0;
- width: 258px;
- }
- }
-
.trace-explorer {
- width: 100%;
background: var(--l1-background);
-
- > .ant-card-body {
- padding: 0;
- }
-
border-color: var(--l1-border);
}
- .trace-explorer.filters-expanded {
- width: calc(100% - 260px);
- }
}
diff --git a/frontend/src/container/LLMObservability/Explorer/Explorer.tsx b/frontend/src/container/LLMObservability/Explorer/Explorer.tsx
index 7166ec23dd..d05c2d9b2f 100644
--- a/frontend/src/container/LLMObservability/Explorer/Explorer.tsx
+++ b/frontend/src/container/LLMObservability/Explorer/Explorer.tsx
@@ -2,12 +2,10 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useQueryClient } from 'react-query';
import { useSearchParams } from 'react-router-dom-v5-compat';
import * as Sentry from '@sentry/react';
-import { Card } from 'antd';
import logEvent from 'api/common/logEvent';
-import cx from 'classnames';
import ExplorerCard from 'components/ExplorerCard/ExplorerCard';
import QueryCancelledPlaceholder from 'components/QueryCancelledPlaceholder';
-import QuickFilters from 'components/QuickFilters/QuickFilters';
+import QuickFiltersLayout from 'components/QuickFilters/QuickFiltersLayout/QuickFiltersLayout';
import { useSignalFieldApis } from 'components/QuickFilters/hooks/useSignalFieldApis';
import { QuickFiltersSource, SignalType } from 'components/QuickFilters/types';
import WarningPopover from 'components/WarningPopover/WarningPopover';
@@ -188,26 +186,21 @@ function Explorer(): JSX.Element {
return (
<Sentry.ErrorBoundary fallback={<ErrorBoundaryFallback />}>
- <div
+ <QuickFiltersLayout
className="trace-explorer-page"
- data-testid="llm-observability-explorer"
+ testId="llm-observability-explorer"
+ showFilters={isOpen}
+ quickFilterProps={{
+ className: 'qf-traces-explorer',
+ source: QuickFiltersSource.AI_OBSERVABILITY,
+ signal: SignalType.AI_OBSERVABILITY,
+ useFieldApis: quickFiltersFieldApis,
+ handleFilterVisibilityChange: (): void => {
+ setOpen(!isOpen);
+ },
+ }}
>
- <Card className="filter" hidden={!isOpen}>
- <QuickFilters
- className="qf-traces-explorer"
- source={QuickFiltersSource.AI_OBSERVABILITY}
- signal={SignalType.AI_OBSERVABILITY}
- useFieldApis={quickFiltersFieldApis}
- handleFilterVisibilityChange={(): void => {
- setOpen(!isOpen);
- }}
- />
- </Card>
- <div
- className={cx('trace-explorer', {
- 'filters-expanded': isOpen,
- })}
- >
+ <div className="trace-explorer">
<div className="trace-explorer-header">
<Toolbar
showAutoRefresh
@@ -291,7 +284,7 @@ function Explorer(): JSX.Element {
)}
</div>
</div>
- </div>
+ </QuickFiltersLayout>
</Sentry.ErrorBoundary>
);
}
diff --git a/frontend/src/container/MeterExplorer/Explorer/Explorer.styles.scss b/frontend/src/container/MeterExplorer/Explorer/Explorer.styles.scss
index 6f18cdd06f..c7a4099157 100644
--- a/frontend/src/container/MeterExplorer/Explorer/Explorer.styles.scss
+++ b/frontend/src/container/MeterExplorer/Explorer/Explorer.styles.scss
@@ -1,18 +1,7 @@
.meter-explorer-container {
- display: flex;
- flex-direction: row;
-
- .meter-explorer-quick-filters-section {
- width: 280px;
- border-right: 1px solid var(--l1-border);
-
- &.hidden {
- display: none;
- }
- }
-
.meter-explorer-content-section {
- width: 100%;
+ // Clearance for the fixed ExplorerOptions bar.
+ padding-bottom: 80px;
// Meant to fix the query builder colors
--input-background: var(--l2-background);
@@ -83,14 +72,6 @@
}
}
}
-
- &.quick-filters-open {
- .meter-explorer-content-section {
- width: calc(100% - 280px);
- }
- }
-
- padding-bottom: 80px;
}
.dashboards-and-alerts-popover-container {
diff --git a/frontend/src/container/MeterExplorer/Explorer/Explorer.tsx b/frontend/src/container/MeterExplorer/Explorer/Explorer.tsx
index 69019efbae..9b9f74a491 100644
--- a/frontend/src/container/MeterExplorer/Explorer/Explorer.tsx
+++ b/frontend/src/container/MeterExplorer/Explorer/Explorer.tsx
@@ -3,9 +3,8 @@ import { useQueryClient } from 'react-query';
import * as Sentry from '@sentry/react';
import { Button, Tooltip } from 'antd';
import logEvent from 'api/common/logEvent';
-import cx from 'classnames';
import { QueryBuilderV2 } from 'components/QueryBuilderV2/QueryBuilderV2';
-import QuickFilters from 'components/QuickFilters/QuickFilters';
+import QuickFiltersLayout from 'components/QuickFilters/QuickFiltersLayout/QuickFiltersLayout';
import { useSignalFieldApis } from 'components/QuickFilters/hooks/useSignalFieldApis';
import { QuickFiltersSource, SignalType } from 'components/QuickFilters/types';
import { initialQueryMeterWithType, PANEL_TYPES } from 'constants/queryBuilder';
@@ -121,29 +120,21 @@ function Explorer(): JSX.Element {
return (
<Sentry.ErrorBoundary fallback={<ErrorBoundaryFallback />}>
- <div
- className={cx('meter-explorer-container', {
- 'quick-filters-open': showQuickFilters,
- })}
+ <QuickFiltersLayout
+ className="meter-explorer-container"
+ showFilters={showQuickFilters}
+ quickFilterProps={{
+ className: 'qf-meter-explorer',
+ source: QuickFiltersSource.METER_EXPLORER,
+ signal: SignalType.METER_EXPLORER,
+ showFilterCollapse: true,
+ showQueryName: false,
+ handleFilterVisibilityChange: (): void => {
+ setShowQuickFilters(!showQuickFilters);
+ },
+ useFieldApis: quickFilterFieldApis,
+ }}
>
- <div
- className={cx('meter-explorer-quick-filters-section', {
- hidden: !showQuickFilters,
- })}
- >
- <QuickFilters
- className="qf-meter-explorer"
- source={QuickFiltersSource.METER_EXPLORER}
- signal={SignalType.METER_EXPLORER}
- showFilterCollapse
- showQueryName={false}
- handleFilterVisibilityChange={(): void => {
- setShowQuickFilters(!showQuickFilters);
- }}
- useFieldApis={quickFilterFieldApis}
- />
- </div>
-
<div className="meter-explorer-content-section">
<div className="meter-explorer-explore-content">
<div className="explore-header">
@@ -196,7 +187,7 @@ function Explorer(): JSX.Element {
splitedQueries={splitedQueries}
/>
</div>
- </div>
+ </QuickFiltersLayout>
</Sentry.ErrorBoundary>
);
}
diff --git a/frontend/src/container/MetricsExplorer/Summary/Summary.styles.scss b/frontend/src/container/MetricsExplorer/Summary/Summary.styles.scss
index 39b174c5f3..7212dff391 100644
--- a/frontend/src/container/MetricsExplorer/Summary/Summary.styles.scss
+++ b/frontend/src/container/MetricsExplorer/Summary/Summary.styles.scss
@@ -60,9 +60,6 @@
.metrics-table-container {
padding-bottom: 48px;
.ant-table {
- margin-left: -16px;
- margin-right: -16px;
-
.ant-table-thead > tr > th {
padding: 12px;
font-weight: 500;
diff --git a/frontend/src/pages/AllErrors/AllErrors.styles.scss b/frontend/src/pages/AllErrors/AllErrors.styles.scss
index ebc8ad2f80..f793116621 100644
--- a/frontend/src/pages/AllErrors/AllErrors.styles.scss
+++ b/frontend/src/pages/AllErrors/AllErrors.styles.scss
@@ -1,11 +1,4 @@
.all-errors-page {
- display: flex;
- height: 100%;
- .all-errors-quick-filter-section {
- width: 0%;
- flex-shrink: 0;
- }
-
.all-errors-right-section {
.right-toolbar-actions-container {
display: flex;
@@ -18,14 +11,4 @@
.ant-tabs {
margin: 0 8px;
}
-
- &.filter-visible {
- .all-errors-quick-filter-section {
- width: 260px;
- }
-
- .all-errors-right-section {
- width: calc(100% - 260px);
- }
- }
}
diff --git a/frontend/src/pages/AllErrors/index.tsx b/frontend/src/pages/AllErrors/index.tsx
index 16e90acadb..51729eb967 100644
--- a/frontend/src/pages/AllErrors/index.tsx
+++ b/frontend/src/pages/AllErrors/index.tsx
@@ -5,13 +5,11 @@ import { Filter } from '@signozhq/icons';
import { Button, Tooltip } from 'antd';
import getLocalStorageKey from 'api/browser/localstorage/get';
import setLocalStorageApi from 'api/browser/localstorage/set';
-import cx from 'classnames';
import HeaderRightSection from 'components/HeaderRightSection/HeaderRightSection';
-import QuickFilters from 'components/QuickFilters/QuickFilters';
+import QuickFiltersLayout from 'components/QuickFilters/QuickFiltersLayout/QuickFiltersLayout';
import { useSignalFieldApis } from 'components/QuickFilters/hooks/useSignalFieldApis';
import { QuickFiltersSource, SignalType } from 'components/QuickFilters/types';
import RouteTab from 'components/RouteTab';
-import TypicalOverlayScrollbar from 'components/TypicalOverlayScrollbar/TypicalOverlayScrollbar';
import { LOCALSTORAGE } from 'constants/localStorage';
import RightToolbarActions from 'container/QueryBuilder/components/ToolbarActions/RightToolbarActions';
import ResourceAttributesFilterV2 from 'container/ResourceAttributeFilterV2/ResourceAttributesFilterV2';
@@ -59,63 +57,52 @@ function AllErrors(): JSX.Element {
const quickFilterFieldApis = useSignalFieldApis();
return (
- <div className={cx('all-errors-page', showFilters ? 'filter-visible' : '')}>
- {showFilters && (
- <section className={cx('all-errors-quick-filter-section')}>
- <QuickFilters
- className="qf-exceptions"
- source={QuickFiltersSource.EXCEPTIONS}
- signal={SignalType.EXCEPTIONS}
- handleFilterVisibilityChange={handleFilterVisibilityChange}
- useFieldApis={quickFilterFieldApis}
- />
- </section>
- )}
- <section
- className={cx(
- 'all-errors-right-section',
- showFilters ? 'filter-visible' : '',
- )}
- >
- <TypicalOverlayScrollbar>
- <>
- <Toolbar
- showAutoRefresh={false}
- leftActions={
- !showFilters ? (
- <Tooltip title="Show Filters">
- <Button onClick={handleFilterVisibilityChange} className="filter-btn">
- <Filter size="md" />
- </Button>
- </Tooltip>
- ) : undefined
- }
- rightActions={
- <div className="right-toolbar-actions-container">
- <RightToolbarActions
- onStageRunQuery={handleRunQuery}
- isLoadingQueries={isLoadingQueries}
- handleCancelQuery={handleCancelQuery}
- />
- <HeaderRightSection
- enableAnnouncements={false}
- enableShare
- enableFeedback
- />
- </div>
- }
+ <QuickFiltersLayout
+ className="all-errors-page"
+ contentClassName="all-errors-right-section"
+ showFilters={showFilters}
+ quickFilterProps={{
+ className: 'qf-exceptions',
+ source: QuickFiltersSource.EXCEPTIONS,
+ signal: SignalType.EXCEPTIONS,
+ handleFilterVisibilityChange,
+ useFieldApis: quickFilterFieldApis,
+ }}
+ >
+ <Toolbar
+ showAutoRefresh={false}
+ leftActions={
+ !showFilters ? (
+ <Tooltip title="Show Filters">
+ <Button onClick={handleFilterVisibilityChange} className="filter-btn">
+ <Filter size="md" />
+ </Button>
+ </Tooltip>
+ ) : undefined
+ }
+ rightActions={
+ <div className="right-toolbar-actions-container">
+ <RightToolbarActions
+ onStageRunQuery={handleRunQuery}
+ isLoadingQueries={isLoadingQueries}
+ handleCancelQuery={handleCancelQuery}
/>
- <ResourceAttributesFilterV2 />
- <RouteTab
- routes={routes}
- activeKey={pathname}
- history={history}
- showRightSection={false}
+ <HeaderRightSection
+ enableAnnouncements={false}
+ enableShare
+ enableFeedback
/>
- </>
- </TypicalOverlayScrollbar>
- </section>
- </div>
+ </div>
+ }
+ />
+ <ResourceAttributesFilterV2 />
+ <RouteTab
+ routes={routes}
+ activeKey={pathname}
+ history={history}
+ showRightSection={false}
+ />
+ </QuickFiltersLayout>
);
}
diff --git a/frontend/src/pages/ApiMonitoring/ApiMonitoringPage.styles.scss b/frontend/src/pages/ApiMonitoring/ApiMonitoringPage.styles.scss
index 63794caf15..c5df9f86a8 100644
--- a/frontend/src/pages/ApiMonitoring/ApiMonitoringPage.styles.scss
+++ b/frontend/src/pages/ApiMonitoring/ApiMonitoringPage.styles.scss
@@ -1,11 +1,4 @@
.api-monitoring-page {
- flex: 1;
- display: flex;
-
- .ant-tabs {
- flex: 1;
- }
-
.ant-tabs-nav {
padding: 0 16px;
margin-bottom: 0px;
@@ -15,22 +8,6 @@
}
}
- .ant-tabs-content-holder {
- display: flex;
-
- .ant-tabs-content {
- flex: 1;
- display: flex;
- flex-direction: column;
-
- .ant-tabs-tabpane {
- flex: 1;
- display: flex;
- flex-direction: column;
- }
- }
- }
-
.tab-item {
display: flex;
justify-content: center;
diff --git a/frontend/src/pages/ApiMonitoring/ApiMonitoringPage.tsx b/frontend/src/pages/ApiMonitoring/ApiMonitoringPage.tsx
index e5760fcaa8..d79e4ad30c 100644
--- a/frontend/src/pages/ApiMonitoring/ApiMonitoringPage.tsx
+++ b/frontend/src/pages/ApiMonitoring/ApiMonitoringPage.tsx
@@ -13,9 +13,12 @@ function ApiMonitoringPage(): JSX.Element {
const routes: TabRoutes[] = [Explorer];
return (
- <div className="api-monitoring-page">
- <RouteTab routes={routes} activeKey={pathname} history={history} />
- </div>
+ <RouteTab
+ className="api-monitoring-page"
+ routes={routes}
+ activeKey={pathname}
+ history={history}
+ />
);
}
diff --git a/frontend/src/pages/InfrastructureMonitoring/InfrastructureMonitoring.styles.scss b/frontend/src/pages/InfrastructureMonitoring/InfrastructureMonitoring.styles.scss
index 9eea96fdab..9019677292 100644
--- a/frontend/src/pages/InfrastructureMonitoring/InfrastructureMonitoring.styles.scss
+++ b/frontend/src/pages/InfrastructureMonitoring/InfrastructureMonitoring.styles.scss
@@ -1,13 +1,4 @@
.infra-monitoring-module-container {
- flex: 1;
- display: flex;
- flex-direction: column;
- height: 100%;
-
- .ant-tabs {
- height: 100%;
- }
-
.ant-tabs-nav {
padding: 0 8px;
margin-bottom: 0px;
@@ -17,22 +8,6 @@
}
}
- .ant-tabs-content-holder {
- display: flex;
-
- .ant-tabs-content {
- flex: 1;
- display: flex;
- flex-direction: column;
-
- .ant-tabs-tabpane {
- flex: 1;
- display: flex;
- flex-direction: column;
- }
- }
- }
-
.tab-item {
display: flex;
justify-content: center;
diff --git a/frontend/src/pages/InfrastructureMonitoring/InfrastructureMonitoringPage.tsx b/frontend/src/pages/InfrastructureMonitoring/InfrastructureMonitoringPage.tsx
index d99199fdb6..128fc15f89 100644
--- a/frontend/src/pages/InfrastructureMonitoring/InfrastructureMonitoringPage.tsx
+++ b/frontend/src/pages/InfrastructureMonitoring/InfrastructureMonitoringPage.tsx
@@ -13,8 +13,11 @@ export default function InfrastructureMonitoringPage(): JSX.Element {
const routes: TabRoutes[] = [Hosts, Kubernetes];
return (
- <div className="infra-monitoring-module-container">
- <RouteTab routes={routes} activeKey={pathname} history={history} />
- </div>
+ <RouteTab
+ className="infra-monitoring-module-container"
+ routes={routes}
+ activeKey={pathname}
+ history={history}
+ />
);
}
diff --git a/frontend/src/pages/LogsModulePage/LogsModulePage.styles.scss b/frontend/src/pages/LogsModulePage/LogsModulePage.styles.scss
index c5dddd9f24..d7f0d12429 100644
--- a/frontend/src/pages/LogsModulePage/LogsModulePage.styles.scss
+++ b/frontend/src/pages/LogsModulePage/LogsModulePage.styles.scss
@@ -1,16 +1,4 @@
.logs-module-container {
- flex: 1;
- min-height: 0;
- display: flex;
- flex-direction: column;
-
- .ant-tabs {
- flex: 1;
- min-height: 0;
- display: flex;
- flex-direction: column;
- }
-
.ant-tabs-nav {
padding: 0 16px;
margin-bottom: 0px;
@@ -20,25 +8,6 @@
}
}
- .ant-tabs-content-holder {
- display: flex;
- min-height: 0;
-
- .ant-tabs-content {
- flex: 1;
- min-height: 0;
- display: flex;
- flex-direction: column;
-
- .ant-tabs-tabpane {
- flex: 1;
- min-height: 0;
- display: flex;
- flex-direction: column;
- }
- }
- }
-
.tab-item {
display: flex;
justify-content: center;
diff --git a/frontend/src/pages/LogsModulePage/LogsModulePage.tsx b/frontend/src/pages/LogsModulePage/LogsModulePage.tsx
index 0adb876321..aae2380a31 100644
--- a/frontend/src/pages/LogsModulePage/LogsModulePage.tsx
+++ b/frontend/src/pages/LogsModulePage/LogsModulePage.tsx
@@ -13,8 +13,11 @@ export default function LogsModulePage(): JSX.Element {
const routes: TabRoutes[] = [logsExplorer, logsPipelines, logSaveView];
return (
- <div className="logs-module-container">
- <RouteTab routes={routes} activeKey={pathname} history={history} />
- </div>
+ <RouteTab
+ className="logs-module-container"
+ routes={routes}
+ activeKey={pathname}
+ history={history}
+ />
);
}
diff --git a/frontend/src/pages/MessagingQueues/MessagingQueuesMainPage.styles.scss b/frontend/src/pages/MessagingQueues/MessagingQueuesMainPage.styles.scss
index 9108e867a1..bd34556487 100644
--- a/frontend/src/pages/MessagingQueues/MessagingQueuesMainPage.styles.scss
+++ b/frontend/src/pages/MessagingQueues/MessagingQueuesMainPage.styles.scss
@@ -1,13 +1,4 @@
.messaging-queues-module-container {
- flex: 1;
- display: flex;
- flex-direction: column;
- height: 100%;
-
- .ant-tabs {
- height: 100%;
- }
-
.ant-tabs-nav {
padding: 0 8px;
margin-bottom: 0px;
@@ -17,22 +8,6 @@
}
}
- .ant-tabs-content-holder {
- display: flex;
-
- .ant-tabs-content {
- flex: 1;
- display: flex;
- flex-direction: column;
-
- .ant-tabs-tabpane {
- flex: 1;
- display: flex;
- flex-direction: column;
- }
- }
- }
-
.tab-item {
display: flex;
justify-content: center;
diff --git a/frontend/src/pages/MessagingQueues/MessagingQueuesMainPage.tsx b/frontend/src/pages/MessagingQueues/MessagingQueuesMainPage.tsx
index 1d5fa5b83f..ebc21e0a98 100644
--- a/frontend/src/pages/MessagingQueues/MessagingQueuesMainPage.tsx
+++ b/frontend/src/pages/MessagingQueues/MessagingQueuesMainPage.tsx
@@ -68,8 +68,11 @@ export default function MessagingQueuesMainPage(): JSX.Element {
];
return (
- <div className="messaging-queues-module-container">
- <RouteTab routes={routes} activeKey={pathname} history={history} />
- </div>
+ <RouteTab
+ className="messaging-queues-module-container"
+ routes={routes}
+ activeKey={pathname}
+ history={history}
+ />
);
}
diff --git a/frontend/src/pages/MeterExplorer/MeterExplorerPage.tsx b/frontend/src/pages/MeterExplorer/MeterExplorerPage.tsx
index 626ef30f43..a0fcd3263c 100644
--- a/frontend/src/pages/MeterExplorer/MeterExplorerPage.tsx
+++ b/frontend/src/pages/MeterExplorer/MeterExplorerPage.tsx
@@ -14,14 +14,13 @@ function MeterExplorerPage(): JSX.Element {
const routes: TabRoutes[] = [Meter, Explorer, Views];
return (
- <div className="meter-explorer-page">
- <RouteTab
- routes={routes}
- activeKey={pathname}
- history={history}
- defaultActiveKey={ROUTES.METER}
- />
- </div>
+ <RouteTab
+ className="meter-explorer-page"
+ routes={routes}
+ activeKey={pathname}
+ history={history}
+ defaultActiveKey={ROUTES.METER}
+ />
);
}
diff --git a/frontend/src/pages/MetricsExplorer/MetricsExplorerPage.styles.scss b/frontend/src/pages/MetricsExplorer/MetricsExplorerPage.styles.scss
index 41dbed2aeb..5eb129ae78 100644
--- a/frontend/src/pages/MetricsExplorer/MetricsExplorerPage.styles.scss
+++ b/frontend/src/pages/MetricsExplorer/MetricsExplorerPage.styles.scss
@@ -1,13 +1,4 @@
.metrics-explorer-page {
- flex: 1;
- display: flex;
- flex-direction: column;
- height: 100%;
-
- .ant-tabs {
- height: 100%;
- }
-
.ant-tabs-nav {
padding-left: 16px;
margin-bottom: 0px;
@@ -18,20 +9,7 @@
}
.ant-tabs-content-holder {
- display: flex;
padding: 16px;
-
- .ant-tabs-content {
- flex: 1;
- display: flex;
- flex-direction: column;
-
- .ant-tabs-tabpane {
- flex: 1;
- display: flex;
- flex-direction: column;
- }
- }
}
.tab-item {
diff --git a/frontend/src/pages/MetricsExplorer/MetricsExplorerPage.tsx b/frontend/src/pages/MetricsExplorer/MetricsExplorerPage.tsx
index 2bb0a301e6..bf4e178245 100644
--- a/frontend/src/pages/MetricsExplorer/MetricsExplorerPage.tsx
+++ b/frontend/src/pages/MetricsExplorer/MetricsExplorerPage.tsx
@@ -42,9 +42,12 @@ function MetricsExplorerPage(): JSX.Element {
useShareBuilderUrl({ defaultValue: defaultQuery });
return (
- <div className="metrics-explorer-page">
- <RouteTab routes={routes} activeKey={pathname} history={history} />
- </div>
+ <RouteTab
+ className="metrics-explorer-page"
+ routes={routes}
+ activeKey={pathname}
+ history={history}
+ />
);
}
diff --git a/frontend/src/pages/TracesExplorer/TracesExplorer.styles.scss b/frontend/src/pages/TracesExplorer/TracesExplorer.styles.scss
index d4d3f11be6..e28fec0813 100644
--- a/frontend/src/pages/TracesExplorer/TracesExplorer.styles.scss
+++ b/frontend/src/pages/TracesExplorer/TracesExplorer.styles.scss
@@ -65,8 +65,6 @@
}
.trace-explorer-page {
- display: flex;
-
// Meant to fix the query builder colors
--input-background: var(--l2-background);
--input-hover-background: var(--l2-background);
@@ -75,32 +73,8 @@
--input-hover-border-color: var(--internal-ant-border-color-hover);
--input-focus-border-color: var(--internal-ant-border-color-hover);
- .filter {
- width: 260px;
- height: 100%;
- min-height: 100vh;
-
- border-right: 0px;
- border: 1px solid var(--l1-border);
- background-color: var(--l1-background);
-
- > .ant-card-body {
- padding: 0;
- width: 258px;
- }
- }
-
.trace-explorer {
- width: 100%;
background: var(--l1-background);
-
- > .ant-card-body {
- padding: 0;
- }
-
border-color: var(--l1-border);
}
- .trace-explorer.filters-expanded {
- width: calc(100% - 260px);
- }
}
diff --git a/frontend/src/pages/TracesExplorer/index.tsx b/frontend/src/pages/TracesExplorer/index.tsx
index 5d10e7f5e2..a0ad27d19c 100644
--- a/frontend/src/pages/TracesExplorer/index.tsx
+++ b/frontend/src/pages/TracesExplorer/index.tsx
@@ -2,12 +2,10 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useQueryClient } from 'react-query';
import { useSearchParams } from 'react-router-dom-v5-compat';
import * as Sentry from '@sentry/react';
-import { Card } from 'antd';
import logEvent from 'api/common/logEvent';
-import cx from 'classnames';
import ExplorerCard from 'components/ExplorerCard/ExplorerCard';
import QueryCancelledPlaceholder from 'components/QueryCancelledPlaceholder';
-import QuickFilters from 'components/QuickFilters/QuickFilters';
+import QuickFiltersLayout from 'components/QuickFilters/QuickFiltersLayout/QuickFiltersLayout';
import { useSignalFieldApis } from 'components/QuickFilters/hooks/useSignalFieldApis';
import { QuickFiltersSource, SignalType } from 'components/QuickFilters/types';
import WarningPopover from 'components/WarningPopover/WarningPopover';
@@ -261,23 +259,20 @@ function TracesExplorer(): JSX.Element {
return (
<Sentry.ErrorBoundary fallback={<ErrorBoundaryFallback />}>
- <div className="trace-explorer-page">
- <Card className="filter" hidden={!isOpen}>
- <QuickFilters
- className="qf-traces-explorer"
- source={QuickFiltersSource.TRACES_EXPLORER}
- signal={SignalType.TRACES}
- handleFilterVisibilityChange={(): void => {
- setOpen(!isOpen);
- }}
- useFieldApis={quickFilterFieldApis}
- />
- </Card>
- <div
- className={cx('trace-explorer', {
- 'filters-expanded': isOpen,
- })}
- >
+ <QuickFiltersLayout
+ className="trace-explorer-page"
+ showFilters={isOpen}
+ quickFilterProps={{
+ className: 'qf-traces-explorer',
+ source: QuickFiltersSource.TRACES_EXPLORER,
+ signal: SignalType.TRACES,
+ handleFilterVisibilityChange: (): void => {
+ setOpen(!isOpen);
+ },
+ useFieldApis: quickFilterFieldApis,
+ }}
+ >
+ <div className="trace-explorer">
<div className="trace-explorer-header">
<Toolbar
showAutoRefresh
@@ -369,7 +364,7 @@ function TracesExplorer(): JSX.Element {
handleChangeSelectedView={handleChangeSelectedView}
/>
</div>
- </div>
+ </QuickFiltersLayout>
</Sentry.ErrorBoundary>
);
}
diff --git a/frontend/src/pages/TracesModulePage/TracesModulePage.tsx b/frontend/src/pages/TracesModulePage/TracesModulePage.tsx
index fed9eeee5f..20f74ebf4c 100644
--- a/frontend/src/pages/TracesModulePage/TracesModulePage.tsx
+++ b/frontend/src/pages/TracesModulePage/TracesModulePage.tsx
@@ -25,16 +25,15 @@ function TracesModulePage(): JSX.Element {
};
return (
- <div className="traces-module-container">
- <RouteTab
- routes={routes}
- activeKey={
- pathname.includes(ROUTES.TRACES_FUNNELS) ? ROUTES.TRACES_FUNNELS : pathname
- }
- history={history}
- onChangeHandler={handleTabChange}
- />
- </div>
+ <RouteTab
+ className="traces-module-container"
+ routes={routes}
+ activeKey={
+ pathname.includes(ROUTES.TRACES_FUNNELS) ? ROUTES.TRACES_FUNNELS : pathname
+ }
+ history={history}
+ onChangeHandler={handleTabChange}
+ />
);
}