-
Notifications
You must be signed in to change notification settings - Fork 24
feat: show avatars across the webui #757
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
Conversation
2d693e4 to
fa16924
Compare
1d67ac4 to
c96b25c
Compare
|
Not part of this PR, but will be done in a followup:
|
There was a problem hiding this 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 implements a feature to display user avatars across the web UI by introducing a new UserAvatar component and replacing legacy avatar components and related API calls.
- Implements UserAvatar.vue for fetching and displaying avatars.
- Updates AvatarUpload.vue and several other components as well as their snapshots and tests to use the new user-avatar interface.
Reviewed Changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/web-pkg/src/components/Avatars/UserAvatar.vue | Introduces the new UserAvatar component that fetches and displays a user’s avatar. |
| packages/web-pkg/src/components/Avatars/AvatarUpload.vue | Updates avatar upload logic and replaces legacy avatar components with UserAvatar. |
| packages/web-client/src/graph/photos/* | Adds new API support for fetching user photos. |
| packages/web-app-files/** | Adjusts components, tests and snapshots to replace legacy avatar component usage with user-avatar. |
| packages/web-app-admin-settings/** | Updates avatar rendering in various admin components using the new UserAvatar. |
| packages/design-system/** | Modifies components and tests (e.g., OcRecipient) to integrate avatar changes. |
| @@ -0,0 +1,47 @@ | |||
| <template> | |||
| <oc-avatar :user-name="userName" :src="avatarSrc" :width="36" /> | |||
Copilot
AI
May 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a 'width' prop to UserAvatar to allow dynamic sizing rather than using a hard-coded value of 36. This would enable consistent support for varying avatar sizes across different components.
JammingBen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff 🙌
| return unref(avatarMap)[userId] | ||
| }) | ||
|
|
||
| const loadAvatar = async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you extract this to a composable in the future as you mentioned, could you please make this a task? Then you can just cancel it on unmount, no need for the AbortController.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 ofc
Description
Related Issue
How Has This Been Tested?
Types of changes