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
@dokterbob
Copy link
Contributor

dokterbob commented Dec 10, 2025

@shkelqim627 Almost there, I think all that's necessary is to resolve your first merge conflict! 🤞🏼

It does seem there are formatting issues (have you enabled commit hooks? Ref: https://moonrepo.dev/docs/guides/vcs-hooks), particularly in your second commit, which might be the cause of the merge conflict in the first place.

Here's how I would address it:

  1. Setup VCS hooks in moon to run whenever you commit: moon sync hooks (this fixes formatting problems and lints the code)
  2. Manually run formatting/lint fixes: moon :format-write :lint-write
  3. Commit generated fixups
  4. Interactively rebase your work into the base branch: git rebase -i <base_branch> In the editor, squash your later commits into the first. This will remove intermittent changes and should effectively resolve your merge conflict.

IF this is succesfull, you can force-push, removing your old messy commits, replacing them by a single clean one which should merge just fine.

Let us know (here) if you run into any issues with that!

@dokterbob
Copy link
Contributor

P.S. There was an issue causing Github Actions/CI not to be run. These have since been resolved and automated checks should now inform you of any formatting or linter issues.

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

3 participants