diff --git a/app/assets/javascripts/deprecated_notes.js b/app/assets/javascripts/deprecated_notes.js index 1041e7e38ab49bf3a6aaf7e6ded4be7def1fd971..a6166306a98264ee8148479abc0c1980fab2b360 100644 --- a/app/assets/javascripts/deprecated_notes.js +++ b/app/assets/javascripts/deprecated_notes.js @@ -1536,7 +1536,7 @@ export default class Notes { <div class="timeline-entry-inner"> <div class="timeline-icon"> <a href="/${escape(currentUsername)}"> - <img class="avatar s40" src="${currentUserAvatar}" /> + <img class="avatar s32" src="${currentUserAvatar}" /> </a> </div> <div class="timeline-content ${discussionClass}"> diff --git a/app/assets/stylesheets/components/avatar.scss b/app/assets/stylesheets/components/avatar.scss index 8047de768a0f2e21c348a054e53b52b358b1104b..6d984a0922fe88f20706e19a900cc0ff793cac4d 100644 --- a/app/assets/stylesheets/components/avatar.scss +++ b/app/assets/stylesheets/components/avatar.scss @@ -67,7 +67,7 @@ $avatar-sizes: ( .avatar, .avatar-container { float: left; - margin-right: $gl-padding; + margin-right: $gl-padding-8; border-radius: 50%; @each $size, $size-config in $avatar-sizes { @@ -79,8 +79,8 @@ $avatar-sizes: ( .avatar { transition-property: none; - width: 40px; - height: 40px; + width: 32px; + height: 32px; padding: 0; background: var(--gl-background-color-subtle); overflow: hidden; diff --git a/app/assets/stylesheets/framework/page_header.scss b/app/assets/stylesheets/framework/page_header.scss index ad183a64cc56d20a6bc20e6567fe22bcdb45b6e7..8888b7cde0b1515bca4878668551baf4ea188625 100644 --- a/app/assets/stylesheets/framework/page_header.scss +++ b/app/assets/stylesheets/framework/page_header.scss @@ -21,6 +21,11 @@ @include media-breakpoint-up(sm) { margin-left: 4px; } + + &.s24 { + margin-top: -2px; + margin-right: 4px; + } } .commit-committer-link, diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 0fe2005fb98595510e1f79baccf11af9f8327957..8dc6f032a5bd612f82d8a660aa110a36222b6da0 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -11,14 +11,13 @@ %span.gl-hidden.sm:gl-inline= _('authored') #{time_ago_with_tooltip(@commit.authored_date)} %span= s_('ByAuthor|by') - = author_avatar(@commit, size: 24, has_tooltip: false) %strong + = author_avatar(@commit, size: 24, has_tooltip: false) = commit_author_link(@commit, avatar: true, size: 24) = user_status(@commit.author) - if @commit.different_committer? - %span.light= _('Committed by') - %strong - = commit_committer_link(@commit, avatar: true, size: 24) + %span.gl-text-subtle= _('Committed by') + = commit_committer_link(@commit, avatar: true, size: 24) #{time_ago_with_tooltip(@commit.committed_date)} = link_button_to _('Browse files'), project_tree_path(@project, @commit), class: 'gl-mr-3 gl-w-full sm:gl-w-auto gl-mb-3 sm:gl-mb-0' diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index 7a0abad70685689936d9e44074fd8b6329d25b23..d5a2fc82f8d95cb20d19ecc4cfe853ce78d384e0 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -26,7 +26,7 @@ %li{ class: ["commit flex-row", ("js-toggle-container" if collapsible)], id: "commit-#{commit.short_id}" } .gl-self-start.gl-hidden.sm:gl-block - = author_avatar(commit, size: 40, has_tooltip: false) + = author_avatar(commit, size: 32, has_tooltip: false) .commit-detail.flex-list.gl-flex.gl-justify-between.gl-items-center.gl-grow.gl-min-w-0 .commit-content{ data: { testid: 'commit-content' } } diff --git a/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml b/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml index 134d3b91df1269069f3836ab93dec8143433676f..7e8c2c4275e0c59292d04d6c949591e501fa3d66 100644 --- a/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml +++ b/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml @@ -49,7 +49,7 @@ %span.pipeline-id ##{generic_commit_status.pipeline.id} %span by - if generic_commit_status.pipeline.user - = user_avatar(user: generic_commit_status.pipeline.user, size: 20) + = user_avatar(user: generic_commit_status.pipeline.user, size: 24) - else %span.monospace API diff --git a/spec/models/concerns/avatarable_spec.rb b/spec/models/concerns/avatarable_spec.rb index 599804cebb0c27d5b8f21d28719a4ea5643de083..13180873ff4197527b0a3851b648937dfd47b9fe 100644 --- a/spec/models/concerns/avatarable_spec.rb +++ b/spec/models/concerns/avatarable_spec.rb @@ -58,7 +58,7 @@ expect(project.avatar).to receive(:local_url).twice.and_call_original expect(project.avatar_path).to eq(avatar_path) - expect(project.avatar_path(size: 40)).to eq(avatar_path + "?width=40") + expect(project.avatar_path(size: 32)).to eq(avatar_path + "?width=32") end it 'handles unpersisted objects' do