Skip to content

Conversation

@Ritesh-Udgata
Copy link

  • 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
@Radian6405 Radian6405 requested a review from Copilot September 8, 2025 10:04
Copy link
Contributor

Copilot AI left a 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.

Comment on lines +35 to +40
defaultValues: {
linkedin: profileData?.linkedin || "",
orchidID: profileData?.orchidID || "",
scopusID: profileData?.scopusID || "",
googleScholar: profileData?.googleScholar || "",
},
Copy link

Copilot AI Sep 8, 2025

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.

Copilot uses AI. Check for mistakes.
Ritesh-Udgata and others added 3 commits September 8, 2025 16:31
…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]>
@catfo435 catfo435 closed this Oct 14, 2025
@catfo435 catfo435 reopened this Oct 14, 2025
@catfo435 catfo435 marked this pull request as draft October 14, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants