From a804f8d31ad9a3f5e55779e78d068143e0b888ff Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 15:20:57 +0530 Subject: [PATCH 1/5] feat: show only 5 rows of data when previewing --- src/components/molecules/InterpretationLog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/molecules/InterpretationLog.tsx b/src/components/molecules/InterpretationLog.tsx index 0d660e5e..2883233c 100644 --- a/src/components/molecules/InterpretationLog.tsx +++ b/src/components/molecules/InterpretationLog.tsx @@ -173,7 +173,7 @@ export const InterpretationLog: React.FC = ({ isOpen, se - {tableData.map((row, index) => ( + {tableData.slice(0, Math.min(5, tableData.length)).map((row, index) => ( {columns.map((column) => ( {row[column]} From 13ca1155b247303f443fa2fdb30d78830a64da01 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 15:21:12 +0530 Subject: [PATCH 2/5] chore: lint --- .../molecules/InterpretationLog.tsx | 172 +++++++++--------- 1 file changed, 86 insertions(+), 86 deletions(-) diff --git a/src/components/molecules/InterpretationLog.tsx b/src/components/molecules/InterpretationLog.tsx index 2883233c..717eab56 100644 --- a/src/components/molecules/InterpretationLog.tsx +++ b/src/components/molecules/InterpretationLog.tsx @@ -112,99 +112,99 @@ export const InterpretationLog: React.FC = ({ isOpen, se }, [hasScrapeListAction, hasScrapeSchemaAction, hasScreenshotAction, setIsOpen]); return ( - - - + + + Output Data Preview + +
- Output Data Preview - - - - Output Data Preview - -
- {tableData.length > 0 ? ( - - - - + {tableData.length > 0 ? ( + +
+ + + {columns.map((column) => ( + {column} + ))} + + + + {tableData.slice(0, Math.min(5, tableData.length)).map((row, index) => ( + {columns.map((column) => ( - {column} + {row[column]} ))} - - - {tableData.slice(0, Math.min(5, tableData.length)).map((row, index) => ( - - {columns.map((column) => ( - {row[column]} - ))} - - ))} - -
-
- ) : ( - - - {hasScrapeListAction || hasScrapeSchemaAction || hasScreenshotAction ? ( - <> - - You've successfully trained the robot to perform actions! Click on the button below to get a preview of the data your robot will extract. - - - - ) : ( + ))} + + + + ) : ( + + + {hasScrapeListAction || hasScrapeSchemaAction || hasScreenshotAction ? ( + <> - It looks like you have not selected anything for extraction yet. Once you do, the robot will show a preview of your selections here. + You've successfully trained the robot to perform actions! Click on the button below to get a preview of the data your robot will extract. - )} - + + + ) : ( + + It looks like you have not selected anything for extraction yet. Once you do, the robot will show a preview of your selections here. + + )} - )} -
-
- -
+
+ )} +
+
+ - ); + + ); } \ No newline at end of file From ba253430bbc1364377ff1f6f259c3027198ff551 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 15:57:23 +0530 Subject: [PATCH 3/5] feat: show additional row text --- src/components/molecules/InterpretationLog.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/molecules/InterpretationLog.tsx b/src/components/molecules/InterpretationLog.tsx index 717eab56..0e8b5e98 100644 --- a/src/components/molecules/InterpretationLog.tsx +++ b/src/components/molecules/InterpretationLog.tsx @@ -163,6 +163,7 @@ export const InterpretationLog: React.FC = ({ isOpen, se }} > {tableData.length > 0 ? ( + <> @@ -183,6 +184,8 @@ export const InterpretationLog: React.FC = ({ isOpen, se
+ Additional rows of data will be extracted once you finish recording. + ) : ( From 8ddcfb9c6932e28554c8f949f0051d16a48b714e Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 15:57:35 +0530 Subject: [PATCH 4/5] feat: style additional row text --- src/components/molecules/InterpretationLog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/molecules/InterpretationLog.tsx b/src/components/molecules/InterpretationLog.tsx index 0e8b5e98..d0cdec7d 100644 --- a/src/components/molecules/InterpretationLog.tsx +++ b/src/components/molecules/InterpretationLog.tsx @@ -184,7 +184,7 @@ export const InterpretationLog: React.FC = ({ isOpen, se - Additional rows of data will be extracted once you finish recording. + Additional rows of data will be extracted once you finish recording. ) : ( From bda63a14bc2f1f99ecfac755a683e2e394ce9292 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 15:57:51 +0530 Subject: [PATCH 5/5] chore: lint --- .../molecules/InterpretationLog.tsx | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/components/molecules/InterpretationLog.tsx b/src/components/molecules/InterpretationLog.tsx index d0cdec7d..83803271 100644 --- a/src/components/molecules/InterpretationLog.tsx +++ b/src/components/molecules/InterpretationLog.tsx @@ -164,28 +164,28 @@ export const InterpretationLog: React.FC = ({ isOpen, se > {tableData.length > 0 ? ( <> - - - - - {columns.map((column) => ( - {column} - ))} - - - - {tableData.slice(0, Math.min(5, tableData.length)).map((row, index) => ( - + +
+ + {columns.map((column) => ( - {row[column]} + {column} ))} - ))} - -
-
- Additional rows of data will be extracted once you finish recording. - + + + {tableData.slice(0, Math.min(5, tableData.length)).map((row, index) => ( + + {columns.map((column) => ( + {row[column]} + ))} + + ))} + + + + Additional rows of data will be extracted once you finish recording. + ) : (