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

avatar component for user profile #118

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

FrankiePower
Copy link

@FrankiePower FrankiePower commented Feb 4, 2025

Pull Request: Replace Blockies with DiceBear Avatar Generation

Context

The current implementation uses Blockies for generating user avatars from Ethereum addresses. This PR replaces it with DiceBear, a more modern and customizable avatar generation library, while maintaining all existing functionality and adding proper fallback mechanisms.


Changes

  1. New Avatar Component:

    • Creates a new Avatar component using DiceBear
    • Implements loading and error states
    • Maintains existing styling and dimensions
    • Adds proper accessibility attributes
  2. PageHeader Updates:

    • Replaces Blockies implementation with new Avatar component
    • Maintains all existing functionality
    • Updates TypeScript types and props

Requirements

  1. Avatar Generation:

    • Generate consistent avatars based on Ethereum addresses
    • Maintain visual consistency across sessions
    • Handle loading and error states gracefully
  2. Integration:

    • Seamless integration with existing components
    • Maintain current styling and dimensions
    • Ensure proper client-side rendering

Acceptance Criteria

  1. Avatar Display:

    • Avatars are generated consistently for the same address
    • Loading states show appropriate fallback
    • Error states show appropriate fallback
    • Styling matches existing design (32x32px, rounded)
  2. Performance:

    • Avatar generation is performant
    • No unnecessary re-renders
    • Proper client-side only rendering

Related Files

  1. components/Avatar.tsx:

    • New Avatar component implementation
    • DiceBear integration
    • Fallback mechanisms
  2. components/PageHeader.tsx:

    • Updated to use new Avatar component
    • Maintained existing functionality

Checklist

  • Create new Avatar component
  • Update PageHeader implementation
  • Implement fallback mechanisms
  • Ensure proper client-side rendering
  • Add proper TypeScript types
  • Document all changes

Copy link

vercel bot commented Feb 4, 2025

@FrankiePower is attempting to deploy a commit to the CofiBlocks Team on Vercel.

A member of the Team first needs to authorize it.

@FrankiePower
Copy link
Author

@evgongora hello chief. i sent you a dm on telegram. i need some help setting up my dev environment, so i can test some changes and finish this PR

@evgongora
Copy link
Collaborator

Hey @FrankiePower how's this going?

@FrankiePower
Copy link
Author

i am almost done with it. just testing. i ran into some issues with my machine which will be resolved tomorrow. i will make a push and open up this PR for review. i apologize for the delay.

Screenshot 2025-02-06 222420
Screenshot 2025-02-06 222440

@FrankiePower
Copy link
Author

also do you like it?

@FrankiePower FrankiePower marked this pull request as ready for review February 8, 2025 04:23
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