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

Fix frontend compile errors + schedule padding #19

Closed
wants to merge 8 commits into from

Conversation

stychoi
Copy link
Collaborator

@stychoi stychoi commented Dec 17, 2022

Resolves issue #16 but would like another pair of eyes to see if my changes are okay.

Also worked on the schedule padding issues from crunchtime crunch-time/crunchtime#6

Still not an expert at Vue.js and the styling so would appreciate some code review to make sure anything else didn't break. Thanks!

Screenshot 2022-12-16 at 9 41 28 PM

Screenshot 2022-12-16 at 9 40 45 PM

@stychoi stychoi added the Frontend Issue/task for Frontend team label Dec 17, 2022
@@ -306,7 +307,8 @@ export default {

api
.updateScheduleName(this.schedule[index].id, cleanedName)
.then(() => this.schedule[index].name = cleanedName)
.then(() => this.scheduleLocal[index].name = cleanedName) // steven: put schedule as a local variable in data (line 129) to avoid mutation error, not sure if right move
Copy link
Collaborator

Choose a reason for hiding this comment

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

What was the error you were getting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This particular one is the 'no-mutating-props' error (https://eslint.vuejs.org/rules/no-mutating-props.html) and this occurs when we try to set a value to a prop in a component such as 'this.prop = value'. So I tried storing the prop as a local data variable (scheduleLocal), which got rid of the error.

I fixed the 'multi-word-component-names' error by just turning it off, and I fixed the "no-prototype-builtins" error by calling the method from Object.prototype as stated in https://eslint.org/docs/latest/rules/no-prototype-builtins

Copy link
Collaborator

@JasonFreeberg JasonFreeberg left a comment

Choose a reason for hiding this comment

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

I pulled your PR to a Windows machine and M1 Mac, using fresh installs of Node 18 and Java 8. Everything built and ran successfully.

@WinbertZhang If you agree, let's get this merged ASAP to unblock everyone

@stychoi Could you comment on the PR thread with more details about how you fixed this? This issue was plaguing a lot of the team, and you seemed to have cracked it. Maybe you can give a summary in Wednesday's meeting?

Copy link
Collaborator

@JasonFreeberg JasonFreeberg left a comment

Choose a reason for hiding this comment

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

I spoke too soon, it looks like one of the changes in the package-json is breaking the unit tests: https://github.com/data-science-ucsb/gauchocourses/actions/runs/3719544630/jobs/6308470011

I might have found a solution here: #21

@JasonFreeberg
Copy link
Collaborator

Try updating this branch from main to fix the CI errors

Issue link: crunch-time/crunchtime#6

  • The padding around the text is good
  • The issue was to remove the padding in the list view, not the grid view. I think having padding between the schedule and the bar with the filters is good.

@stychoi
Copy link
Collaborator Author

stychoi commented Jan 12, 2023

Looks like the pr was already merged with pr #21 but I'll take another look and make another pr for the list view padding

@stychoi stychoi closed this Jan 12, 2023
@WinbertZhang WinbertZhang deleted the compile-errors-sched-padding branch February 9, 2023 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Issue/task for Frontend team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants