Skip to content

Conversation

@shkelqim627
Copy link

@shkelqim627 shkelqim627 commented Nov 28, 2025

Replaced the Flowbite Avatar component with the new Shadcn Avatar component across the codebase.
Let me know if anything needs adjustment!

Comment on lines 46 to 54
function getDisplayName(user?: SessionUser | null) {
if (user?.name && user.name.trim().length > 0) return user.name;
if (user?.email) {
const localPart = user.email.split('@')[0] ?? user.email;
return localPart || user.email;
}
return m.user_fallback();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

More code - more potential issue. Idea is to keep it simple and streightforward, limited to component and no functional changes. Kindly follow the previous implementation, if otherwise you have a very strong reason to add new "lines"

alt={getDisplayName(page.data.session.user)}
/>
<AvatarFallback>
{getInitials(page.data.session.user?.name ?? page.data.session.user?.email ?? null)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use the name only. We have bigger problems upstreams if we are not getting it tbh 👨🏻‍💻

Copy link
Contributor

@aryadhruv aryadhruv left a comment

Choose a reason for hiding this comment

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

Great start ! A few changes.

Idea is to keep the changes and scope of PR limited to components migration. Thanks !

@aryadhruv
Copy link
Contributor

@shkelqim627 Let's merge this post #136 , ensuring that the button for dark mode and the avatar box has the same height.

@aryadhruv aryadhruv linked an issue Dec 5, 2025 that may be closed by this pull request
5 tasks
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.

Migrate: Avatar Component

2 participants