From 9eb1154540978f0b480f48c1ce82a87bf9d15ad5 Mon Sep 17 00:00:00 2001 From: Nanak Date: Mon, 22 May 2023 21:27:57 +0530 Subject: [PATCH 01/12] Add external links in constants file --- src/constants.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/constants.ts b/src/constants.ts index 29d23428..80f85cc9 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -23,3 +23,7 @@ export const GITHUB_PR_COMMENT_EDITOR_SELECTOR = "flex-nowrap d-inline-block mr- export const GITHUB_REPO_ACTIONS_SELECTOR = ".pagehead-actions"; export const GITHUB_PR_COMMENT_TEXT_AREA_SELECTOR = "pull_request[body]"; export const GITHUB_PR_BASE_BRANCH_SELECTOR = "css-truncate css-truncate-target"; + +// External Links +export const DISCUSSIONS = { link: "https://github.com/orgs/open-sauced/discussions", key: "Discussions", displayValue: "Go to feedback Discussions" }; +export const ISSUES = { link: "https://github.com/open-sauced/ai/issues", key: "Issues", displayValue: "Go to our current Issues" }; From ca483cc5aa278d854175de47ae313508fdeb8f7a Mon Sep 17 00:00:00 2001 From: Nanak Date: Mon, 22 May 2023 21:28:11 +0530 Subject: [PATCH 02/12] add the resource page --- src/pages/resources.tsx | 65 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/pages/resources.tsx diff --git a/src/pages/resources.tsx b/src/pages/resources.tsx new file mode 100644 index 00000000..0ab57dde --- /dev/null +++ b/src/pages/resources.tsx @@ -0,0 +1,65 @@ +import { useContext } from "react"; + +import { FaChevronLeft } from "react-icons/fa"; +import OpenSaucedLogo from "../assets/opensauced-logo.svg"; +import { RouteContext } from "../App"; +import { Toaster } from "react-hot-toast"; +import { DISCUSSIONS, ISSUES } from "../constants"; +import { HiArrowTopRightOnSquare } from "react-icons/hi2"; + +const externalLinks = [DISCUSSIONS, ISSUES]; + +const Resources = () => { + const { setCurrentPage } = useContext(RouteContext); + + return ( + <> + + +
+
+
+ + + OpenSauced logo +
+
+ +
+

+ External Resources: +

