From 4d7f940932d4f742d6331c67ebf3df3fc08e8ff0 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 00:45:39 +0530 Subject: [PATCH 01/18] feat: remove margin left --- src/components/molecules/BrowserRecordingSave.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/BrowserRecordingSave.tsx b/src/components/molecules/BrowserRecordingSave.tsx index 34fe0074..109c704b 100644 --- a/src/components/molecules/BrowserRecordingSave.tsx +++ b/src/components/molecules/BrowserRecordingSave.tsx @@ -25,18 +25,19 @@ const BrowserRecordingSave = () => {
- From 938a8eca3e514a8873c8cd743a77692ef9388bef Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 00:48:05 +0530 Subject: [PATCH 02/18] chore: remove console.log --- src/components/organisms/Recordings.tsx | 2 -- src/components/organisms/RightSidePanel.tsx | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/organisms/Recordings.tsx b/src/components/organisms/Recordings.tsx index ec215b98..b90e3bdf 100644 --- a/src/components/organisms/Recordings.tsx +++ b/src/components/organisms/Recordings.tsx @@ -20,8 +20,6 @@ export const Recordings = ({ handleEditRecording, handleRunRecording, setRecordi const [params, setParams] = useState([]); const [selectedRecordingId, setSelectedRecordingId] = useState(''); - console.log(`Selected reocrding id: ${selectedRecordingId}`); - const handleSettingsAndIntegrate = (id: string, name: string, params: string[]) => { if (params.length === 0) { setIntegrateSettingsAreOpen(true); diff --git a/src/components/organisms/RightSidePanel.tsx b/src/components/organisms/RightSidePanel.tsx index fd51f287..9adfad10 100644 --- a/src/components/organisms/RightSidePanel.tsx +++ b/src/components/organisms/RightSidePanel.tsx @@ -375,9 +375,9 @@ export const RightSidePanel: React.FC = ({ onFinishCapture return ( - + {/* Last action: {` ${lastAction}`} - + */} {!getText && !getScreenshot && !getList && showCaptureList && } From be14882792a7625bc85a6eec1e65b074ab1bba83 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 00:55:23 +0530 Subject: [PATCH 03/18] feat: create robot button --- src/components/molecules/RecordingsTable.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/molecules/RecordingsTable.tsx b/src/components/molecules/RecordingsTable.tsx index 4a3a61df..25a0070f 100644 --- a/src/components/molecules/RecordingsTable.tsx +++ b/src/components/molecules/RecordingsTable.tsx @@ -9,7 +9,7 @@ import TablePagination from '@mui/material/TablePagination'; import TableRow from '@mui/material/TableRow'; import { useEffect } from "react"; import { WorkflowFile } from "maxun-core"; -import { IconButton } from "@mui/material"; +import { IconButton, Button, Box } from "@mui/material"; import { Schedule, DeleteForever, Edit, PlayCircle } from "@mui/icons-material"; import LinkIcon from '@mui/icons-material/Link'; import { useGlobalInfoStore } from "../../context/globalInfo"; @@ -126,9 +126,14 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl return ( - - My Robots - + + + My Robots + + + From 6896aed35fae8a267ea25074d6695dc5096f5ba0 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 00:59:46 +0530 Subject: [PATCH 04/18] feat: handle new recording --- src/components/molecules/RecordingsTable.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/RecordingsTable.tsx b/src/components/molecules/RecordingsTable.tsx index 25a0070f..1dfa414a 100644 --- a/src/components/molecules/RecordingsTable.tsx +++ b/src/components/molecules/RecordingsTable.tsx @@ -15,6 +15,9 @@ import LinkIcon from '@mui/icons-material/Link'; import { useGlobalInfoStore } from "../../context/globalInfo"; import { deleteRecordingFromStorage, getStoredRecordings } from "../../api/storage"; import { Typography } from '@mui/material'; +import { Circle, Add, Logout, Clear } from "@mui/icons-material"; +import { Link, useLocation, useNavigate } from 'react-router-dom'; +import { stopRecording } from "../../api/recording"; /** TODO: * 1. allow editing existing robot after persisting browser steps @@ -86,8 +89,10 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl const [page, setPage] = React.useState(0); const [rowsPerPage, setRowsPerPage] = React.useState(10); const [rows, setRows] = React.useState([]); + const [isModalOpen, setModalOpen] = useState(false); - const { notify, setRecordings } = useGlobalInfoStore(); + const { notify, setRecordings, browserId, setBrowserId } = useGlobalInfoStore(); + const navigate = useNavigate(); const handleChangePage = (event: unknown, newPage: number) => { setPage(newPage); @@ -118,6 +123,14 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl } } + const handleNewRecording = async () => { + if (browserId) { + setBrowserId(null); + await stopRecording(browserId); + } + setModalOpen(true); + }; + useEffect(() => { if (rows.length === 0) { fetchRecordings(); @@ -130,7 +143,7 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl My Robots - From 261f47dde0a46bd743446c07983da7c02cc22d86 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:00:33 +0530 Subject: [PATCH 05/18] fix: use React.useState --- src/components/molecules/RecordingsTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/molecules/RecordingsTable.tsx b/src/components/molecules/RecordingsTable.tsx index 1dfa414a..21e0a2ab 100644 --- a/src/components/molecules/RecordingsTable.tsx +++ b/src/components/molecules/RecordingsTable.tsx @@ -89,7 +89,7 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl const [page, setPage] = React.useState(0); const [rowsPerPage, setRowsPerPage] = React.useState(10); const [rows, setRows] = React.useState([]); - const [isModalOpen, setModalOpen] = useState(false); + const [isModalOpen, setModalOpen] = React.useState(false); const { notify, setRecordings, browserId, setBrowserId } = useGlobalInfoStore(); const navigate = useNavigate(); From a78121f40b52c6dd9a00f2dfe322be084c4b5a60 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:04:20 +0530 Subject: [PATCH 06/18] fix: start recording --- src/components/molecules/RecordingsTable.tsx | 33 ++++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/src/components/molecules/RecordingsTable.tsx b/src/components/molecules/RecordingsTable.tsx index 21e0a2ab..a65c23d1 100644 --- a/src/components/molecules/RecordingsTable.tsx +++ b/src/components/molecules/RecordingsTable.tsx @@ -9,15 +9,16 @@ import TablePagination from '@mui/material/TablePagination'; import TableRow from '@mui/material/TableRow'; import { useEffect } from "react"; import { WorkflowFile } from "maxun-core"; -import { IconButton, Button, Box } from "@mui/material"; +import { IconButton, Button, Box, Typography, TextField } from "@mui/material"; import { Schedule, DeleteForever, Edit, PlayCircle } from "@mui/icons-material"; import LinkIcon from '@mui/icons-material/Link'; import { useGlobalInfoStore } from "../../context/globalInfo"; import { deleteRecordingFromStorage, getStoredRecordings } from "../../api/storage"; -import { Typography } from '@mui/material'; import { Circle, Add, Logout, Clear } from "@mui/icons-material"; import { Link, useLocation, useNavigate } from 'react-router-dom'; import { stopRecording } from "../../api/recording"; +import { GenericModal } from '../atoms/GenericModal'; + /** TODO: * 1. allow editing existing robot after persisting browser steps @@ -91,7 +92,7 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl const [rows, setRows] = React.useState([]); const [isModalOpen, setModalOpen] = React.useState(false); - const { notify, setRecordings, browserId, setBrowserId } = useGlobalInfoStore(); + const { notify, setRecordings, browserId, setBrowserId, recordingUrl, setRecordingUrl } = useGlobalInfoStore(); const navigate = useNavigate(); const handleChangePage = (event: unknown, newPage: number) => { @@ -131,6 +132,11 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl setModalOpen(true); }; + const startRecording = () => { + setModalOpen(false); + notify('info', 'New Recording started for ' + recordingUrl); + }; + useEffect(() => { if (rows.length === 0) { fetchRecordings(); @@ -244,6 +250,27 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl onPageChange={handleChangePage} onRowsPerPageChange={handleChangeRowsPerPage} /> + setModalOpen(false)}> +
+ Enter URL To Extract Data + setRecordingUrl(e.target.value)} + style={{ marginBottom: '20px', marginTop: '20px' }} + /> + +
+
); } From 5d6f4faa214e9089d44808b065c4ef2ca728bf72 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:07:11 +0530 Subject: [PATCH 07/18] fix: handle start recording --- src/components/molecules/RecordingsTable.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/molecules/RecordingsTable.tsx b/src/components/molecules/RecordingsTable.tsx index a65c23d1..8ca6ee50 100644 --- a/src/components/molecules/RecordingsTable.tsx +++ b/src/components/molecules/RecordingsTable.tsx @@ -92,7 +92,7 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl const [rows, setRows] = React.useState([]); const [isModalOpen, setModalOpen] = React.useState(false); - const { notify, setRecordings, browserId, setBrowserId, recordingUrl, setRecordingUrl } = useGlobalInfoStore(); + const { notify, setRecordings, browserId, setBrowserId, recordingUrl, setRecordingUrl, recordingName, setRecordingName, recordingId, setRecordingId } = useGlobalInfoStore(); const navigate = useNavigate(); const handleChangePage = (event: unknown, newPage: number) => { @@ -132,8 +132,16 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl setModalOpen(true); }; + const handleStartRecording = () => { + setBrowserId('new-recording'); + setRecordingName(''); + setRecordingId(''); + navigate('/recording'); + } + const startRecording = () => { setModalOpen(false); + handleStartRecording(); notify('info', 'New Recording started for ' + recordingUrl); }; From 5084b55df1880789b2316e9d99e4da2ef3d44321 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:07:53 +0530 Subject: [PATCH 08/18] chore: lint --- src/components/molecules/RecordingsTable.tsx | 40 ++++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/components/molecules/RecordingsTable.tsx b/src/components/molecules/RecordingsTable.tsx index 8ca6ee50..1f6dd492 100644 --- a/src/components/molecules/RecordingsTable.tsx +++ b/src/components/molecules/RecordingsTable.tsx @@ -259,26 +259,26 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl onRowsPerPageChange={handleChangeRowsPerPage} /> setModalOpen(false)}> -
- Enter URL To Extract Data - setRecordingUrl(e.target.value)} - style={{ marginBottom: '20px', marginTop: '20px' }} - /> - -
-
+
+ Enter URL To Extract Data + setRecordingUrl(e.target.value)} + style={{ marginBottom: '20px', marginTop: '20px' }} + /> + +
+ ); } From dff113e0d3becf80c41e28271aa71cb6a9239ee5 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:09:29 +0530 Subject: [PATCH 09/18] feat: create robot icon button --- src/components/molecules/RecordingsTable.tsx | 25 +++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/components/molecules/RecordingsTable.tsx b/src/components/molecules/RecordingsTable.tsx index 1f6dd492..dab4262e 100644 --- a/src/components/molecules/RecordingsTable.tsx +++ b/src/components/molecules/RecordingsTable.tsx @@ -157,9 +157,28 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl My Robots - + + Create Robot +
From 372f64915395bf9410210c05bb8d4b90c94b24f1 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:09:46 +0530 Subject: [PATCH 10/18] chore: lint --- src/components/molecules/RecordingsTable.tsx | 42 ++++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/components/molecules/RecordingsTable.tsx b/src/components/molecules/RecordingsTable.tsx index dab4262e..95ac778b 100644 --- a/src/components/molecules/RecordingsTable.tsx +++ b/src/components/molecules/RecordingsTable.tsx @@ -158,27 +158,27 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl My Robots - Create Robot - + aria-label="new" + size={"small"} + onClick={handleNewRecording} + sx={{ + width: '140px', + borderRadius: '5px', + padding: '8px', + background: '#ff00c3', + color: 'white', + marginRight: '10px', + fontFamily: '"Roboto","Helvetica","Arial",sans-serif', + fontWeight: '500', + fontSize: '0.875rem', + lineHeight: '1.75', + letterSpacing: '0.02857em', + '&:hover': { color: 'white', backgroundColor: '#ff00c3' } + } + } + > + Create Robot +
From ee2a1d06fd2d9c720b25fb11f2cb7c508a3b861c Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:10:16 +0530 Subject: [PATCH 11/18] chore: remove unused imports --- src/components/molecules/RecordingsTable.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/RecordingsTable.tsx b/src/components/molecules/RecordingsTable.tsx index 95ac778b..00386ca3 100644 --- a/src/components/molecules/RecordingsTable.tsx +++ b/src/components/molecules/RecordingsTable.tsx @@ -14,8 +14,8 @@ import { Schedule, DeleteForever, Edit, PlayCircle } from "@mui/icons-material"; import LinkIcon from '@mui/icons-material/Link'; import { useGlobalInfoStore } from "../../context/globalInfo"; import { deleteRecordingFromStorage, getStoredRecordings } from "../../api/storage"; -import { Circle, Add, Logout, Clear } from "@mui/icons-material"; -import { Link, useLocation, useNavigate } from 'react-router-dom'; +import { Add } from "@mui/icons-material"; +import { useNavigate } from 'react-router-dom'; import { stopRecording } from "../../api/recording"; import { GenericModal } from '../atoms/GenericModal'; From 5f7d4b2536d8e7700700dedd423d92a2523e0160 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:11:08 +0530 Subject: [PATCH 12/18] chore: remove Create Robot code --- src/components/molecules/NavBar.tsx | 36 ----------------------------- 1 file changed, 36 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index dbbf2c1c..8d4b3caf 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -49,20 +49,6 @@ export const NavBar: React.FC = ({ newRecording, recordingName, isR navigate('/'); }; - const handleNewRecording = async () => { - if (browserId) { - setBrowserId(null); - await stopRecording(browserId); - } - setModalOpen(true); - }; - - const startRecording = () => { - setModalOpen(false); - newRecording(); - notify('info', 'New Recording started for ' + recordingUrl); - }; - return (
= ({ newRecording, recordingName, isR { !isRecording ? ( <> - - Create Robot - Date: Mon, 21 Oct 2024 01:11:35 +0530 Subject: [PATCH 13/18] chore: remove modal --- src/components/molecules/NavBar.tsx | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 8d4b3caf..95c3ee79 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -107,27 +107,6 @@ export const NavBar: React.FC = ({ newRecording, recordingName, isR }
- setModalOpen(false)}> -
- Enter URL To Extract Data - setRecordingUrl(e.target.value)} - style={{ marginBottom: '20px', marginTop: '20px' }} - /> - -
-
) : "" } From 5433f0b15cad90ab85dd404153b44a427fe5e9e8 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:12:06 +0530 Subject: [PATCH 14/18] chore: remove unused imports --- src/components/molecules/NavBar.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 95c3ee79..c21a2b85 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -3,15 +3,12 @@ import axios from 'axios'; import styled from "styled-components"; import { stopRecording } from "../../api/recording"; import { useGlobalInfoStore } from "../../context/globalInfo"; -import { Button, IconButton, Typography } from "@mui/material"; +import { IconButton } from "@mui/material"; import { RecordingIcon } from "../atoms/RecorderIcon"; import { SaveRecording } from "./SaveRecording"; -import { Circle, Add, Logout, Clear } from "@mui/icons-material"; -import MeetingRoomIcon from '@mui/icons-material/MeetingRoom'; -import { Link, useLocation, useNavigate } from 'react-router-dom'; +import { Logout, Clear } from "@mui/icons-material"; +import { useNavigate } from 'react-router-dom'; import { AuthContext } from '../../context/auth'; -import { GenericModal } from '../atoms/GenericModal'; -import TextField from '@mui/material/TextField'; interface NavBarProps { newRecording: () => void; From ec8144fb177d7987e6333d4d4a777602e15931ee Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:12:27 +0530 Subject: [PATCH 15/18] chore: remove unused imports --- src/components/molecules/NavBar.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index c21a2b85..1c0e8981 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -18,10 +18,9 @@ interface NavBarProps { export const NavBar: React.FC = ({ newRecording, recordingName, isRecording }) => { - const { notify, browserId, setBrowserId, recordingLength, recordingUrl, setRecordingUrl } = useGlobalInfoStore(); + const { notify, browserId, setBrowserId, recordingUrl } = useGlobalInfoStore(); const { state, dispatch } = useContext(AuthContext); const { user } = state; - const [isModalOpen, setModalOpen] = useState(false); console.log(`Recording URL: ${recordingUrl}`) From 6072ed7d65193944612e535b3b39d8e68712bc73 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:13:06 +0530 Subject: [PATCH 16/18] feat: remove new recording prop --- src/components/molecules/NavBar.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 1c0e8981..d60faccc 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -11,12 +11,11 @@ import { useNavigate } from 'react-router-dom'; import { AuthContext } from '../../context/auth'; interface NavBarProps { - newRecording: () => void; recordingName: string; isRecording: boolean; } -export const NavBar: React.FC = ({ newRecording, recordingName, isRecording }) => { +export const NavBar: React.FC = ({ recordingName, isRecording }) => { const { notify, browserId, setBrowserId, recordingUrl } = useGlobalInfoStore(); const { state, dispatch } = useContext(AuthContext); From da75e34991a9cafd61c4708dd24f3a4f1126b25c Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:14:05 +0530 Subject: [PATCH 17/18] feat: remove new recording prop --- src/pages/PageWrappper.tsx | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/pages/PageWrappper.tsx b/src/pages/PageWrappper.tsx index 09b0106f..4a444c17 100644 --- a/src/pages/PageWrappper.tsx +++ b/src/pages/PageWrappper.tsx @@ -20,13 +20,6 @@ export const PageWrapper = () => { const { browserId, setBrowserId, notification, recordingName, setRecordingName, recordingId, setRecordingId } = useGlobalInfoStore(); - const handleNewRecording = () => { - setBrowserId('new-recording'); - setRecordingName(''); - setRecordingId(''); - navigate('/recording'); - } - const handleEditRecording = (recordingId: string, fileName: string) => { setRecordingName(fileName); setRecordingId(recordingId); @@ -57,11 +50,7 @@ export const PageWrapper = () => { - { - !!browserId ? ( - "" - ) : - } + }> } /> From db789a0fc7db54a83bb0a77cf02fa987cc7b4d8f Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:14:32 +0530 Subject: [PATCH 18/18] chore: lint --- src/components/molecules/NavBar.tsx | 40 ++++++++++++++--------------- src/pages/PageWrappper.tsx | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index d60faccc..85b57b24 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -80,26 +80,26 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => Logout - ) : - <> - - - Discard - - + ) : + <> + + + Discard + + } diff --git a/src/pages/PageWrappper.tsx b/src/pages/PageWrappper.tsx index 4a444c17..2b34e58c 100644 --- a/src/pages/PageWrappper.tsx +++ b/src/pages/PageWrappper.tsx @@ -50,7 +50,7 @@ export const PageWrapper = () => { - + }> } />