261 frontend build invite member ux with user search autocomplete#278
Merged
smattymatty merged 2 commits intoFeb 13, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Template CheckAll checks passed. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Build Invite Member UX with User Search Autocomplete
Description
Replaces the placeholder "Coming Soon" invite modal with a fully functional invite flow. Teachers can now search for users by username or name, select a result from an autocomplete dropdown, pick a role, and send an invitation — all without leaving the course detail page.
Closes #261
Mandatory Checklist
mainWhat Changed
New Files
src/types/users.types.tsUserSearchResult— mirrors backendUserSearchSerializerwith optional privacy-filtered fields (email,first_name,last_name,full_name)UserSearchParams— query parameters (q,page,page_size)UserSearchPaginatedResponse— standard DRF pagination shape (count,next,previous,results)src/services/usersApi.tssearchUsers(params)— GET/api/users/search/with 10s timeout andgetSafeErrorMessageerror handling, matching the existingcoursesApipatternsrc/components/common/UserSearchInput.tsxReusable autocomplete combobox component with:
useDebouncehook, minimum 2 characterscancelledflag pattern (same asuseCourses.ts) prevents stale responsesrole="combobox",aria-expanded,aria-activedescendant,role="listbox"/role="option"on dropdown itemsmousedownlistener on documentstopPropagation()when open, so the parent modal only receives Escape when the dropdown is closedusernamewhenfull_nameis hidden by privacy settingsstart-/end-/ps-/pe-)Modified Files
src/components/courses/InviteMemberModal.tsx(rewrite)Full invite flow replacing the placeholder:
UserSearchInputfor user selectionHardLoadSelectfor role picker (student/assistant/teacher, defaults to student)max-w-sm sm:max-w-md,flex-col-reverse sm:flex-rowbutton layout{ isOpen, onClose, onSubmit }) — no changes needed toMembersTab.tsxsrc/i18n/locales/en.jsonReplaced old placeholder keys (
comingSoon,userIdLabel,userIdPlaceholder) with new search UX keys:searchLabel,searchPlaceholder,searchResults,noResults,searchMinChars,searchError,selectedUser,clearSelection,cancelsrc/i18n/locales/ar.jsonMatching Arabic translations for all new keys
src/pages/__tests__/CourseDetailPage.test.tsxUpdated existing "opens invite modal" test to verify the search input and Send Invite button instead of the old "Coming Soon" text
New Test Files
src/services/__tests__/usersApi.test.ts(7 tests)src/components/common/__tests__/UserSearchInput.test.tsx(21 tests)src/components/courses/__tests__/InviteMemberModal.test.tsx(14 tests)How to Test
make uporcd Frontend/EduLiteFrontend && npm run devInvite Flow
Keyboard Navigation
RTL Testing
Run Tests
Screenshots (if applicable)