-
Notifications
You must be signed in to change notification settings - Fork 348
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
Migrate:grade task modal #564
Migrate:grade task modal #564
Conversation
This commit fixes dependencies issues that causes - `npm install` fails - `ng test` does not pick up any specs
This commits ensure the unit tests are setup with correct dependencies.
We use 2 Karma configurations to regulate how tests are run locally and in CI. - In development, the server runs forever with watch mode, using Chrome browser - In CI, the service runs once, using Chrome headless
fix: front end tests
refactor: remove task-sheet-viewer component
Fix build badge references
migrate: grade-icon
This adds ability to format code using both ESLint and Prettier rules.
There are a large number of violations in the code base. We will need to incrementally address them in future pull requests.
This fixes 'Range out of order in character class' error when trying to parse regex marked with `/u` unicode flag.
feat: format code using ESLint and Prettier
Co-authored-by: A Luan Luong <[email protected]>
@macite Hi Andrew, could you review this PR? I can't add you as a reviewer for this PR so I mentioned you in this comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty close. Can you check these last few things and make adjustments or show that the implementation should be ok?
gradeText: string; | ||
gradeLetter: string; | ||
|
||
constructor(@Inject(gradeService) private GradeService: any) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a new equivalent of this in typescript.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if you can remove the GradeService from this and use the new code
<tr ng-repeat="contrib in team.memberContributions | orderBy:memberSortOrder:reverse"> | ||
<td>{{contrib.project.student.name}}</td> | ||
<tr ng-repeat="member in team.members | orderBy:memberSortOrder:reverse"> | ||
<td>{{member.student_name}}</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't look right - with the new service we do not have any snake case properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check everything in this...
grade="grade" | ||
class="text-{{project.submitted_grade == grades.indexOf(grade) ? 'success' : 'muted'}}" | ||
></grade-icon> | ||
<grade-icon [grade]="grade"></grade-icon> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check the muted state here... is this ok without it. It is not shown in the conversation.
@@ -43,7 +43,6 @@ <h4 class="panel-title">Mark Portfolios</h4> | |||
<span | |||
class="grade-icon" | |||
tooltip="Show all portfolios" | |||
class="text-{{$index == filterOptions.selectedGrade ? 'primary' : 'muted'}}" | |||
>All</span |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this appear now when different grades are selected?
tooltip="Select to show student's aiming for {{grade}}" | ||
tooltip-append-to-body="true" | ||
class="text-{{$index == filterOptions.selectedGrade ? 'primary' : 'muted'}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above
…ech/doubtfire-web into thoth-tech-migrate/grade-task-modal
Description
Transfer PR started by @PerryRose
This pull request migrates the grade-task-modal component from AngularJS to Angular.
The grade task modal component is opened from task-service.coffee using the grade task modal service, which receives a task object and passes it onto the component via a MatDialogRef. Depending on the task object, a student's submission can either be rated using a Mat Slider, or graded with a Mat Button Toggle Group, which uses the grade-icon component which I have migrated. Clicking the submit button calls the component's close function, which passes a rating and a grade value back to the service before then being passed back to task-service.coffee, which updates the task object on the backend.
Quality Points Task
Before:
After:
Graded Task
Before:
After:
Fixes # (updates the old grade-task-modal component specified outlined in the migration task list)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Testing Checklist:
Checklist: