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

Added default profile picture #680

Merged
merged 3 commits into from
Dec 14, 2024

Conversation

NazireAta
Copy link
Contributor

@NazireAta NazireAta commented Dec 14, 2024

📋 Proposed Changes

  • Updated all components that display profilePicture to use the new placeholder:
    • QuestionCard
    • UserCard
    • ProfilePage
    • Other components displaying user avatars.
  • Replaced the previous placeholder (https://placehold.co/640x640) with the new image at frontend/src/assets/placeholder_profile.png.
  • Added fallback logic to components without an existing placeholder for profilePicture.

Related Issue

Closes #679

🧪 Included Tests

  • The placeholder image appears when a profilePicture is missing.
  • The correct user profile picture is displayed when available.
  • Confirm that there are no broken images or missing placeholders across the application.

@NazireAta NazireAta added priority: medium Medium priority component: frontend About frontend labels Dec 14, 2024
@NazireAta NazireAta requested a review from mmtftr December 14, 2024 14:40
@NazireAta NazireAta self-assigned this Dec 14, 2024
Copy link
Contributor

@mmtftr mmtftr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some required changes, please check the comments

frontend/src/routes/profile.tsx Outdated Show resolved Hide resolved
@@ -142,7 +142,7 @@ export function UserProfile({ userId }: { userId: string }) {
<HStack space="lg" className="items-center justify-between py-4">
<Image
source={{
uri: "https://placehold.co/640x640",
uri: "frontend\src\assets\placeholder_profile.png",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need import here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to add the placeholder image into mobile, and the code has to be a little different here. Something like {author.profilePicture ? {uri: author.profilePicture} : Placeholder}

swagger/openapi.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@mmtftr mmtftr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks

@NazireAta NazireAta merged commit c297af3 into develop Dec 14, 2024
1 check passed
@NazireAta NazireAta deleted the frontend/feature/add_default_profile_picture branch December 14, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: frontend About frontend priority: medium Medium priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants