diff options
author | Phil Hughes <me@iamphill.com> | 2017-07-25 11:05:45 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-07-25 11:05:45 +0300 |
commit | 1897aafdf8bada00f171e38558444265ccbadbaa (patch) | |
tree | a6e4c1fc1930a38e44f5f50c42ca43268418df3b | |
parent | d964816b9fe56679ffc0b331e701f7b24db5c6a9 (diff) | |
parent | 3951eb62705046fb2de6c836a82c1cad043d3036 (diff) |
Merge branch '35163-url-in-commit-message-can-be-broken-in-blame' into 'master'
Use only CSS to truncate commit message in blame
Closes #35163
See merge request !12900
-rw-r--r-- | app/assets/stylesheets/framework/files.scss | 10 | ||||
-rw-r--r-- | app/views/projects/blame/show.html.haml | 4 | ||||
-rw-r--r-- | changelogs/unreleased/35163-url-in-commit-message-can-be-broken-in-blame.yml | 4 |
3 files changed, 16 insertions, 2 deletions
diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss index c7c2684d548..8ad082f7a65 100644 --- a/app/assets/stylesheets/framework/files.scss +++ b/app/assets/stylesheets/framework/files.scss @@ -163,8 +163,18 @@ td.blame-commit { padding: 5px 10px; min-width: 400px; + max-width: 400px; background: $gray-light; border-left: 3px solid; + + .commit-row-title { + display: flex; + } + + .item-title { + flex: 1; + margin-right: 0.5em; + } } @for $i from 0 through 5 { diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index f11afe8fc22..c7359d873d9 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -21,8 +21,8 @@ .commit = author_avatar(commit, size: 36) .commit-row-title - %strong - = link_to_gfm truncate(commit.title, length: 35), project_commit_path(@project, commit.id), class: "cdark" + %span.item-title.str-truncated-100 + = link_to_gfm commit.title, project_commit_path(@project, commit.id), class: "cdark", title: commit.title .pull-right = link_to commit.short_id, project_commit_path(@project, commit), class: "commit-sha" diff --git a/changelogs/unreleased/35163-url-in-commit-message-can-be-broken-in-blame.yml b/changelogs/unreleased/35163-url-in-commit-message-can-be-broken-in-blame.yml new file mode 100644 index 00000000000..4fd60a79782 --- /dev/null +++ b/changelogs/unreleased/35163-url-in-commit-message-can-be-broken-in-blame.yml @@ -0,0 +1,4 @@ +--- +title: Use only CSS to truncate commit message in blame +merge_request: 12900 +author: Takuya Noguchi |