[UI idea] Autocomplete usernames
Idea incl level Show a list of users when teachers try to invite by username. This feature resembles the functionality of github for inviting contributors to our Hedy repo, for instance.
Additional context Make sure to only show relevant users; e.g., don't show student usernames if the teacher is inviting second teachers.
What a great idea!! Should not be hard to do, I guess?
I'd like to help out here and worked on the implementation of autocomplete for a bit.
My idea was to extend the modal prompt function to accept an optional autocomplete_endpoint parameter. If this parameter is present, we add an event listener to the modal input and show the suggestions. This way, we have a generic approach to also allow autocompletion of teachers as well.
At this point, I have a working autocompletion for the "Invite student by username" modal, but I noticed I was under the wrong assumption that we'd like to autocomplete students which belong to this teacher (using the get_teacher_students function).
Later I found out that students can only be in one class, and therefore I'd like to gather a more clear view of the requirements.
- Which students should be autocompleted? All students in the database or under certain conditions?
- Would you agree to limit the number of matches to 10?
- Are there any conditions for autocompleting the teachers?
Hi @Jhnbrn90! Sorry for the super late reply! But thank you for taking attention in our project.
My idea was to extend the modal prompt function to accept an optional autocomplete_endpoint parameter. If this parameter is present, we add an event listener to the modal input and show the suggestions. This way, we have a generic approach to also allow autocompletion of teachers as well.
Love this!
Regarding your questions. The user story for this feature is that teachers can invite users to their class under two categories: it can be a student, in which case any user that's not already in a class is eligible; or as a second teacher, in which case, of course, only teachers are allowed.
Which students should be autocompleted? All students in the database or under certain conditions?
If you're inviting a student, any user who's not part of a class already. If you're inviting a teacher, only show users that are teachers.
Would you agree to limit the number of matches to 10?
This makes the most sense yeah.
Are there any conditions for autocompleting the teachers?
I don't think so, maybe the only one is that they're not already a teacher in this class. Other than that I can't think of anything.
Hope this gets you on the right track!