From cdf93344c3a54c6cbcf19851d54f16e6e4cd667e Mon Sep 17 00:00:00 2001 From: Sameer Pashikanti Date: Thu, 17 Jul 2025 17:21:44 +0200 Subject: [PATCH 1/3] fix styles for report --- .../components/report/CreateReportForm.tsx | 148 +++++++++--------- 1 file changed, 71 insertions(+), 77 deletions(-) diff --git a/echo/frontend/src/components/report/CreateReportForm.tsx b/echo/frontend/src/components/report/CreateReportForm.tsx index 5555841a..399886ca 100644 --- a/echo/frontend/src/components/report/CreateReportForm.tsx +++ b/echo/frontend/src/components/report/CreateReportForm.tsx @@ -9,7 +9,6 @@ import { Box, Flex, Group, - Center, Title, } from "@mantine/core"; import { ConversationStatusTable } from "./ConversationStatusTable"; @@ -85,104 +84,98 @@ export const CreateReportForm = ({ onSuccess }: { onSuccess: () => void }) => { } return ( - + {/* Inform the user about conversation processing status */} {/* Conversation Status Section */} {hasConversations ? ( <> -
- - - <Trans>Welcome to Reports!</Trans> - - - Generate insights from your conversations - - -
- - - {/* Title Row */} - - - Your Conversations - - - {conversationCounts.total} total - - + + Generate insights from your conversations + - {/* Ready Row - only show if there are finished conversations */} - {hasFinishedConversations && ( - - - - - {conversationCounts.pending === 0 ? ( - All conversations ready - ) : ( - - {conversationCounts.finished}{" "} - {conversationCounts.finished === 1 - ? t`conversation` - : t`conversations`}{" "} - ready - - )} - - - + {hasFinishedConversations && conversationCounts.pending !== 0 && ( + + + {/* Title Row */} + + + Your Conversations + + + {conversationCounts.total} total + - )} - {/* Processing Row - only show if there are pending conversations */} - {hasPendingConversations && ( - <> + {/* Ready Row - only show if there are finished conversations */} + {hasFinishedConversations && ( - + - {conversationCounts.pending}{" "} - {conversationCounts.pending === 1 - ? t`conversation` - : t`conversations`}{" "} - processing + {conversationCounts.pending === 0 ? ( + All conversations ready + ) : ( + + {conversationCounts.finished}{" "} + {conversationCounts.finished === 1 + ? t`conversation` + : t`conversations`}{" "} + ready + + )} - - ~30 min - + - - )} - - + )} + + {/* Processing Row - only show if there are pending conversations */} + {hasPendingConversations && ( + <> + + + + + {conversationCounts.pending}{" "} + {conversationCounts.pending === 1 + ? t`conversation` + : t`conversations`}{" "} + processing + + + + ~30 min + + + + )} + + + )} ) : ( /* No conversations message */ -
- - - - No conversations yet - - - - To generate a report, please start by adding conversations in - your project - - - -
+ + + + No conversations yet + + + + To generate a report, please start by adding conversations in + your project + + +
)} {/* Detailed Conversation Modal */} {hasConversations && hasPendingConversations && ( <> - - + + {conversationCounts.finished} conversations{" "} @@ -190,7 +183,7 @@ export const CreateReportForm = ({ onSuccess }: { onSuccess: () => void }) => { {hasPendingConversations && ( - + You can still use the Ask feature to chat with any conversation @@ -218,6 +211,7 @@ export const CreateReportForm = ({ onSuccess }: { onSuccess: () => void }) => { )} + Date: Thu, 17 Jul 2025 15:36:10 +0000 Subject: [PATCH 2/3] Refactor CreateReportForm to simplify conversation status rendering by removing unnecessary conditionals for pending conversations. --- echo/frontend/src/components/report/CreateReportForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/echo/frontend/src/components/report/CreateReportForm.tsx b/echo/frontend/src/components/report/CreateReportForm.tsx index 399886ca..288ad23b 100644 --- a/echo/frontend/src/components/report/CreateReportForm.tsx +++ b/echo/frontend/src/components/report/CreateReportForm.tsx @@ -94,7 +94,7 @@ export const CreateReportForm = ({ onSuccess }: { onSuccess: () => void }) => { Generate insights from your conversations - {hasFinishedConversations && conversationCounts.pending !== 0 && ( + {conversationCounts.pending !== 0 && ( {/* Title Row */} From 7e1b19657259a3853e3c4e78e70bace8d40c142f Mon Sep 17 00:00:00 2001 From: Usama Date: Thu, 17 Jul 2025 15:55:58 +0000 Subject: [PATCH 3/3] Enhance CreateReportForm with improved conversation status display and localization updates - Updated CreateReportForm to conditionally render language selection based on finished conversations. - Enhanced user interaction by making conversation count clickable to open a modal. - Revised localization files for multiple languages to reflect changes in conversation status messages and UI elements. - Adjusted line numbers in localization files for accurate mapping to the CreateReportForm component. --- .../components/report/CreateReportForm.tsx | 48 +-- echo/frontend/src/locales/de-DE.po | 309 +++++++++--------- echo/frontend/src/locales/de-DE.ts | 2 +- echo/frontend/src/locales/en-US.po | 309 +++++++++--------- echo/frontend/src/locales/en-US.ts | 2 +- echo/frontend/src/locales/es-ES.po | 309 +++++++++--------- echo/frontend/src/locales/es-ES.ts | 2 +- echo/frontend/src/locales/fr-FR.po | 309 +++++++++--------- echo/frontend/src/locales/fr-FR.ts | 2 +- echo/frontend/src/locales/nl-NL.po | 309 +++++++++--------- echo/frontend/src/locales/nl-NL.ts | 2 +- 11 files changed, 821 insertions(+), 782 deletions(-) diff --git a/echo/frontend/src/components/report/CreateReportForm.tsx b/echo/frontend/src/components/report/CreateReportForm.tsx index 288ad23b..059d99e0 100644 --- a/echo/frontend/src/components/report/CreateReportForm.tsx +++ b/echo/frontend/src/components/report/CreateReportForm.tsx @@ -176,7 +176,18 @@ export const CreateReportForm = ({ onSuccess }: { onSuccess: () => void }) => { <> - + { + e.preventDefault(); + setModalOpened(true); + }} + className="cursor-pointer underline-offset-4 hover:underline" + > {conversationCounts.finished} conversations{" "} will be included in your report @@ -185,19 +196,11 @@ export const CreateReportForm = ({ onSuccess }: { onSuccess: () => void }) => { {hasPendingConversations && ( - You can still use the Ask feature to chat with any - conversation + In the meantime, if you want to analyze the conversations that + are still processing, you can use the Chat feature )} - void }) => { )} - - - Please select a language for your report - - } - onChange={(e) => setLanguage(e.target.value)} - data={languageOptionsByIso639_1} - /> + {hasFinishedConversations && ( + + Please select a language for your report + + } + onChange={(e) => setLanguage(e.target.value)} + data={languageOptionsByIso639_1} + /> + )}