Skip to content

Conversation

@AlexAndBear
Copy link
Contributor

@AlexAndBear AlexAndBear commented May 27, 2025

Description

Related Issue

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear AlexAndBear force-pushed the issues/598 branch 2 times, most recently from 2d693e4 to fa16924 Compare May 27, 2025 10:39
@AlexAndBear AlexAndBear force-pushed the issues/598 branch 2 times, most recently from 1d67ac4 to c96b25c Compare May 27, 2025 10:48
@AlexAndBear
Copy link
Contributor Author

Not part of this PR, but will be done in a followup:

  • Showing avatars in shared with me / shared with others view
  • PromiseQueue (if needed)

@AlexAndBear AlexAndBear requested a review from kulmann May 28, 2025 07:25
@AlexAndBear AlexAndBear marked this pull request as ready for review May 28, 2025 07:51
Copilot AI review requested due to automatic review settings May 28, 2025 07:51
Copy link
Contributor

Copilot AI left a 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" />
Copy link

Copilot AI May 28, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@JammingBen JammingBen left a 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 () => {
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 ofc

@AlexAndBear AlexAndBear merged commit f0deaad into main May 28, 2025
18 checks passed
@AlexAndBear AlexAndBear deleted the issues/598 branch May 28, 2025 14:34
This was referenced May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

show profile images across the web ui

3 participants