Replace manual username input with Select dropdown for student remova…#21
Replace manual username input with Select dropdown for student remova…#21SillyNY wants to merge 3 commits into
Conversation
…l The Remove Student button now shows a dropdown list of all students currently in the queue, eliminates exact username matching.
|
Hey @SillyNY, this is great work! A few bugs small bugs I came across while testing:
And one small improvement to the Remove Student message that includes the dropdown: I'd like it to label each emoji so that the TAs can know what they mean. Something like ✅=Passoff, ❓=Question. If you make those changes, I'll go ahead and merge your PR! |
|
@TwoLettuce Thank you for spending time on my code. You're right — I didn't think through those edge cases carefully enough. I've since addressed them and written scripts to verify the fixes, though I'll be honest: I haven't checked the final output live on Discord yet. Would appreciate your eyes on it. |
|
Hey @SillyNY, thanks for making those changes and for making tests for it! Since our entire team speaks English, all comments and documentation should be in English so that we can all contribute to the project's maintenance. We also would like to keep the project organized, so I request that you create a package for the test file you created where we can put more test files we create in the future. Additionally, modals.py has some redundant imports. If these commits were created with an AI agent, please manually review the code. Would you mind making those changes as well? |
Summary
Replaced the manual username text input in the "Remove Student" flow with a two-step dropdown-based interface. TAs
no longer need to type or copy/paste exact usernames.
What changed
Selectdropdown listing all students currently in the queue, with theirdisplay name, queue position, and type (help/passoff)
user_idinstead of string-matching the username — no more failed matches from typosFiles modified
ui/modals.pyRemoveConfirmModal: removed the usernameTextInput; now receivesuser_id+ displayuser_iddirectlyui/views/ta_view.pyRemoveStudentViewclass (adiscord.ui.Viewwith a dynamically populatedSelect); updated the "Remove Student" button callback to show the dropdown firstTest Plan
student is no longer in the queue." message shown
Notes
Selectsupports a maximum of 25 options. If the queue grows beyond that,entries[:25]should beused (not yet implemented — CS 240 queue sizes are typically under this limit)
Fixes: #4