Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/planner/Tiles/SemesterCourseItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const MemoizedSemesterCourseItem = React.memo(
)}
</span>
<span className="truncate text-sm">
{title || (course.code[0] == '0' ? '' : <Skeleton />)}
{title || (course.code[0] == '0' || course.code.includes("Elective") ? '' : <Skeleton />)}
Copy link
Member

Choose a reason for hiding this comment

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

Could you write a quick comment explaining the fix?

Copy link
Contributor Author

@rennyhoang rennyhoang Oct 10, 2023

Choose a reason for hiding this comment

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

Right now, the skeleton for the course title appears based on whether or not 'title' is defined. Problem is that on a degree template, some "courses" don't have titles (placeholders like "060 Course" or "CS Guided Elective") and the skeleton on those is always there. So right now I'm just doing a check on both the existence of a title and checking if the course code isn't one of the placeholders.

Copy link
Contributor

Choose a reason for hiding this comment

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

It may make sense for this to be included as a comment in the code.

</span>
</div>
{!semesterLocked && (
Expand Down