Skip to content

Adapts last commit badge to updated user_avatar_link that uses GlAvatar

What does this MR do and why?

Fixes #355858 (closed)

Ensures that updated user_avatar_link (that now uses GlAvatar) is properly displayed in last commit badge (app/assets/javascripts/repository/components/last_commit.vue)

Screenshots or screen recordings

before (feature flag disabled)
Screenshot_2022-04-01_at_12.58.13
Screenshot_2022-04-01_at_12.57.51
feature flag disabled enabled
Screenshot_2022-04-01_at_12.46.56 Screenshot_2022-04-01_at_12.47.31
Screenshot_2022-04-01_at_12.46.40 Screenshot_2022-04-01_at_12.47.09

How to set up and validate locally

  1. Open project root and check how the user avatar in last commit badge looks (NOTE: there are two variants of user avatars for last commit: one is available in local dev instance under http://localhost:3000/gitlab-instance-858b5cf1/Monitoring, another under http://localhost:3000/h5bp/html5-boilerplate)

  2. Enable feature flag that would switch user_avatar_link to use the new version Feature.enable(:gl_avatar_for_all_user_avatars)

  3. Check project root again

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 Sheldon Led

Merge request reports