-
Notifications
You must be signed in to change notification settings - Fork 226
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
Add search bar to metrics feature watchlist #1353
Conversation
} | ||
} | ||
|
||
function add_instance_to_dict( |
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.
the params are long, could convert it into a javascript object
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.
In general the search feature is intuitive to use, and the categories chosen are great.
There are some repetition in the code, which hopefully could be reduced.
Lastly, we would strongly prefer to modify the on-click behavior of results: https://fomantic-ui.com/modules/search.html#/settings
} else { | ||
$('#archived_tab').html(archived_html); | ||
} | ||
pending_empty_message = "There are no pending students in need of attention"; |
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: could reduce the duplication in the following chunk of code
app/assets/javascripts/watchlist.js
Outdated
@@ -319,9 +364,55 @@ function get_watchlist_function(){ | |||
} | |||
}); | |||
|
|||
$("#pending_search").keypress(function (e) { |
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: reduce the repetition here
app/assets/javascripts/watchlist.js
Outdated
$('.ui.icon').popup(); | ||
$('.ui.circular.label.condition').popup(); | ||
|
||
$('#pending_search').search({ |
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: similar situation here
app/assets/javascripts/watchlist.js
Outdated
} | ||
}); | ||
$("#resolved_search").keypress(function (e) { | ||
var code = (e.keyCode ? e.keyCode : e.which); |
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 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.
Tested locally, functionality seems complete. Great work :)
Description
This PR adds a search bar to each tab of the watchlist in the metrics feature so that instructors can search students by name, email, or violated metrics condition.
Motivation and Context
Especially when a tab in the watchlist has a large number of students, instructors may want to search for particular students.
How Has This Been Tested?
Ensure that there are students in the watchlist by adjusting the metrics conditions.
Types of changes
Checklist:
Other issues / help required
In the future, we can iterate on this to implement a more comprehensive search feature that allows instructors to search by multiple categories (i.e. multiple violated conditions or a violated condition and a name). Also, please let me know if you have any design suggestions!
If unsure, feel free to submit first and we'll help you along.