Skip to content

feat: add support for setting preview avatar for circle#2438

Open
cristianscheid wants to merge 1 commit intomasterfrom
feat/2433/circle-preview-avatar
Open

feat: add support for setting preview avatar for circle#2438
cristianscheid wants to merge 1 commit intomasterfrom
feat/2433/circle-preview-avatar

Conversation

@cristianscheid
Copy link
Copy Markdown
Contributor

@cristianscheid cristianscheid commented Apr 9, 2026

Summary

This PR so far focuses on the backend part of implementation.

  • Adds new property avatar for circle model.
  • Adds route to set avatar: POST ocs/v2.php/apps/circles/circles/<circle_id>/avatar
  • Adds route to fetch avatar: GET ocs/v2.php/apps/circles/circles/<circle_id>/avatar
  • Adds route to remove avatar: DELETE ocs/v2.php/apps/circles/circles/<circle_id>/avatar

TODO

Implement frontend.

Test plan

Run migration to create avatar column on circles_circle table.

occ migrations:execute circles 34000Date20260407183611

Set avatar (from terminal):

curl -X POST \
  -u "admin:admin" \
  -H "OCS-APIRequest: true" \
  -F "file=@/home/<username>/<folder>/mock_image.jpg" \
  "http://nextcloud.local/ocs/v2.php/apps/circles/circles/<circle_id>/avatar"

Get avatar (from browser):

http://nextcloud.local/ocs/v2.php/apps/circles/circles/<circle_id>/avatar

Remove avatar (from terminal):

curl -X DELETE \
  -u "admin:admin" \
  -H "OCS-APIRequest: true" \
  "http://nextcloud.local/ocs/v2.php/apps/circles/circles/<circle_id>/avatar"

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@cristianscheid cristianscheid self-assigned this Apr 9, 2026
@cristianscheid cristianscheid force-pushed the feat/2433/circle-preview-avatar branch 5 times, most recently from 3dde220 to 8316720 Compare April 9, 2026 12:35
Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
@cristianscheid cristianscheid force-pushed the feat/2433/circle-preview-avatar branch from 8316720 to 8cda4d6 Compare April 9, 2026 16:06
@cristianscheid
Copy link
Copy Markdown
Contributor Author

cristianscheid commented Apr 9, 2026

@nextcloud/designers would appreciate some input on the UI for uploading and updating avatar images for circles. One idea that came up was to make it similar to the user personal settings. Does that sound like a good idea?

Contacts app User's personal settings
image image

@kra-mo
Copy link
Copy Markdown
Member

kra-mo commented Apr 10, 2026

One idea that came up was to make it similar to the user personal settings. Does that sound like a good idea?

I actually thought that the difference between these two buttons was quite unclear so I wanted to give them more explanation text, see nextcloud/server#57008.

With that in mind, I think we could just add these 2/3 (depending on whether a picture is uploaded) buttons beneath the name and description in Edit mode.

Also, now that I'm looking at it, to make it less busy and more focused especially with these buttons, would it also be possible for the rest of the content to disappear while in edit mode? Including the Leave Team button, creating new items, etc.

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.

Support associating a "preview" picture to teams

2 participants