Skip to content

Conversation

@rennyhoang
Copy link
Contributor

The skeleton lasts forever on template courses like 'CS Guided Elective Course', this fixes that

@rennyhoang rennyhoang requested a review from a team as a code owner October 10, 2023 00:55
@rennyhoang rennyhoang requested a review from akevinge October 10, 2023 00:55
@rennyhoang rennyhoang changed the title Update SemesterCourseItem.tsx Skeleton Hotfix Oct 10, 2023
@github-actions
Copy link

@github-actions
Copy link

</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.

@Jake3231 Jake3231 requested review from a team and kamui-fin and removed request for a team February 6, 2024 21:46
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.

4 participants