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

💻 Autocomplete usernames #4689

Open
hasan-sh opened this issue Oct 31, 2023 · 3 comments · May be fixed by #6032
Open

💻 Autocomplete usernames #4689

hasan-sh opened this issue Oct 31, 2023 · 3 comments · May be fixed by #6032
Assignees
Labels
good first issue Good for newcomers teacher-happiness Features that make teachers happier

Comments

@hasan-sh
Copy link
Contributor

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.

@hasan-sh hasan-sh added good first issue Good for newcomers teacher-happiness Features that make teachers happier labels Oct 31, 2023
@Felienne
Copy link
Member

What a great idea!! Should not be hard to do, I guess?

@Jhnbrn90
Copy link

Jhnbrn90 commented Aug 15, 2024

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?

@jpelay
Copy link
Member

jpelay commented Sep 5, 2024

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!

@Felienne Felienne moved this from Long Term to Soon in Hedy organization board Nov 30, 2024
@Felienne Felienne changed the title [UI idea] Autocomplete usernames 💻 Autocomplete usernames Dec 1, 2024
@jpelay jpelay assigned jpelay and unassigned hasan-sh and Annelein Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers teacher-happiness Features that make teachers happier
Projects
Status: Soon
Development

Successfully merging a pull request may close this issue.

5 participants