diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 600665ff7..c31d1ee62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: working-directory: ./backend steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 16 - run: npm ci @@ -33,7 +33,7 @@ jobs: working-directory: ./frontend steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18 - run: npm ci @@ -46,7 +46,7 @@ jobs: working-directory: ./migration steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18 - run: npm ci diff --git a/frontend/src/components/CourseCard/CourseCard.tsx b/frontend/src/components/CourseCard/CourseCard.tsx index 1711a594b..b9e871131 100644 --- a/frontend/src/components/CourseCard/CourseCard.tsx +++ b/frontend/src/components/CourseCard/CourseCard.tsx @@ -19,7 +19,7 @@ export default function CourseCard({ terms, }: CourseCardProps) { return ( -
+
{/* Course courseCode + Ratings */}

diff --git a/frontend/src/components/FilterModal/FilterModal.tsx b/frontend/src/components/FilterModal/FilterModal.tsx index ce40b02b2..ae27301d0 100644 --- a/frontend/src/components/FilterModal/FilterModal.tsx +++ b/frontend/src/components/FilterModal/FilterModal.tsx @@ -3,6 +3,7 @@ import React from "react"; import Dropdown from "../Dropdown/Dropdown"; import { useState } from "react"; import { Dialog } from "@headlessui/react"; +import { Transition } from "@headlessui/react"; import { XMarkIcon } from "@heroicons/react/24/outline"; import { AdjustmentsHorizontalIcon } from "@heroicons/react/24/outline"; import { Course } from "@/types/api"; @@ -105,15 +106,6 @@ export default function FilterModal({ } }); - // Show secret message if specific filters are selected - if ( - selectedFaculties.includes("Arts") && - selectedTerms.includes("-1") && - selectedTerms.includes("-2") - ) { - alert("Alss aol zlhyjo ihy..."); - } - setFilters({ faculties: selectedFaculties, terms: selectedTerms }); setOpen(false); @@ -157,93 +149,108 @@ export default function FilterModal({ return ( <> - {/* filter button */} -
- -
- - {/* filter dialog */} - - {/* the blurred backdrop */} - + + +

); } diff --git a/frontend/src/components/Navbar/Navbar.tsx b/frontend/src/components/Navbar/Navbar.tsx index aa4860d6a..7351fb7e4 100644 --- a/frontend/src/components/Navbar/Navbar.tsx +++ b/frontend/src/components/Navbar/Navbar.tsx @@ -67,7 +67,7 @@ export default function Navbar({ userZid }: NavbarProps) { ref={ref} className={ collapsed - ? "fixed flex flex-col items-center w-20 h-screen gap-4 p-4 duration-150 bg-gray-50 dark:bg-slate-700 z-50 xs:p-2 xs:w-15 xs:gap-2" + ? "fixed flex flex-col items-center w-20 h-screen gap-4 p-4 duration-150 bg-gray-100 dark:bg-slate-700 z-50 xs:p-2 xs:w-15 xs:gap-2" : "fixed flex flex-col w-72 h-screen gap-4 p-4 bg-gray-50 dark:bg-slate-700 z-40 duration-150" } > diff --git a/frontend/src/components/ReviewCard/ReviewCard.tsx b/frontend/src/components/ReviewCard/ReviewCard.tsx index 8cd966f7d..5b40c653d 100644 --- a/frontend/src/components/ReviewCard/ReviewCard.tsx +++ b/frontend/src/components/ReviewCard/ReviewCard.tsx @@ -88,7 +88,7 @@ export default function ReviewCard({ }; return ( -
+
{/* Title + Date */}

{review.title ? review.title : "-"}

diff --git a/frontend/src/components/ReviewsBar/ReviewsBar.tsx b/frontend/src/components/ReviewsBar/ReviewsBar.tsx index 7b2f8ccc0..60c05bd5c 100644 --- a/frontend/src/components/ReviewsBar/ReviewsBar.tsx +++ b/frontend/src/components/ReviewsBar/ReviewsBar.tsx @@ -21,7 +21,6 @@ export default function ReviewsBar({ const [currentReviews, setCurrentReviews] = useState(reviews ? reviews : []); const [allBookmarkedReviews, setAllBookmarkedReviews] = useState(bookmarkedReviews); - const [displayTextReview, setDisplayTextReview] = useState(false); const [selected, setSelected] = useState("Most Recent"); // Change review sorting based on dropdown @@ -51,14 +50,10 @@ export default function ReviewsBar({ break; } - if (!displayTextReview) { - return setCurrentReviews(sortedReviews); - } - setCurrentReviews( sortedReviews.filter((r: Review) => r.title || r.description) ); - }, [displayTextReview, selected]); + }, [selected]); return (
@@ -90,14 +85,6 @@ export default function ReviewsBar({ {/* Switch */} {currentReviewRef.current && currentReviewRef.current.length !== 0 && ( <> -
- - Text only reviews -
{/* Reviews */} {currentReviews.map((review: Review, index: number) => (
{/* Toggle Switch */} -
- Card -
- + {reviews.length > 0 && ( +
+ Card +
+ +
+ List
- List -
+ )}
{/* Reviews */} {/* List view */} @@ -130,7 +132,14 @@ export default function UserBookmarkedReviews({ >
{/* Title */} -

{review.courseCode}

+ + + {review.courseCode} + + {/* Description */}

{!review.description ? "-" : review.description} @@ -157,13 +166,19 @@ export default function UserBookmarkedReviews({ .map((review: Review, index: number) => (

{/* Course courseCode + Ratings */}
-

- {review.courseCode} -

+ +
+ {review.courseCode} + +
+
{/* StarRating */}
diff --git a/frontend/src/components/UserReports/UserReports.tsx b/frontend/src/components/UserReports/UserReports.tsx index 6141e827f..50c1cd78c 100644 --- a/frontend/src/components/UserReports/UserReports.tsx +++ b/frontend/src/components/UserReports/UserReports.tsx @@ -10,7 +10,6 @@ import { } from "react"; import Dropdown from "../Dropdown/Dropdown"; import Pagination from "../Pagination/Pagination"; -import ReviewCard from "../ReviewCard/ReviewCard"; type STATUS = { UNSEEN: boolean; diff --git a/frontend/src/components/UserReviews/UserReviews.tsx b/frontend/src/components/UserReviews/UserReviews.tsx index 9638d3193..0a592d849 100644 --- a/frontend/src/components/UserReviews/UserReviews.tsx +++ b/frontend/src/components/UserReviews/UserReviews.tsx @@ -105,17 +105,19 @@ export default function UserReviews({ />
{/* Toggle Switch */} -
- Card -
- + {reviews.length > 0 && ( +
+ Card +
+ +
+ List
- List -
+ )}
{/* Reviews */} {/* List view */} diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index ee037cf01..83718bcf9 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -25,7 +25,7 @@ module.exports = { "unilectives-subheadings": "#989898", "unilectives-placeholder": "#606060", "unilectives-tags": "#CCEBF6", - "unilectives-card": "#FAFAFA", + "unilectives-card": "#f6f6f6", "unilectives-light-blue": "#84CEE7", "unilectives-purple": "#B789E5", "unilectives-indigo": "#9BADE8",