From 98da4aff48b2b90a0bd8ee894a77e68943ba7b2a Mon Sep 17 00:00:00 2001 From: ahmadshaheer Date: Sun, 15 Sep 2024 18:01:45 +0430 Subject: [PATCH 1/3] feat: add expand/collapse button to the top in trace details --- .../TraceDetail/SelectedSpanDetails/index.tsx | 21 +++++++++++++------ .../TraceDetail/TraceDetails.styles.scss | 4 ++++ frontend/src/container/TraceDetail/index.tsx | 19 ++++++++++++----- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/frontend/src/container/TraceDetail/SelectedSpanDetails/index.tsx b/frontend/src/container/TraceDetail/SelectedSpanDetails/index.tsx index 39e180ee12..0b1569d9e0 100644 --- a/frontend/src/container/TraceDetail/SelectedSpanDetails/index.tsx +++ b/frontend/src/container/TraceDetail/SelectedSpanDetails/index.tsx @@ -1,4 +1,4 @@ -import { Button, Modal, Tabs, Tooltip, Typography } from 'antd'; +import { Button, Modal, Row, Tabs, Tooltip, Typography } from 'antd'; import Editor from 'components/Editor'; import { StyledSpace } from 'components/Styled'; import { QueryParams } from 'constants/query'; @@ -6,7 +6,8 @@ import ROUTES from 'constants/routes'; import { useIsDarkMode } from 'hooks/useDarkMode'; import createQueryParams from 'lib/createQueryParams'; import history from 'lib/history'; -import { useState } from 'react'; +import { PanelRight } from 'lucide-react'; +import { Dispatch, SetStateAction, useState } from 'react'; import { useSelector } from 'react-redux'; import { useParams } from 'react-router-dom'; import { AppState } from 'store/reducers'; @@ -28,6 +29,7 @@ function SelectedSpanDetails(props: SelectedSpanDetailsProps): JSX.Element { firstSpanStartTime, traceStartTime = minTime, traceEndTime = maxTime, + setCollapsed, } = props; const { id: traceId } = useParams(); @@ -96,14 +98,20 @@ function SelectedSpanDetails(props: SelectedSpanDetailsProps): JSX.Element { styledclass={[styles.selectedSpanDetailsContainer, styles.overflow]} direction="vertical" > - - Details for selected Span - + Details for selected Span +