Skip to content

Conversation

@mirmirmirr
Copy link

This pull request mainly updates the api calls to reflect the updated api.

Tag rendering improvements:

  • Updated Tag component and its usage to accept both background and text color, and to render tags from arrays instead of splitting strings. Improved tag color schemes for attributes and semesters. (src/components/Course/CatalogCourse/Tag.tsx, src/components/Course/CatalogCourse.tsx)

Copy link

Copilot AI left a 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 updates API calls to align with a new backend API structure and improves tag rendering in course components. The main changes involve renaming course fields (deptsubj_code, code_num string → number), changing list fields from comma-separated strings to arrays (attr_list, sem_list), and enhancing the Tag component to support separate background and text colors with improved color schemes.

Key Changes:

  • Updated CourseType interface to use subj_code and numeric code_num, with attr_list and sem_list as string arrays
  • Changed API endpoint from /course/filter/values/departments to /course/filter/values/subjects
  • Enhanced Tag component to accept both bgcolor and color props for more flexible styling

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/types/interfaces/Course.interface.ts Updated CourseType interface: renamed dept to subj_code, changed code_num from string to number, converted attr_list and sem_list from strings to string arrays
src/context/FilterProvider.tsx Updated API endpoint from "departments" to "subjects" and removed trailing commas
src/context/CourseWorkspaceProvider.tsx Added semesterID field to default semester object
src/components/PlannerComponents/RightClickContext.tsx Updated course display format to use hyphen between subject code and number (e.g., "CS-101")
src/components/Course/ToolboxCourse.tsx Updated course display format to use hyphenated format
src/components/Course/PlannerCourse.tsx Updated course display format to use hyphenated format
src/components/Course/CatalogCourse/Tag.tsx Added bgcolor prop and made text color configurable via color prop
src/components/Course/CatalogCourse.tsx Updated to use array mapping for tags instead of string splitting, with distinct color schemes for attributes and semesters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mirmirmirr mirmirmirr marked this pull request as draft November 18, 2025 14:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mirmirmirr mirmirmirr marked this pull request as draft November 18, 2025 22:39
@mirmirmirr mirmirmirr marked this pull request as ready for review November 20, 2025 15:45
@mirmirmirr mirmirmirr merged commit 676929f into main-preview Nov 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants