-
Notifications
You must be signed in to change notification settings - Fork 2
Feat/teams page showcase several semesters #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
||
| import { useEffect, useRef } from "react"; | ||
| import Image from "next/image"; | ||
| import { FiArrowLeft, FiArrowRight, FiChevronDown } from "react-icons/fi"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sandviklee should all icons be in the Icon.tsx?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request transforms the team page from a static member display to a dynamic showcase that supports multiple semesters and years. The implementation includes navigation between different time periods, project-based filtering, and an improved data structure.
- Complete overhaul of team page to support historical semester/year data
- Implementation of new data hooks for fetching members and projects with semester relationships
- Addition of interactive UI components for year/semester selection and project filtering
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pages/team.tsx | Complete rewrite to use new semester-based architecture with hooks |
| hooks/useTeamData.ts | New custom hook managing semester navigation and member/project data logic |
| hooks/useGetMembers.tsx | Refactored to fetch all members and projects instead of filtered subsets |
| lib/types.ts | Enhanced type definitions with Project and ProjectMembership structures |
| components/team/YearSemesterSelector.tsx | New component for banner display and semester navigation controls |
| components/team/ProjectSection.tsx | New component for displaying project-grouped member lists |
| components/team/ProjectFilterChips.tsx | New component for project filtering interface |
| components/Member/Member.tsx | Updated to use new Member type structure |
| components/Navbar/Navbar.tsx | Minor responsive padding adjustment |
| package.json | Updated @tanstack/react-query dependency |
Comments suppressed due to low confidence (1)
hooks/useTeamData.ts:7
- The constant name 'HALF_YEAR' is ambiguous and doesn't clearly indicate it represents June or the semester cutoff point. Consider renaming to 'SEMESTER_CUTOFF_MONTH' or 'JUNE_MONTH'.
const HALF_YEAR = 6; // June
| titleLabel?: string; | ||
| } | ||
|
|
||
| const CURRENT_YEAR = new Date().getFullYear(); |
Copilot
AI
Jul 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CURRENT_YEAR constant is duplicated here and in useTeamData.ts (line 5). Consider extracting this to a shared constants file to avoid duplication and ensure consistency.
| project={{ | ||
| ...(activeProjects.find( | ||
| (p) => p.name === projectFilter | ||
| ) as Project), | ||
| }} |
Copilot
AI
Jul 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using 'as Project' assertion without null checking could cause runtime errors if the project is not found. The find() method returns undefined when no match is found, which would cause the spread operator to fail.
| project={{ | |
| ...(activeProjects.find( | |
| (p) => p.name === projectFilter | |
| ) as Project), | |
| }} | |
| project={ | |
| activeProjects.find((p) => p.name === projectFilter) || { | |
| id: "unknown", | |
| name: "Unknown Project", | |
| description: "No matching project found.", | |
| } | |
| } |
Co-authored-by: Copilot <[email protected]>
…om:CogitoNTNU/web-frontend into feat/teams-page-showcase-several-semesters
…eams-page-showcase-several-semesters
…eams-page-showcase-several-semesters
No description provided.