Skip to content

Allow customization of avatars for users and groups - #26081

Merged
oliverguenther merged 11 commits into
devfrom
feature/custom-avatars
Oct 16, 2026
Merged

oliverguenther merged 11 commits into
devfrom
feature/custom-avatars

Conversation

@oliverguenther

@oliverguenther oliverguenther commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Ticket

https://community.openproject.org/work_packages/SE-625

What are you trying to accomplish?

Screenshots

2026-10-16_08-30-51.mp4
2026-10-16_08-32-21@2x

What approach did you choose and why?

Allow customization of the initials being rendered, as well as the background color.

Allows clicking on an avatar to trigger a dialog to edit or switch the type of avatar you, or the user/group should have

Allow avatar components to be rendered for preview reasons, not only with the live avatar. For this, the API is extended to allow admins or the current user to preview an avatar of a different type.

Slightly modifies the SVG rendering to allow for easier replacement during previews

Refactors the group tab registration to work the same way as users, avoiding patching the core from avatar settings

AI involvement

Collaborative – AI generated a substantial part of the code; I reviewed and understand every line.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@github-actions github-actions Bot added the ai: Collaborative 💻 AI generated a substantial part of the code; A human reviewed and understands every line. label Oct 16, 2026
Comment thread modules/avatars/lib/open_project/avatars/initials_svg.rb Fixed
@oliverguenther
oliverguenther marked this pull request as ready for review October 16, 2026 08:47

@HDinger HDinger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice 👏 🏅
I took the freedom and fixed the issues I remarked myself 😅

Comment thread modules/avatars/app/components/avatars/form_section_component.html.erb Outdated
data: { turbo: true, turbo_method: :delete, turbo_confirm: t(:are_you_sure_delete_avatar) }
)
) { t("avatars.delete_image") } %>
<% end %>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The UX of this component is not really ideal. I for example don't see that I uploaded anything whithin this component. However, in the D-Team we are planning a primer form file_input field which would solve this. So it is fine to keep it like it is for now.

Comment thread modules/avatars/app/forms/avatars/initials_form.rb
@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./spec/features/components/lookbook_accessibility_spec.rb[1:14:1]
🤖 Ask Copilot to investigate

Copy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer.

@copilot The following spec(s) are flaky in CI (first seen on PR #26081, linked for reference only):

- `rspec ./spec/features/components/lookbook_accessibility_spec.rb[1:14:1]`

Treat this as a standalone task, unrelated to PR #26081. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #26081 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @oliverguenther to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @oliverguenther, and request a review from @oliverguenther.
On every commit, set @oliverguenther as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

@oliverguenther
oliverguenther merged commit fb496ea into dev Oct 16, 2026
26 checks passed
@oliverguenther
oliverguenther deleted the feature/custom-avatars branch October 16, 2026 12:00
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ai: Collaborative 💻 AI generated a substantial part of the code; A human reviewed and understands every line. feature needs review Passion time

Development

Successfully merging this pull request may close these issues.

3 participants