+ +
+ {externalLinks.map(externalLink => ( + + + + {externalLink.displayValue} + + ))} +
+
+
+ + ); +}; + +export default Resources; From 48736695dd6160d98142e2b93bd0a5bedba2784b Mon Sep 17 00:00:00 2001 From: Nanak Date: Mon, 22 May 2023 21:29:07 +0530 Subject: [PATCH 03/12] Add resources page as a new route --- src/App.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index 05451293..a8eca14e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -6,6 +6,7 @@ import Loading from "./pages/loading"; import { Profile } from "./pages/profile"; import { useAuth } from "./hooks/useAuth"; import AIPRDescription from "./pages/aiprdescription"; +import Resources from "./pages/resources"; export const RouteContext = createContext<{ page: { name: string, props?: any }, setCurrentPage:(page: RouteKeys, props?: any) => void }>({ page: { name: "loading" }, setCurrentPage: () => {} }); @@ -15,6 +16,7 @@ const routes = { loading: , profile: , aiprdescription: , + resources: , }; type RouteKeys = keyof typeof routes; From a60909422a5fe7cd62fd646656be77daff1a6eb9 Mon Sep 17 00:00:00 2001 From: Nanak Date: Mon, 22 May 2023 21:29:29 +0530 Subject: [PATCH 04/12] Add new button on home screen to go to resources page --- src/pages/home.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pages/home.tsx b/src/pages/home.tsx index ca5b83ad..704e5e0d 100644 --- a/src/pages/home.tsx +++ b/src/pages/home.tsx @@ -87,6 +87,16 @@ const Home = () => { 's profile )} + + From 69c8208b22bcee681c63fcba1f7a20f960b7d1dd Mon Sep 17 00:00:00 2001 From: Nanak Date: Mon, 22 May 2023 22:59:18 +0530 Subject: [PATCH 05/12] Change icon for Resources page --- src/pages/home.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/home.tsx b/src/pages/home.tsx index 704e5e0d..82d53e1d 100644 --- a/src/pages/home.tsx +++ b/src/pages/home.tsx @@ -1,5 +1,5 @@ import { useContext } from "react"; -import { HiArrowTopRightOnSquare, HiPencil, HiUserCircle } from "react-icons/hi2"; +import { HiArrowTopRightOnSquare, HiPencil, HiSquare3Stack3D, HiUserCircle } from "react-icons/hi2"; import { RouteContext } from "../App"; import OpenSaucedLogo from "../assets/opensauced-logo.svg"; import { useAuth } from "../hooks/useAuth"; @@ -94,7 +94,7 @@ const Home = () => { setCurrentPage("resources"); }} > - + Resources From e65d255b5516cd2e2b8576815679dac8632646f7 Mon Sep 17 00:00:00 2001 From: Nanak Date: Mon, 22 May 2023 23:03:28 +0530 Subject: [PATCH 06/12] Add EXTERNAL_RESOURCES array in constants file --- src/constants.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 80f85cc9..c841fc10 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -25,5 +25,7 @@ export const GITHUB_PR_COMMENT_TEXT_AREA_SELECTOR = "pull_request[body]"; export const GITHUB_PR_BASE_BRANCH_SELECTOR = "css-truncate css-truncate-target"; // External Links -export const DISCUSSIONS = { link: "https://github.com/orgs/open-sauced/discussions", key: "Discussions", displayValue: "Go to feedback Discussions" }; -export const ISSUES = { link: "https://github.com/open-sauced/ai/issues", key: "Issues", displayValue: "Go to our current Issues" }; +export const EXTERNAL_RESOURCES = [ + { link: "https://github.com/orgs/open-sauced/discussions", key: "Discussions" }, + { link: "https://github.com/open-sauced/ai/issues", key: "Issues" }, +]; From e9378e8b0433aa36d98f81313fc7aa8b53c196a0 Mon Sep 17 00:00:00 2001 From: Nanak Date: Mon, 22 May 2023 23:04:09 +0530 Subject: [PATCH 07/12] use EXTERNAL_RESOURCES array in resources page --- src/pages/resources.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pages/resources.tsx b/src/pages/resources.tsx index 0ab57dde..2d2bf437 100644 --- a/src/pages/resources.tsx +++ b/src/pages/resources.tsx @@ -4,11 +4,9 @@ import { FaChevronLeft } from "react-icons/fa"; import OpenSaucedLogo from "../assets/opensauced-logo.svg"; import { RouteContext } from "../App"; import { Toaster } from "react-hot-toast"; -import { DISCUSSIONS, ISSUES } from "../constants"; +import { EXTERNAL_RESOURCES } from "../constants"; import { HiArrowTopRightOnSquare } from "react-icons/hi2"; -const externalLinks = [DISCUSSIONS, ISSUES]; - const Resources = () => { const { setCurrentPage } = useContext(RouteContext); @@ -42,7 +40,7 @@ const Resources = () => {
- {externalLinks.map(externalLink => ( + {EXTERNAL_RESOURCES.map(externalLink => ( { > - {externalLink.displayValue} + {externalLink.key} ))}
From 8b24e39ed52597cc361280dc7e9547362590b866 Mon Sep 17 00:00:00 2001 From: Nanak Date: Tue, 23 May 2023 09:23:33 +0530 Subject: [PATCH 08/12] Modify resources page to use goto function and have proper styling --- src/pages/resources.tsx | 86 ++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 45 deletions(-) diff --git a/src/pages/resources.tsx b/src/pages/resources.tsx index 65afb694..4f24ae84 100644 --- a/src/pages/resources.tsx +++ b/src/pages/resources.tsx @@ -1,58 +1,54 @@ import { FaChevronLeft } from "react-icons/fa"; import OpenSaucedLogo from "../assets/opensauced-logo.svg"; -import { RouteContext } from "../App"; -import { Toaster } from "react-hot-toast"; import { EXTERNAL_RESOURCES } from "../constants"; import { HiArrowTopRightOnSquare } from "react-icons/hi2"; import { goBack } from "react-chrome-extension-router"; const Resources = () => ( - <> - +
+
+
+
+ -
-
-
- - - OpenSauced logo -
-
+ OpenSauced logo +
+
-
-

- External Resources: -

+
+

+ External Resources: +

-
- {EXTERNAL_RESOURCES.map(externalLink => ( - - + -
-
- - ); + {externalLink.key} + + ))} +
+ + + +); export default Resources; From df22c8629edb256f6680d8a9f0461d185ba4c34f Mon Sep 17 00:00:00 2001 From: Nanak Date: Tue, 23 May 2023 21:38:05 +0530 Subject: [PATCH 09/12] Rename resources page as help and use it in home --- src/pages/{resources.tsx => help.tsx} | 8 ++++---- src/pages/home.tsx | 21 ++++++++++++++------- 2 files changed, 18 insertions(+), 11 deletions(-) rename src/pages/{resources.tsx => help.tsx} (92%) diff --git a/src/pages/resources.tsx b/src/pages/help.tsx similarity index 92% rename from src/pages/resources.tsx rename to src/pages/help.tsx index 4f24ae84..cf553d07 100644 --- a/src/pages/resources.tsx +++ b/src/pages/help.tsx @@ -4,7 +4,7 @@ import { EXTERNAL_RESOURCES } from "../constants"; import { HiArrowTopRightOnSquare } from "react-icons/hi2"; import { goBack } from "react-chrome-extension-router"; -const Resources = () => ( +const Help = () => (
@@ -28,11 +28,11 @@ const Resources = () => (

- External Resources: + Help:

- {EXTERNAL_RESOURCES.map((externalLink) => ( + {EXTERNAL_RESOURCES.map(externalLink => ( (
); -export default Resources; +export default Help; diff --git a/src/pages/home.tsx b/src/pages/home.tsx index d37317ef..17aa887f 100644 --- a/src/pages/home.tsx +++ b/src/pages/home.tsx @@ -1,11 +1,16 @@ -import { HiArrowTopRightOnSquare, HiPencil, HiUserCircle, HiSquare3Stack3D } from "react-icons/hi2"; +import { + HiArrowTopRightOnSquare, + HiPencil, + HiSquare3Stack3D, + HiUserCircle, +} from "react-icons/hi2"; import OpenSaucedLogo from "../assets/opensauced-logo.svg"; import { useAuth } from "../hooks/useAuth"; import { useOpensaucedUserCheck } from "../hooks/useOpensaucedUserCheck"; import { Profile } from "./profile"; import { goTo } from "react-chrome-extension-router"; import AIPRDescription from "./aiprdescription"; -import Resources from "./resources"; +import Help from "./help"; const Home = () => { const { user } = useAuth(); @@ -89,18 +94,20 @@ const Home = () => { 's profile )} +
+ +
-
- + ); From 4a027a8721f65fdc47ad298a61aabf57af8d9fc4 Mon Sep 17 00:00:00 2001 From: Nanak Date: Tue, 23 May 2023 21:44:47 +0530 Subject: [PATCH 10/12] add docs link in constants --- src/constants.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/constants.ts b/src/constants.ts index c841fc10..f3765a6a 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -26,6 +26,7 @@ export const GITHUB_PR_BASE_BRANCH_SELECTOR = "css-truncate css-truncate-target" // External Links export const EXTERNAL_RESOURCES = [ - { link: "https://github.com/orgs/open-sauced/discussions", key: "Discussions" }, + { link: "https://docs.opensauced.pizza/chrome-extension/introduction-to-the-chrome-extension/", key: "Docs" }, { link: "https://github.com/open-sauced/ai/issues", key: "Issues" }, + { link: "https://github.com/orgs/open-sauced/discussions", key: "Discussions" }, ]; From a9882cf427d5a86d154456bc3f0349dfc31fdd0d Mon Sep 17 00:00:00 2001 From: Nanak Date: Tue, 23 May 2023 21:44:56 +0530 Subject: [PATCH 11/12] change the icon for help page --- src/pages/home.tsx | 132 +++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 70 deletions(-) diff --git a/src/pages/home.tsx b/src/pages/home.tsx index 17aa887f..302d9487 100644 --- a/src/pages/home.tsx +++ b/src/pages/home.tsx @@ -1,7 +1,7 @@ import { HiArrowTopRightOnSquare, + HiOutlineQuestionMarkCircle, HiPencil, - HiSquare3Stack3D, HiUserCircle, } from "react-icons/hi2"; import OpenSaucedLogo from "../assets/opensauced-logo.svg"; @@ -17,85 +17,77 @@ const Home = () => { const { currentTabIsOpensaucedUser, checkedUser } = useOpensaucedUserCheck(); return ( -
-
-
- OpenSauced logo +
+
+
+ OpenSauced logo - {user && ( - - )} -
+ {user && ( + + )} +
-
- - - Go to Highlights feed - +
+

Tools:

- - - Go to Dashboard - +
+ + + Go to Highlights feed + - + + + Go to Dashboard + - {currentTabIsOpensaucedUser && ( - )} -
-
+ + {currentTabIsOpensaucedUser && ( + + )} +
+
+
- ); }; From 97a21a6a7a2209045deb1edd03d3604cb9d1f853 Mon Sep 17 00:00:00 2001 From: Nanak Date: Tue, 23 May 2023 22:08:25 +0530 Subject: [PATCH 12/12] change icons in the home page --- src/pages/help.tsx | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/pages/help.tsx b/src/pages/help.tsx index cf553d07..99a17de9 100644 --- a/src/pages/help.tsx +++ b/src/pages/help.tsx @@ -1,8 +1,12 @@ import { FaChevronLeft } from "react-icons/fa"; import OpenSaucedLogo from "../assets/opensauced-logo.svg"; import { EXTERNAL_RESOURCES } from "../constants"; -import { HiArrowTopRightOnSquare } from "react-icons/hi2"; +import { + HiOutlineBookOpen, + HiOutlineChatBubbleLeftRight, +} from "react-icons/hi2"; import { goBack } from "react-chrome-extension-router"; +import { VscIssues } from "react-icons/vsc"; const Help = () => (
@@ -27,12 +31,10 @@ const Help = () => (
-

- Help: -

+

Help: