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

[Feature:RainbowGrades] Adding hover text to bad status cells #77

Merged
merged 11 commits into from
Jul 18, 2024

Conversation

oliiso
Copy link
Contributor

@oliiso oliiso commented Jul 1, 2024

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:
Image 7-1-24 at 3 55 PM

table.cpp Outdated Show resolved Hide resolved
oliiso and others added 2 commits July 2, 2024 15:40
Co-authored-by: Jaeseok Kang <123261952+ziesski@users.noreply.github.com>
table.cpp Outdated
}




Copy link
Member

Choose a reason for hiding this comment

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

Unnecessary addition?

Copy link
Contributor Author

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
Comment on lines 97 to 106
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 + "\" ";
}

Copy link
Member

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.

Copy link
Contributor Author

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 + "\" ";
Copy link
Member

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

Copy link
Contributor Author

@oliiso oliiso Jul 9, 2024

Choose a reason for hiding this comment

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

Updated in c3528db

table.cpp Outdated Show resolved Hide resolved
Co-authored-by: Jaeseok Kang <123261952+ziesski@users.noreply.github.com>
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 + "\" ";
Copy link
Member

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

Copy link
Contributor Author

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+"\" ";
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in 77f1112

@oliiso oliiso requested review from ziesski and bmcutler July 17, 2024 17:53
@@ -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 + "\" ";
Copy link
Member

Choose a reason for hiding this comment

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

line missing indentation

Copy link
Contributor Author

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+"\" ";
Copy link
Member

Choose a reason for hiding this comment

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

line missing indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in f9402f2

@bmcutler bmcutler merged commit 912cfdf into main Jul 18, 2024
1 check passed
@bmcutler bmcutler deleted the bad-status-hover-text branch July 18, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants