-
Notifications
You must be signed in to change notification settings - Fork 3
feat(profile): Add social and academic profile section #450
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
base: main
Are you sure you want to change the base?
Conversation
Ritesh-Udgata
commented
Sep 8, 2025
- Add new SocialAcademicProfile component with form handling
- Integrate LinkedIn, ORCID, Scopus, and Google Scholar fields
- Add validation using Zod schema
- Update TypeScript types and interfaces
- Integrate with existing profile edit endpoint
- Add new SocialAcademicProfile component with form handling - Integrate LinkedIn, ORCID, Scopus, and Google Scholar fields - Add validation using Zod schema - Update TypeScript types and interfaces - Integrate with existing profile edit endpoint
- Remove unused imports and variables - Update toast implementation to use Sonner - Fix mutation status checks (isPending -> isLoading) - Update component dependencies and imports
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.
Pull Request Overview
This PR adds a new social and academic profile section to the user profile interface, allowing users to manage their LinkedIn, ORCID, Scopus, and Google Scholar profiles.
- Introduces a new SocialAcademicProfile component with form validation using Zod
- Updates profile-related TypeScript interfaces and type definitions
- Adds toast notification system and theme provider integration
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| server/package.json | Added dev script for development server |
| lib/src/types/auth.ts | Extended auth types with profile data interfaces |
| client/src/lib/api.ts | Created axios API client with authentication |
| client/src/components/ui/use-toast.ts | Added toast hook and state management |
| client/src/components/ui/toaster.tsx | Created Toaster component wrapper |
| client/src/components/ui/toast.tsx | Implemented toast UI components |
| client/src/components/profile/UserProfile.tsx | Integrated new social profile component |
| client/src/components/profile/SocialAcademicProfile.tsx | New form component for social/academic profiles |
| client/src/components/Providers.tsx | Added theme provider and updated toaster |
| client/package.json | Updated dependencies and TypeScript version |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| defaultValues: { | ||
| linkedin: profileData?.linkedin || "", | ||
| orchidID: profileData?.orchidID || "", | ||
| scopusID: profileData?.scopusID || "", | ||
| googleScholar: profileData?.googleScholar || "", | ||
| }, |
Copilot
AI
Sep 8, 2025
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 form default values are set during initialization but won't update when profileData loads asynchronously. Use the reset method in a useEffect to update form values after data loads, or use the values prop instead of defaultValues.
…on load - Set TOAST_REMOVE_DELAY from 1000000ms to 5000ms for better UX - Switch mutation status to isPending for disabled/loading state - Reset RHF values via useEffect when profileData loads to sync defaults Files: - client/src/components/ui/use-toast.ts - client/src/components/profile/SocialAcademicProfile.tsx Signed-off-by: Ritesh <[email protected]>
Signed-off-by: Ritesh <[email protected]>