From 74c43ce4b9d0b7e8d3bbd1d10f05046662752900 Mon Sep 17 00:00:00 2001 From: Eleonora SC Date: Thu, 2 Nov 2023 15:30:15 -0800 Subject: [PATCH 1/5] trying github/standard for just javascript instead of github/super-linter --- .github/workflows/super-linter.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 15719c7..b4c9cc0 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -22,7 +22,8 @@ jobs: fetch-depth: 0 - name: Lint Code Base - uses: github/super-linter@v4 + # uses: github/super-linter@v4 + uses: github/standard@latest env: VALIDATE_ALL_CODEBASE: false DEFAULT_BRANCH: "master" From 57f2f429f488ee705ea0613c5364ddfc4423dc5b Mon Sep 17 00:00:00 2001 From: Eleonora SC Date: Thu, 2 Nov 2023 15:42:51 -0800 Subject: [PATCH 2/5] Update super-linter.yml --- .github/workflows/super-linter.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index b4c9cc0..c3a9a14 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -22,9 +22,11 @@ jobs: fetch-depth: 0 - name: Lint Code Base - # uses: github/super-linter@v4 - uses: github/standard@latest + uses: github/super-linter@v5 env: VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: "master" + VALIDATE_CSS: false + VALIDATE_MARKDOWN: false + VALIDATE_NATURAL_LANGUAGE: false + DEFAULT_BRANCH: master GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 691b748817fa4d08a147467dc6370c8be853ed61 Mon Sep 17 00:00:00 2001 From: Mya Schroder <80082701+schromya@users.noreply.github.com> Date: Wed, 8 Nov 2023 18:39:05 -0900 Subject: [PATCH 3/5] Can select a project --- src/app/[...projectIds]/page.js | 12 ++++++++++++ src/app/page.js | 3 +-- src/components/Graph.js | 10 ++++++---- src/components/LeftSidebar.js | 4 +++- 4 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 src/app/[...projectIds]/page.js diff --git a/src/app/[...projectIds]/page.js b/src/app/[...projectIds]/page.js new file mode 100644 index 0000000..e6ac8c3 --- /dev/null +++ b/src/app/[...projectIds]/page.js @@ -0,0 +1,12 @@ + +import TreeGraph from '../../components/Graph' + +export default function page ({params}) { + return(
+ + Project: {params.projectIds} + + + +
) +} diff --git a/src/app/page.js b/src/app/page.js index 5ca8c68..32ce275 100644 --- a/src/app/page.js +++ b/src/app/page.js @@ -4,8 +4,7 @@ export default function Home () { return (
-
- + Create or Select a project.
diff --git a/src/components/Graph.js b/src/components/Graph.js index 5e9128f..77b520a 100644 --- a/src/components/Graph.js +++ b/src/components/Graph.js @@ -15,15 +15,17 @@ import { useApiResponse } from '@/app/ApiResponseContext' * // Using the component * */ -function TreeGraph () { +function TreeGraph ({projectID}) { // Fetch Tree data const [tasks, setTasks] = useState(null) - const containerRef = useRef(null) - const { apiResponse } = useApiResponse() + const containerRef = useRef(null); + const { apiResponse } = useApiResponse(); + if (!projectID) { + projectID = '65256c7adec443373f9bf10e' // TODO + } useEffect(() => { - const projectID = '65256c7adec443373f9bf10e' // TODO // Fetch Tree data fetch(`/api/mongoDB/getTasks?projectID=${projectID}`, { method: 'GET' diff --git a/src/components/LeftSidebar.js b/src/components/LeftSidebar.js index 74e392a..a8f4111 100644 --- a/src/components/LeftSidebar.js +++ b/src/components/LeftSidebar.js @@ -1,5 +1,6 @@ 'use client' import React, { useEffect, useState } from 'react' +import Link from 'next/link' import { useSession } from 'next-auth/react' import NewProjectButton from '../components/NewProjectButton' @@ -48,7 +49,8 @@ export default function LeftSidebar ({ className }) {
    {body.projects.map((project, index) => ( -
  • +
  • +
  • ))}
From 2e4dc881171d66f0e8745482c780f1949cdca5b2 Mon Sep 17 00:00:00 2001 From: Mya Schroder <80082701+schromya@users.noreply.github.com> Date: Wed, 8 Nov 2023 18:54:29 -0900 Subject: [PATCH 4/5] Added comments and formatting --- src/app/[...projectIds]/page.js | 24 ++++++++++++++++-------- src/app/page.js | 3 --- src/components/Graph.js | 6 +++--- src/components/LeftSidebar.js | 5 +++-- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/app/[...projectIds]/page.js b/src/app/[...projectIds]/page.js index e6ac8c3..87f4dae 100644 --- a/src/app/[...projectIds]/page.js +++ b/src/app/[...projectIds]/page.js @@ -1,12 +1,20 @@ - import TreeGraph from '../../components/Graph' -export default function page ({params}) { - return(
- - Project: {params.projectIds} - - +/** + * Renders a page component that displays the tree graph with a dynamic route + * + * @param {Object} props - The props passed to the page component. + * @param {Object} props.params - The route parameters object. + * @param {string} props.params.projectIds - The IDs of the project. + * @returns {ReactElement} A React element that represents the page, displaying + * the project IDs and a TreeGraph component for the project. + */ +export default function page ({ params }) { + return ( +
-
) + Project: {params.projectIds} + +
+ ) } diff --git a/src/app/page.js b/src/app/page.js index 32ce275..d4c257b 100644 --- a/src/app/page.js +++ b/src/app/page.js @@ -1,12 +1,9 @@ -import TreeGraph from '../components/Graph' - export default function Home () { return (
Create or Select a project.
-
) } diff --git a/src/components/Graph.js b/src/components/Graph.js index 77b520a..19e5372 100644 --- a/src/components/Graph.js +++ b/src/components/Graph.js @@ -15,12 +15,12 @@ import { useApiResponse } from '@/app/ApiResponseContext' * // Using the component * */ -function TreeGraph ({projectID}) { +function TreeGraph ({ projectID }) { // Fetch Tree data const [tasks, setTasks] = useState(null) - const containerRef = useRef(null); - const { apiResponse } = useApiResponse(); + const containerRef = useRef(null) + const { apiResponse } = useApiResponse() if (!projectID) { projectID = '65256c7adec443373f9bf10e' // TODO } diff --git a/src/components/LeftSidebar.js b/src/components/LeftSidebar.js index a8f4111..1348d32 100644 --- a/src/components/LeftSidebar.js +++ b/src/components/LeftSidebar.js @@ -49,8 +49,9 @@ export default function LeftSidebar ({ className }) {
    {body.projects.map((project, index) => ( -
  • -
  • +
  • +
  • ))}
From 9f3b085fcb7c866bfad21f7a77e40d6df6805f0d Mon Sep 17 00:00:00 2001 From: Mya Schroder <80082701+schromya@users.noreply.github.com> Date: Wed, 8 Nov 2023 19:09:06 -0900 Subject: [PATCH 5/5] Added to readme --- readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index d72a2e7..0bd900c 100644 --- a/readme.md +++ b/readme.md @@ -3,7 +3,7 @@ Welcome to our Quayside MVP. The tech stack for this is the MERN framework (Mong ## Setup You need to install npm (you can do this by installing [node.js](https://nodejs.org/en/download)). Once that is done, run `npm install` in this directory to install all the requirements. -For accessing the mongo database locally, you will need the following generated database Atlas creds in an `.env.local` file (fyi, these creds are different than your creds to login to Mongo Atlas). In the same file you will also ned your oath creds(for google and github as examples). Here is the forma: +For accessing the mongo database locally, you will need the following generated database Atlas creds in an `.env.local` file (fyi, these creds are different than your creds to login to Mongo Atlas). In the same file you will also ned your oath creds(for google and github as examples). You will also need your chatGPT key. Here is the forma: ``` MONGO_USERNAME= @@ -16,6 +16,8 @@ GITHUB_ID= GOOGLE_CLIENT_SECRET= GOOGLE_CLIENT_ID= + +QUAYSIDE_API_KEY= ``` ## Usage