From 2ba8d08acc030c1f49e30665d7efd405e544cbd9 Mon Sep 17 00:00:00 2001 From: Sudheer Salavadi Date: Tue, 9 Jul 2024 13:26:25 +0530 Subject: [PATCH] UI Fixes in console logs --- .../OverviewPanel/components/EventRow/EventRow.tsx | 4 ++-- .../shared/DevTools/ConsolePanel/ConsolePanel.tsx | 7 +++++-- .../components/shared/DevTools/ConsoleRow/ConsoleRow.tsx | 6 +++--- frontend/app/components/ui/Icons/console_info.tsx | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/frontend/app/components/Session_/OverviewPanel/components/EventRow/EventRow.tsx b/frontend/app/components/Session_/OverviewPanel/components/EventRow/EventRow.tsx index cbbdbbddc..e063daddb 100644 --- a/frontend/app/components/Session_/OverviewPanel/components/EventRow/EventRow.tsx +++ b/frontend/app/components/Session_/OverviewPanel/components/EventRow/EventRow.tsx @@ -36,7 +36,7 @@ const EventRow = React.memo((props: Props) => { >
@@ -67,7 +67,7 @@ const EventRow = React.memo((props: Props) => { ); }) ) : ( -
+
None captured.
)} diff --git a/frontend/app/components/shared/DevTools/ConsolePanel/ConsolePanel.tsx b/frontend/app/components/shared/DevTools/ConsolePanel/ConsolePanel.tsx index 503301c78..ef4476c32 100644 --- a/frontend/app/components/shared/DevTools/ConsolePanel/ConsolePanel.tsx +++ b/frontend/app/components/shared/DevTools/ConsolePanel/ConsolePanel.tsx @@ -40,7 +40,7 @@ function renderWithNL(s: string | null = '') { )); } -const getIconProps = (level: any) => { +const getIconProps = (level: LogLevel) => { switch (level) { case LogLevel.INFO: case LogLevel.LOG: @@ -58,8 +58,11 @@ const getIconProps = (level: any) => { name: 'console/error', color: 'red', }; + default: + return { + name: 'console/info', + }; } - return null; }; const INDEX_KEY = 'console'; diff --git a/frontend/app/components/shared/DevTools/ConsoleRow/ConsoleRow.tsx b/frontend/app/components/shared/DevTools/ConsoleRow/ConsoleRow.tsx index 39e18e161..550fab35e 100644 --- a/frontend/app/components/shared/DevTools/ConsoleRow/ConsoleRow.tsx +++ b/frontend/app/components/shared/DevTools/ConsoleRow/ConsoleRow.tsx @@ -34,7 +34,7 @@ function ConsoleRow(props: Props) {
-
+
{canExpand && ( )} - + {renderWithNL(lines.pop())}
diff --git a/frontend/app/components/ui/Icons/console_info.tsx b/frontend/app/components/ui/Icons/console_info.tsx index 674f08c44..787acce26 100644 --- a/frontend/app/components/ui/Icons/console_info.tsx +++ b/frontend/app/components/ui/Icons/console_info.tsx @@ -10,7 +10,7 @@ interface Props { } function Console_info(props: Props) { - const { size = 14, width = size, height = size, fill = '' } = props; + const { size = 14, width = size, height = size, fill = '' } = props; return ( );