-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Feature:RainbowGrades] Adding hover text to bad status cells #77
Conversation
Co-authored-by: Jaeseok Kang <[email protected]>
table.cpp
Outdated
} | ||
|
||
|
||
|
||
|
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.
Unnecessary addition?
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.
Fixed in 07ac6de
table.cpp
Outdated
if (event == "Extension" && reason != "") { | ||
extension = true; | ||
inquiry = bad_status = override = version_conflict = cancelled = false; | ||
hoverText = "class=\"hoverable-cell\" data-hover-text=\"" + userName + " received a " + std::to_string(daysExtended) + " day extension due to " + reason + " on " + gID + "\" "; | ||
} else if (event == "Bad") { | ||
bad_status = true; | ||
override = inquiry = extension = version_conflict = cancelled = false; | ||
hoverText = "class=\"hoverable-cell\" data-hover-text=\"" + userName + " received a bad status on " + gID + "\" "; | ||
} | ||
|
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.
Is there a reason you are adding this in a separate if statement? Right below this code snippet we have existing if statements that are identical to your addition. I would say it is better to put it in there instead of duplicating the code.
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.
Fixed in 07ac6de
table.cpp
Outdated
hoverText = "class=\"hoverable-cell\" data-hover-text=\""+userName+" received a "+std::to_string(daysExtended)+" day extension without specified reason on "+gID+"\" "; | ||
} | ||
if (event == "Extension" && reason != "") { | ||
hoverText = "class=\"hoverable-cell\" data-hover-text=\"" + userName + " received a " + std::to_string(daysExtended) + " day extension due to " + reason + " on " + gID + "\" "; |
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.
What I was suggesting is to move the hoverText inside the if statement below, which is line 109
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.
Updated in c3528db
Co-authored-by: Jaeseok Kang <[email protected]>
table.cpp
Outdated
@@ -109,6 +102,9 @@ TableCell::TableCell(float d, const std::string& c, int precision, const std::st | |||
} else if (event == "Extension"){ | |||
extension = true; | |||
inquiry = bad_status = override = version_conflict = cancelled = false; | |||
if (reason != ""){ | |||
hoverText = "class=\"hoverable-cell\" data-hover-text=\"" + userName + " received a " + std::to_string(daysExtended) + " day extension due to " + reason + " on " + gID + "\" "; |
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 line should be indented
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.
Fixed in a7eefe9
if (reason != "") { | ||
hoverText = "class=\"hoverable-cell\" data-hover-text=\""+userName+" received a "+std::to_string(daysExtended)+" day extension due to "+reason+" on "+gID+"\" "; | ||
} else { | ||
hoverText = "class=\"hoverable-cell\" data-hover-text=\""+userName+" received a "+std::to_string(daysExtended)+" day extension without specified reason on "+gID+"\" "; |
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.
looks like we lost the unspecified reason hover text in the refactor. please re-add below
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.
Added in 77f1112
@@ -109,6 +102,11 @@ TableCell::TableCell(float d, const std::string& c, int precision, const std::st | |||
} else if (event == "Extension"){ | |||
extension = true; | |||
inquiry = bad_status = override = version_conflict = cancelled = false; | |||
if (reason != ""){ | |||
hoverText = "class=\"hoverable-cell\" data-hover-text=\"" + userName + " received a " + std::to_string(daysExtended) + " day extension due to " + reason + " on " + gID + "\" "; |
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.
line missing indentation
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.
Updated in f9402f2
if (reason != ""){ | ||
hoverText = "class=\"hoverable-cell\" data-hover-text=\"" + userName + " received a " + std::to_string(daysExtended) + " day extension due to " + reason + " on " + gID + "\" "; | ||
} else { | ||
hoverText = "class=\"hoverable-cell\" data-hover-text=\""+userName+" received a "+std::to_string(daysExtended)+" day extension without specified reason on "+gID+"\" "; |
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.
line missing indentation
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.
Updated in f9402f2
What is the current behavior?
Students aren't sure what the red outline on the grade report means since the description is at the bottom of the grade report page.
What is the new behavior?
A hover feature is now implemented to notify that the red outline cells are bad status, including the username of the student with a bad status and the homework/assignment that a bad status was received.
Other information?
Fixes #10439 (Submitty/Submitty#10439)
When the cursor is over the bad status cell this is the hover text that appears: