-
Notifications
You must be signed in to change notification settings - Fork 209
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
Development #2
base: main
Are you sure you want to change the base?
Development #2
Conversation
Implement all core features. All tests, except for stretch features, passing.
and inserts to correct spot in HTML
got right number of classes; all tests are now passing
1 suggestion with git (no need to change anything with this comment as well). With git you can push more commits, or amend work to the original PR where Peter reviewed. Doing this will provide a clean history in git to track your work. |
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.
Few small comments. Great job!
addTotalsRow(reportCardTableElement); | ||
addGpaRow(reportCardTableElement); | ||
addUpStudentCredits(reportCardTableElement); | ||
calculateSemesterGpa(reportCardTableElement); |
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.
Nice job in breaking these down into individual responsibilities!
@@ -213,7 +262,7 @@ function openDropdown(dropdownElement) { | |||
* | |||
*/ | |||
function updateDropdownLabel() { | |||
// code goes here | |||
dropdownLabelElement.innerHTML = semester; |
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.
nit - semester
is in an outer scope. You can avoid future confusion by passing it directly to this function.
@@ -266,9 +340,18 @@ function addUpStudentCredits(reportCardTableElement) { | |||
*/ | |||
|
|||
function calculateSemesterGpa(reportCardTableElement) { | |||
// code goes here | |||
let grades = Array.from(reportCardTableElement.querySelectorAll('.gpa')).filter((grade) => grade.innerHTML in gpaPointsLookup); |
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.
gpaPointsLookup
is outer scoped as well. This will work fine for your scenario, but you can save yourself some future debugging pain by explicitly passing all the variables you need for your functions.
I have incorporated your suggestions. Kindly let me know if I'm missing anything.