Skip to content

Conversation

@OddEyed45
Copy link
Contributor

@OddEyed45 OddEyed45 commented Dec 3, 2025

Overview

List the GitHub issues containing the issues relevant to this pull request.
Resolves issue #545

Describe your changes here at a high level, describing how this PR fits into the
rest of the project.

It fixed a simple error where the bar chart does not show up properly on the screen under Compare.

What Changed

The issue is fixed by correcting the grade data that is being displayed by the bar graph (under src/components/compare/Compare.tsx). The problem was that if the size of the grade data were 0, the convertNumbersToPercents function would output a list with NaNs since it would not go into the map function. The most direct way to fix this was to check the output of this method (and manually assign an array of 14 zeroes if NaN is found).

Other Notes

At one point, Vercel failed to deploy because the project was using a version of Next.js with a security vulnerability. I have fixed it on my end (hence, Vercel is working) but I am unsure about changing package.json & package-lock.json for the entire project.

Please make sure to fix that (there is a merge conflict here).

@OddEyed45 OddEyed45 requested a review from egsch as a code owner December 3, 2025 00:04
@vercel
Copy link

vercel bot commented Dec 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
utd-trends Ready Ready Preview, Comment Jan 3, 2026 1:43am

@OddEyed45 OddEyed45 marked this pull request as ready for review December 21, 2025 08:13
Copy link
Contributor

@egsch egsch left a comment

Choose a reason for hiding this comment

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

Hey @OddEyed45 sorry for the late review--this looks good! Thank you and good job finding a way to prevent the errors despite some of the weirder constraints of ApexCharts. I did leave a couple of little questions so if you could check those out that would be fantastic. But great work overall!

calculateGrades(course.grades, chosenSemesters),
)[0],
)
? [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Copy link
Contributor

Choose a reason for hiding this comment

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

Just fyi to make sure we are communicating all possible grade data including cr/nc and pass/fail grades we will soon expand the grade data returned by CalculateGrades to include more than 14 entries. Do you think you could fill to an adaptive length array to prevent assuming we have 14 entries here?

item.subtitle?.toLowerCase().includes(newInputValue.toLowerCase()) ||
item.title?.toLowerCase().includes(newInputValue.toLowerCase())
)
searchQueryLabel(item)
Copy link
Contributor

Choose a reason for hiding this comment

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

Was removing the ! here intentional?

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