Skip to content
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

Skeleton Hotfix #708

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Skeleton Hotfix #708

wants to merge 2 commits into from

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 changed the title Update SemesterCourseItem.tsx Skeleton Hotfix Oct 10, 2023
@github-actions
Copy link

@github-actions
Copy link

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

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

3 participants