From 92e5986af28f7bc78f768fdb0f5c014a95eeadec Mon Sep 17 00:00:00 2001 From: Yunus M Date: Thu, 28 Aug 2025 19:03:29 +0530 Subject: [PATCH] feat: replace infinity list view component with data table component (#8904) * feat: replace infinity list view component with data table component * feat: remove duplicate hook calls * chore: add @signozhq/table to transformIgnorePatterns * feat: update test cases for frequency chart in logs explorer * feat: address review comments , add sonner for notifications * feat: address review comments --- frontend/jest.config.ts | 2 +- frontend/package.json | 2 + frontend/src/components/LogDetail/index.tsx | 11 + .../Logs/TableView/useTableView.tsx | 9 + frontend/src/constants/localStorage.ts | 1 + frontend/src/container/AppLayout/index.tsx | 3 + .../ExplorerOptions.styles.scss | 3 +- .../ExplorerOptionsHideArea.styles.scss | 2 +- .../LiveLogs/LiveLogsContainer/styles.ts | 3 + .../LogsExplorerChart.styled.ts | 14 - .../LogsExplorerChart.styles.scss | 25 ++ .../src/container/LogsExplorerChart/index.tsx | 11 +- .../ColumnView/ColumnView.tsx | 240 ++++++++++++ .../LogsExplorerList.interfaces.ts | 1 + .../LogsExplorerList.style.scss | 358 ++++++++++++++++++ .../src/container/LogsExplorerList/index.tsx | 154 ++++---- .../LogsExplorerViews.styles.scss | 22 +- .../src/container/LogsExplorerViews/index.tsx | 40 +- .../container/OptionsMenu/useOptionsMenu.ts | 27 -- .../ToolbarActions/ToolbarActions.styles.scss | 6 +- frontend/src/hooks/logs/types.ts | 1 + frontend/src/hooks/logs/useCopyLogLink.ts | 23 +- frontend/src/hooks/useDragColumns/index.ts | 8 + frontend/src/hooks/useDragColumns/types.ts | 1 + .../__tests__/LogsExplorer.test.tsx | 10 +- frontend/yarn.lock | 73 ++++ 26 files changed, 894 insertions(+), 156 deletions(-) delete mode 100644 frontend/src/container/LogsExplorerChart/LogsExplorerChart.styled.ts create mode 100644 frontend/src/container/LogsExplorerChart/LogsExplorerChart.styles.scss create mode 100644 frontend/src/container/LogsExplorerList/ColumnView/ColumnView.tsx diff --git a/frontend/jest.config.ts b/frontend/jest.config.ts index e8039dfa2337..18b0989113ff 100644 --- a/frontend/jest.config.ts +++ b/frontend/jest.config.ts @@ -26,7 +26,7 @@ const config: Config.InitialOptions = { '^.+\\.(js|jsx)$': 'babel-jest', }, transformIgnorePatterns: [ - 'node_modules/(?!(lodash-es|react-dnd|core-dnd|@react-dnd|dnd-core|react-dnd-html5-backend|axios|@signozhq/design-tokens|@signozhq/calendar|@signozhq/input|@signozhq/popover|@signozhq/button|date-fns|d3-interpolate|d3-color|api|@codemirror|@lezer|@marijn)/)', + 'node_modules/(?!(lodash-es|react-dnd|core-dnd|@react-dnd|dnd-core|react-dnd-html5-backend|axios|@signozhq/design-tokens|@signozhq/table|@signozhq/calendar|@signozhq/input|@signozhq/popover|@signozhq/button|@signozhq/sonner|@signozhq/*|date-fns|d3-interpolate|d3-color|api|@codemirror|@lezer|@marijn)/)', ], setupFilesAfterEnv: ['jest.setup.ts'], testPathIgnorePatterns: ['/node_modules/', '/public/'], diff --git a/frontend/package.json b/frontend/package.json index 23ce15c06294..f9694175297e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -48,6 +48,8 @@ "@signozhq/design-tokens": "1.1.4", "@signozhq/input": "0.0.2", "@signozhq/popover": "0.0.0", + "@signozhq/sonner": "0.1.0", + "@signozhq/table": "0.3.4", "@tanstack/react-table": "8.20.6", "@tanstack/react-virtual": "3.11.2", "@uiw/codemirror-theme-copilot": "4.23.11", diff --git a/frontend/src/components/LogDetail/index.tsx b/frontend/src/components/LogDetail/index.tsx index 8e894cf21836..23a50ca3d75c 100644 --- a/frontend/src/components/LogDetail/index.tsx +++ b/frontend/src/components/LogDetail/index.tsx @@ -23,6 +23,7 @@ import { } from 'container/LogDetailedView/utils'; import useInitialQuery from 'container/LogsExplorerContext/useInitialQuery'; import { useOptionsMenu } from 'container/OptionsMenu'; +import { useCopyLogLink } from 'hooks/logs/useCopyLogLink'; import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder'; import { useIsDarkMode } from 'hooks/useDarkMode'; import { useNotifications } from 'hooks/useNotifications'; @@ -94,6 +95,8 @@ function LogDetailInner({ const { notifications } = useNotifications(); + const { onLogCopy } = useCopyLogLink(log?.id); + const LogJsonData = log ? aggregateAttributesResourcesToString(log) : ''; const handleModeChange = (e: RadioChangeEvent): void => { @@ -333,6 +336,14 @@ function LogDetailInner({ onClick={handleFilterVisible} /> )} + + +