Skip to content

Set the size of `GlAvatarLink` to use in `app/assets/javascripts/diffs/components/diff_content.vue`

What does this MR do and why?

For #355861 (closed)

This MR sets the size on the user-avatar-link used in diff_content.vue to 48 (from 40, which is not supported by GlAvatar/GlAvatarLink) and removes some CSS that was pushing it in behind the comment box.

Screenshots or screen recordings

without this MR with this MR
feature flag disabled Screen_Shot_2022-04-19_at_14.13.09 Screen_Shot_2022-04-19_at_15.07.29
feature flag enabled Screen_Shot_2022-04-19_at_14.18.52 Screen_Shot_2022-04-19_at_14.33.27
Size options comparison

The two closest options to the old size, 40px:

32px 48px
Screen_Shot_2022-04-19_at_14.32.51 Screen_Shot_2022-04-19_at_14.33.27

How to set up and validate locally

  1. make a change to an image in a branch/MR
  2. navigate to the MR's diff
  3. click on the image to open the comment box
  4. your avatar should appear to the left of the comment box, 40px by 40px
  5. git checkout 355861-gl-avatar-in-pending-image-diff-comments
  6. refresh the page and click the image to open the comment box again
  7. your avatar should appear, this time 48px by 48px
  8. echo "Feature.enable(:gl_avatar_for_all_user_avatars)" | rails c
  9. refresh the page and click the image to open the comment box again
  10. your avatar should appear again, still 48px by 48px

optional cleanup: echo "Feature.disable(:gl_avatar_for_all_user_avatars)" | rails c

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Miranda Fluharty

Merge request reports