From 779983b4872745c1a2a779a348eeb14c34ceddb4 Mon Sep 17 00:00:00 2001 From: Sudheer Salavadi Date: Fri, 5 Jul 2024 16:30:01 +0530 Subject: [PATCH] UI Improvements --- .../components/DashboardList/DashboardList.tsx | 2 +- .../Player/Controls/components/KeyboardHelp.tsx | 4 ++-- .../FetchBasicDetails/FetchBasicDetails.tsx | 8 ++++---- .../components/Notes/NoteItem.tsx | 15 ++++++++------- frontend/app/components/ui/ItemMenu/ItemMenu.tsx | 3 ++- frontend/app/components/ui/Link/Link.js | 2 +- frontend/app/player-ui/PlayButton.tsx | 2 +- frontend/app/svg/ghost.svg | 6 +++--- frontend/tests/mocks/sessionResponse.js | 6 +++--- 9 files changed, 25 insertions(+), 23 deletions(-) diff --git a/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx b/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx index 7661d58cc..55d8f588f 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/DashboardList.tsx @@ -22,7 +22,7 @@ function DashboardList({ siteId }: { siteId: string }) { const history = useHistory(); // Define custom width and height for each scenario - const searchImageDimensions = { width: 200, height: 'auto' }; + const searchImageDimensions = { width: 60, height: 'auto' }; const defaultImageDimensions = { width: 600, height: 'auto' }; const tableConfig: TableColumnsType = [ diff --git a/frontend/app/components/Session_/Player/Controls/components/KeyboardHelp.tsx b/frontend/app/components/Session_/Player/Controls/components/KeyboardHelp.tsx index e33a73083..f6bc094f7 100644 --- a/frontend/app/components/Session_/Player/Controls/components/KeyboardHelp.tsx +++ b/frontend/app/components/Session_/Player/Controls/components/KeyboardHelp.tsx @@ -4,7 +4,7 @@ import {Keyboard} from 'lucide-react' import { Button, Tooltip } from 'antd'; import { useModal } from "../../../../Modal"; -const Key = ({ label }: { label: string }) =>
{label}
; +const Key = ({ label }: { label: string }) =>
{label}
; function Cell({ shortcut, text }: any) { return (
@@ -68,7 +68,7 @@ function KeyboardHelp() { size={'small'} className={'flex items-center justify-center'} onClick={() => { - showModal(, { right: true, width: 420 }) + showModal(, { right: true, width: 320 }) }} > diff --git a/frontend/app/components/shared/FetchDetailsModal/components/FetchBasicDetails/FetchBasicDetails.tsx b/frontend/app/components/shared/FetchDetailsModal/components/FetchBasicDetails/FetchBasicDetails.tsx index 601aa5520..57e750e00 100644 --- a/frontend/app/components/shared/FetchDetailsModal/components/FetchBasicDetails/FetchBasicDetails.tsx +++ b/frontend/app/components/shared/FetchDetailsModal/components/FetchBasicDetails/FetchBasicDetails.tsx @@ -63,7 +63,7 @@ function FetchBasicDetails({ resource, timestamp }: Props) {
Type
- + {resource.type}
@@ -71,7 +71,7 @@ function FetchBasicDetails({ resource, timestamp }: Props) { {!!resource.decodedBodySize && (
Size
- + {formatBytes(resource.decodedBodySize)}
@@ -82,7 +82,7 @@ function FetchBasicDetails({ resource, timestamp }: Props) { {!!_duration && (
Duration
- + {_duration} ms
@@ -91,7 +91,7 @@ function FetchBasicDetails({ resource, timestamp }: Props) { {timestamp && (
Time
- + {timestamp}
diff --git a/frontend/app/components/shared/SessionsTabOverview/components/Notes/NoteItem.tsx b/frontend/app/components/shared/SessionsTabOverview/components/Notes/NoteItem.tsx index 0c365f833..f21e4f060 100644 --- a/frontend/app/components/shared/SessionsTabOverview/components/Notes/NoteItem.tsx +++ b/frontend/app/components/shared/SessionsTabOverview/components/Notes/NoteItem.tsx @@ -48,9 +48,9 @@ function NoteItem(props: Props) { const safeStrMessage = props.note.message.length > 150 ? props.note.message.slice(0, 150) + '...' : props.note.message; return ( -
+
0 @@ -58,7 +58,7 @@ function NoteItem(props: Props) { : `?note=${props.note.noteId}`) } > -
+
{props.note.tag ? ( @@ -70,14 +70,14 @@ function NoteItem(props: Props) { ) : null} -
+
{safeStrMessage}
-
- By +
+ By {props.note.userName},{' '} {formatTimeOrDate(props.note.createdAt as unknown as number, timezone)}
@@ -86,9 +86,10 @@ function NoteItem(props: Props) {
+{/*
-
+
*/}
diff --git a/frontend/app/components/ui/ItemMenu/ItemMenu.tsx b/frontend/app/components/ui/ItemMenu/ItemMenu.tsx index 6a1e23179..62e3ccc2f 100644 --- a/frontend/app/components/ui/ItemMenu/ItemMenu.tsx +++ b/frontend/app/components/ui/ItemMenu/ItemMenu.tsx @@ -98,9 +98,10 @@ export default class ItemMenu extends React.PureComponent { >