Merge branch '29278-commits-page-tooltips' into 'master'

Resolve "Commits page tooltips"

Closes #29278

See merge request gitlab-org/gitlab-ce!20674
This commit is contained in:
Annabel Gray 2018-07-23 15:55:12 +00:00
commit f0b1780f45
6 changed files with 12 additions and 9 deletions

View File

@ -145,15 +145,14 @@ module CommitsHelper
person_name person_name
end end
options = { link_options = {
class: "commit-#{options[:source]}-link has-tooltip", class: "commit-#{options[:source]}-link"
title: source_email
} }
if user.nil? if user.nil?
mail_to(source_email, text, options) mail_to(source_email, text, link_options)
else else
link_to(text, user_path(user), options) link_to(text, user_path(user), link_options)
end end
end end

View File

@ -18,7 +18,7 @@
- commit = blame_group[:commit] - commit = blame_group[:commit]
%td.blame-commit{ class: age_map_class(commit.committed_date, project_duration) } %td.blame-commit{ class: age_map_class(commit.committed_date, project_duration) }
.commit .commit
= author_avatar(commit, size: 36) = author_avatar(commit, size: 36, has_tooltip: false)
.commit-row-title .commit-row-title
%span.item-title.str-truncated-100 %span.item-title.str-truncated-100
= link_to_markdown commit.title, project_commit_path(@project, commit.id), class: "cdark", title: commit.title = link_to_markdown commit.title, project_commit_path(@project, commit.id), class: "cdark", title: commit.title

View File

@ -10,7 +10,7 @@
%span.d-none.d-sm-inline authored %span.d-none.d-sm-inline authored
#{time_ago_with_tooltip(@commit.authored_date)} #{time_ago_with_tooltip(@commit.authored_date)}
%span= s_('ByAuthor|by') %span= s_('ByAuthor|by')
= author_avatar(@commit, size: 24) = author_avatar(@commit, size: 24, has_tooltip: false)
%strong %strong
= commit_author_link(@commit, avatar: true, size: 24) = commit_author_link(@commit, avatar: true, size: 24)
- if @commit.different_committer? - if @commit.different_committer?

View File

@ -19,7 +19,7 @@
%li.commit.flex-row.js-toggle-container{ id: "commit-#{commit.short_id}" } %li.commit.flex-row.js-toggle-container{ id: "commit-#{commit.short_id}" }
.avatar-cell.d-none.d-sm-block .avatar-cell.d-none.d-sm-block
= author_avatar(commit, size: 36) = author_avatar(commit, size: 36, has_tooltip: false)
.commit-detail.flex-list .commit-detail.flex-list
.commit-content.qa-commit-content .commit-content.qa-commit-content

View File

@ -0,0 +1,5 @@
---
title: Remove tooltips from commit author avatar and name in commit lists
merge_request: 20674
author:
type: other

View File

@ -238,6 +238,5 @@ def check_author_link(email, author)
author_link = find('.commit-author-link') author_link = find('.commit-author-link')
expect(author_link['href']).to eq(user_path(author)) expect(author_link['href']).to eq(user_path(author))
expect(author_link['title']).to eq(email)
expect(find('.commit-author-name').text).to eq(author.name) expect(find('.commit-author-name').text).to eq(author.name)
end end