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

Catalogtabs #572

Closed
wants to merge 14 commits into from
Closed

Catalogtabs #572

wants to merge 14 commits into from

Conversation

henriczh
Copy link
Contributor

No description provided.

frontend/src/graphql/graphql.ts Outdated Show resolved Hide resolved
frontend/src/app/Catalog/CatalogView/CatalogView.tsx Outdated Show resolved Hide resolved
frontend/src/app/Catalog/CatalogView/CatalogView.tsx Outdated Show resolved Hide resolved
}

// Handler function for updating GradesInfoCard on hover with single course
function updateGraphHover(data:any) {
Copy link
Member

Choose a reason for hiding this comment

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

Lets learn what these types are or atleast attempt to understand the shape of the data so we can get better type safety. There shouldn't be any any types anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to leave this one as this came with the old Graphs component. I just copy pasted

if (tab == 0) {
return (
<>
<nav className={styles.tabContainer}>
Copy link
Member

Choose a reason for hiding this comment

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

We can refactor the code such that this nav isn't being duplicated in the code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not 100% how to do this

frontend/src/app/Catalog/CatalogView/CatalogView.tsx Outdated Show resolved Hide resolved

const gradePath = legacyId ? `/grades/0-${legacyId}-all-all` : `/grades`;

const [hoveredClass, setHoveredClass] = useState<any>(false);
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we can work on the grades chart itself to handle this sort of hovering functionality. Not sure

}, [enrollContext])

useEffect(() => {
if (course !== null) {
Copy link
Member

Choose a reason for hiding this comment

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

lets prefer !course and use && to condense the if statements

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure how to do this either

frontend/src/app/Catalog/CatalogView/CatalogView.tsx Outdated Show resolved Hide resolved
frontend/src/app/Catalog/CatalogView/CatalogView.tsx Outdated Show resolved Hide resolved
@Jdyn
Copy link
Member

Jdyn commented Apr 17, 2023

If you install ESLint into your vscode, you will see a bunch of improvements to make!

frontend/src/app/Catalog/CatalogView/CatalogView.tsx Outdated Show resolved Hide resolved
frontend/src/app/Catalog/CatalogView/CatalogView.tsx Outdated Show resolved Hide resolved
frontend/src/app/Catalog/CatalogView/CatalogView.tsx Outdated Show resolved Hide resolved
frontend/src/app/Catalog/CatalogView/CatalogView.tsx Outdated Show resolved Hide resolved
frontend/src/app/Catalog/CatalogView/CatalogView.tsx Outdated Show resolved Hide resolved
frontend/src/app/Catalog/CatalogView/CatalogView.tsx Outdated Show resolved Hide resolved
frontend/src/views/About.tsx Outdated Show resolved Hide resolved
@Jdyn Jdyn added the feature New feature or request label Sep 24, 2023
@mathhulk
Copy link
Contributor

See #637.

@mathhulk mathhulk closed this Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants