-
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
356a3fc
Initial change for bad status hover
oliiso ba4665b
edit words in hover box
oliiso 23c8202
Update extension logic
oliiso 3237791
Merge branch 'main' into bad-status-hover-text
oliiso 07ac6de
remove duplicate code
oliiso c3528db
Move hover text
oliiso 52d06c1
Update logic for extension
oliiso a7eefe9
Fix indentation
oliiso 77f1112
Re-adding unspecified reason for extension
oliiso 06ba5a8
Merge branch 'main' into bad-status-hover-text
oliiso f9402f2
Update indentation
oliiso File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,6 @@ TableCell::TableCell(const std::string& c, float d, int precision, const std::st | |
rotate = 0; | ||
} | ||
|
||
|
||
TableCell::TableCell(float d, const std::string& c, int precision, const std::string& n, int ldu, | ||
CELL_CONTENTS_STATUS v,const std::string& e,bool ai, const std::string& a, | ||
int s, int /*r*/,const std::string& reason,const std::string& gID,const std::string& userName, int daysExtended) { | ||
|
@@ -95,20 +94,15 @@ TableCell::TableCell(float d, const std::string& c, int precision, const std::st | |
academic_integrity = ai; | ||
event = e; | ||
|
||
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+"\" "; | ||
} | ||
|
||
// Bool in order of priority - top to bottom | ||
// Don't think we need this logic, but leaving it as sort of assert | ||
if (event == "Overridden"){ | ||
override = true; | ||
bad_status = inquiry = extension = version_conflict = cancelled = false; | ||
} else if (event == "Extension"){ | ||
} else 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 + "\" "; | ||
oliiso marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in a7eefe9 |
||
} else if (event == "Open"){ | ||
inquiry = true; | ||
bad_status = override = extension = version_conflict = cancelled = false; | ||
|
@@ -121,10 +115,10 @@ TableCell::TableCell(float d, const std::string& c, int precision, const std::st | |
} 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 + "\" "; | ||
} else { | ||
inquiry = bad_status = override = extension = version_conflict = cancelled = false; | ||
} | ||
|
||
} | ||
|
||
|
||
|
@@ -151,11 +145,10 @@ std::ostream& operator<<(std::ostream &ostr, const TableCell &c) { | |
outline = "outline:4px solid #fc0303; outline-offset: -4px;"; | ||
} | ||
|
||
if (c.extension){ | ||
ostr << "<td " << c.hoverText << "style=\"border:1px solid #aaaaaa; background-color:#" << c.color << "; " << outline << " \" align=\"" << c.align << "\">"; | ||
if (c.extension || c.bad_status) { | ||
ostr << "<td " << c.hoverText << "style=\"border:1px solid #aaaaaa; background-color:#" << c.color << "; " << outline << "\" align=\"" << c.align << "\">"; | ||
} else { | ||
ostr << "<td style=\"border:1px solid #aaaaaa; background-color:#" << c.color << "; " << outline << " \" align=\"" << c.align << "\">"; | ||
|
||
ostr << "<td style=\"border:1px solid #aaaaaa; background-color:#" << c.color << "; " << outline << "\" align=\"" << c.align << "\">"; | ||
} | ||
|
||
if (0) { //rotate == 90) { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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