Skip to content

Centralize avatar size

  • Please check this box if this contribution uses AI-generated content as outlined in the GitLab DCO & CLA

What does this MR do and why?

Currently many AvatarComponent() initialization hardcode the property size with hardcoded numerical value. This MR tries to avoid hardcoded numerical values by defining a hasmap in module Pajamas to map hardcoded values with a descriptive key.

Note that I only changed the logic for admin/groups view instead of all AvatarComponent() instances because I want the proof of concept to be approved before applying to more instances

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

I modified the some views to use symbol instead of hardcoded numerical values and it looks like the logic worked without changing original avatar size on FE.

URL Endpoint Before After
admin/groups before.png after.png
admin/projects Screenshot 2024-05-07 at 5.24.43 PM.png Screenshot 2024-05-07 at 5.26.46 PM.png
admin/topics image.png image.png

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Zizhan Zhou

Merge request reports