From 25b3ba5b79a33b965f6d47a267e484c29b372a2c Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Thu, 15 Feb 2024 18:17:33 -0300 Subject: [PATCH 1/5] new layout error page --- .../components/CrashErrorComponent/index.tsx | 89 +++++++++++++------ src/frontend/src/pages/MainPage/index.tsx | 3 +- 2 files changed, 64 insertions(+), 28 deletions(-) diff --git a/src/frontend/src/components/CrashErrorComponent/index.tsx b/src/frontend/src/components/CrashErrorComponent/index.tsx index f5018f885..ce6fc027b 100644 --- a/src/frontend/src/components/CrashErrorComponent/index.tsx +++ b/src/frontend/src/components/CrashErrorComponent/index.tsx @@ -5,32 +5,69 @@ export default function CrashErrorComponent({ resetErrorBoundary, }: crashComponentPropsType): JSX.Element { return ( -
-
-

- Oops! An unknown error has occurred. -

-

- Please click the 'Reset Application' button to restore the - application's state. If the error persists, please create an issue on - our GitHub page. We apologize for any inconvenience this may have - caused. -

-
- - - Create Issue - +
+
+
+
+

+ 🚀 Whoops! We've Hit a Snag. +

+ + Hey there, it looks like we've encountered a bit of a hiccup. + +
+
+

+ But don't worry, it happens to the best of us! We're all about + making things better together. +

+
+ +
+

+ 🔧 Quick Fix: Try hitting the{" "} + 'Restart the Adventure' button + to get things moving again. It's like a magic wand for minor + glitches! +

+
+ +
+

+ 📝 Still Stuck? Let's Solve It Together: If our magic wand didn't + do the trick, we'd love your help to dig a bit deeper. By + reporting this hiccup on our{" "} + + GitHub + {" "} + page, you're not just fixing your own experience but also helping + the whole community. +

+
+ +
+ + + + + +
diff --git a/src/frontend/src/pages/MainPage/index.tsx b/src/frontend/src/pages/MainPage/index.tsx index 6e0c5cb55..65a308808 100644 --- a/src/frontend/src/pages/MainPage/index.tsx +++ b/src/frontend/src/pages/MainPage/index.tsx @@ -6,7 +6,6 @@ import IconComponent from "../../components/genericIconComponent"; import PageLayout from "../../components/pageLayout"; import SidebarNav from "../../components/sidebarComponent"; import { Button } from "../../components/ui/button"; -import { USER_PROJECTS_HEADER } from "../../constants/constants"; import useAlertStore from "../../stores/alertStore"; import useFlowsManagerStore from "../../stores/flowsManagerStore"; import { downloadFlows } from "../../utils/reactflowUtils"; @@ -70,7 +69,7 @@ export default function HomePage(): JSX.Element { // Personal flows display return ( From e922d5a0bdfa90e8e13e789755db8def8fafa869 Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Mon, 19 Feb 2024 10:59:50 -0300 Subject: [PATCH 2/5] add new error page --- .../components/CrashErrorComponent/index.tsx | 89 +++++++++++++------ 1 file changed, 63 insertions(+), 26 deletions(-) diff --git a/src/frontend/src/components/CrashErrorComponent/index.tsx b/src/frontend/src/components/CrashErrorComponent/index.tsx index f5018f885..ce6fc027b 100644 --- a/src/frontend/src/components/CrashErrorComponent/index.tsx +++ b/src/frontend/src/components/CrashErrorComponent/index.tsx @@ -5,32 +5,69 @@ export default function CrashErrorComponent({ resetErrorBoundary, }: crashComponentPropsType): JSX.Element { return ( -
-
-

- Oops! An unknown error has occurred. -

-

- Please click the 'Reset Application' button to restore the - application's state. If the error persists, please create an issue on - our GitHub page. We apologize for any inconvenience this may have - caused. -

-
- - - Create Issue - +
+
+
+
+

+ 🚀 Whoops! We've Hit a Snag. +

+ + Hey there, it looks like we've encountered a bit of a hiccup. + +
+
+

+ But don't worry, it happens to the best of us! We're all about + making things better together. +

+
+ +
+

+ 🔧 Quick Fix: Try hitting the{" "} + 'Restart the Adventure' button + to get things moving again. It's like a magic wand for minor + glitches! +

+
+ +
+

+ 📝 Still Stuck? Let's Solve It Together: If our magic wand didn't + do the trick, we'd love your help to dig a bit deeper. By + reporting this hiccup on our{" "} + + GitHub + {" "} + page, you're not just fixing your own experience but also helping + the whole community. +

+
+ +
+ + + + + +
From 95bf9d73127cead3a676dc3677e7ebc5f43a374e Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Mon, 19 Feb 2024 11:01:38 -0300 Subject: [PATCH 3/5] add new error page --- src/frontend/src/pages/MainPage/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/pages/MainPage/index.tsx b/src/frontend/src/pages/MainPage/index.tsx index 65a308808..6e0c5cb55 100644 --- a/src/frontend/src/pages/MainPage/index.tsx +++ b/src/frontend/src/pages/MainPage/index.tsx @@ -6,6 +6,7 @@ import IconComponent from "../../components/genericIconComponent"; import PageLayout from "../../components/pageLayout"; import SidebarNav from "../../components/sidebarComponent"; import { Button } from "../../components/ui/button"; +import { USER_PROJECTS_HEADER } from "../../constants/constants"; import useAlertStore from "../../stores/alertStore"; import useFlowsManagerStore from "../../stores/flowsManagerStore"; import { downloadFlows } from "../../utils/reactflowUtils"; @@ -69,7 +70,7 @@ export default function HomePage(): JSX.Element { // Personal flows display return ( From 34d83d82b558cee881c930244ae2c97f831e02c1 Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Wed, 28 Feb 2024 16:35:00 -0300 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=8E=A8=20style(CrashErrorComponent/in?= =?UTF-8?q?dex.tsx):=20refactor=20CrashErrorComponent=20to=20use=20UI=20co?= =?UTF-8?q?mponents=20for=20improved=20readability=20and=20maintainability?= =?UTF-8?q?=20=F0=9F=90=9B=20fix(CrashErrorComponent/index.tsx):=20fix=20t?= =?UTF-8?q?ypo=20in=20error=20message=20for=20better=20user=20understandin?= =?UTF-8?q?g=20=E2=9C=A8=20feat(CrashErrorComponent/index.tsx):=20add=20re?= =?UTF-8?q?start=20button=20to=20reset=20the=20app=20and=20provide=20a=20l?= =?UTF-8?q?ink=20to=20report=20errors=20on=20GitHub=20for=20community=20su?= =?UTF-8?q?pport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/CrashErrorComponent/index.tsx | 103 ++++++++---------- 1 file changed, 46 insertions(+), 57 deletions(-) diff --git a/src/frontend/src/components/CrashErrorComponent/index.tsx b/src/frontend/src/components/CrashErrorComponent/index.tsx index ce6fc027b..818b706cb 100644 --- a/src/frontend/src/components/CrashErrorComponent/index.tsx +++ b/src/frontend/src/components/CrashErrorComponent/index.tsx @@ -1,4 +1,7 @@ +import { XCircle } from "lucide-react"; import { crashComponentPropsType } from "../../types/components"; +import { Button } from "../ui/button"; +import { Card, CardContent, CardFooter, CardHeader } from "../ui/card"; export default function CrashErrorComponent({ error, @@ -8,66 +11,52 @@ export default function CrashErrorComponent({
-
-

- 🚀 Whoops! We've Hit a Snag. -

- - Hey there, it looks like we've encountered a bit of a hiccup. - -
-
-

- But don't worry, it happens to the best of us! We're all about - making things better together. -

-
+ + +
+ +
+
+

+ Sorry, we found an unexpectable error! +

+
+
-
-

- 🔧 Quick Fix: Try hitting the{" "} - 'Restart the Adventure' button - to get things moving again. It's like a magic wand for minor - glitches! -

-
+ +
+

+ Click 'Restart Langflow'{" "} + button to reset the app. Please report errors on our{" "} + + GitHub Issues + {" "} + page to help the community. Thank you! +

+
+
-
-

- 📝 Still Stuck? Let's Solve It Together: If our magic wand didn't - do the trick, we'd love your help to dig a bit deeper. By - reporting this hiccup on our{" "} - - GitHub - {" "} - page, you're not just fixing your own experience but also helping - the whole community. -

-
+ +
+ -
- - - - - -
+ + + +
+
+
From d453223c7acaea2aa38d9f348d5d83036b375f71 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Wed, 28 Feb 2024 20:07:14 -0300 Subject: [PATCH 5/5] Fix typo in CrashErrorComponent message --- .../src/components/CrashErrorComponent/index.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/components/CrashErrorComponent/index.tsx b/src/frontend/src/components/CrashErrorComponent/index.tsx index 818b706cb..0cf376195 100644 --- a/src/frontend/src/components/CrashErrorComponent/index.tsx +++ b/src/frontend/src/components/CrashErrorComponent/index.tsx @@ -18,7 +18,7 @@ export default function CrashErrorComponent({

- Sorry, we found an unexpectable error! + Sorry, we found an unexpected error!

@@ -26,17 +26,18 @@ export default function CrashErrorComponent({

- Click 'Restart Langflow'{" "} - button to reset the app. Please report errors on our{" "} + Please report errors with detailed tracebacks on the{" "} GitHub Issues {" "} - page to help the community. Thank you! + page. +

+ Thank you!