Commit 498285d5 authored by Constance Okoghenun's avatar Constance Okoghenun

Restyled issues related merge request title

From the MD breakpoint up, the title should be truncated.
From MD breakpoint down, it should wrap as normal.
parent b4e7efc0
...@@ -194,12 +194,20 @@ $item-weight-max-width: 48px; ...@@ -194,12 +194,20 @@ $item-weight-max-width: 48px;
} }
} }
.mr-status-wrapper {
line-height: 0;
}
@include media-breakpoint-up(sm) { @include media-breakpoint-up(sm) {
.item-body { .item-body {
.item-contents .item-title .sortable-link { .item-contents .item-title
.item-contents .item-title {
.mr-title-link,
.sortable-link {
max-width: 90%; max-width: 90%;
} }
} }
}
} }
/* Small devices (landscape phones, 768px and up) */ /* Small devices (landscape phones, 768px and up) */
...@@ -216,6 +224,7 @@ $item-weight-max-width: 48px; ...@@ -216,6 +224,7 @@ $item-weight-max-width: 48px;
width: 95%; width: 95%;
margin-bottom: $gl-padding-4; margin-bottom: $gl-padding-4;
.mr-title-link,
.sortable-link { .sortable-link {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
...@@ -292,6 +301,7 @@ $item-weight-max-width: 48px; ...@@ -292,6 +301,7 @@ $item-weight-max-width: 48px;
flex-basis: unset; flex-basis: unset;
font-weight: $gl-font-weight-normal; font-weight: $gl-font-weight-normal;
.mr-title-link,
.sortable-link { .sortable-link {
display: block; display: block;
text-overflow: ellipsis; text-overflow: ellipsis;
......
...@@ -17,14 +17,14 @@ ...@@ -17,14 +17,14 @@
.item-contents .item-contents
.item-title.d-flex.align-items-center.mr-title .item-title.d-flex.align-items-center.mr-title
= render partial: 'projects/issues/merge_requests_status', locals: { merge_request: merge_request, css_class: 'd-none d-lg-block append-right-8' } = render partial: 'projects/issues/merge_requests_status', locals: { merge_request: merge_request, css_class: 'd-none d-lg-block append-right-8' }
= link_to merge_request.title, merge_request_path(merge_request) = link_to merge_request.title, merge_request_path(merge_request), { class: 'mr-title-link'}
.item-meta .item-meta
= render partial: 'projects/issues/merge_requests_status', locals: { merge_request: merge_request, css_class: 'd-lg-none d-md-block append-right-5' } = render partial: 'projects/issues/merge_requests_status', locals: { merge_request: merge_request, css_class: 'd-lg-none d-md-block append-right-5' }
%span.d-flex.align-items-center.append-right-8.mr-item-path.item-path-id.mt-0 %span.d-flex.align-items-center.append-right-8.mr-item-path.item-path-id.mt-0
%span.path-id-text.bold.text-truncate{ data: { toggle: 'tooltip'}, title: merge_request.target_project.full_name } %span.path-id-text.bold.text-truncate{ data: { toggle: 'tooltip'}, title: merge_request.target_project.full_name }
= merge_request.target_project.full_name = merge_request.target_project.full_name
= merge_request.to_reference = merge_request.to_reference
%span.merge-request-ci-status.flex-md-grow-1.justify-content-end.d-flex %span.merge-request-ci-status.flex-md-grow-1.justify-content-end.d-flex.ml-md-2
- if merge_request.head_pipeline - if merge_request.head_pipeline
= render_pipeline_status(merge_request.head_pipeline, tooltip_placement: 'bottom') = render_pipeline_status(merge_request.head_pipeline, tooltip_placement: 'bottom')
- elsif has_any_head_pipeline - elsif has_any_head_pipeline
......
...@@ -18,5 +18,5 @@ ...@@ -18,5 +18,5 @@
- mr_status_tooltip = "<div class=\"mb-1\"><span class=\"bold\">#{mr_status_title}</span> #{time_ago_in_words(mr_status_date)} ago</div><span class=\"text-tertiary\">#{l(mr_status_date.to_time, format: time_format)}</span>" - mr_status_tooltip = "<div class=\"mb-1\"><span class=\"bold\">#{mr_status_title}</span> #{time_ago_in_words(mr_status_date)} ago</div><span class=\"text-tertiary\">#{l(mr_status_date.to_time, format: time_format)}</span>"
%span.suggestion-help-hover{ class: css_class, data: { toggle: 'tooltip', placement: 'bottom', html: 'true', title: mr_status_tooltip } } %span.mr-status-wrapper.suggestion-help-hover{ class: css_class, data: { toggle: 'tooltip', placement: 'bottom', html: 'true', title: mr_status_tooltip } }
= sprite_icon(mr_status_icon, size: 16, css_class: "merge-request-status #{mr_status_class}") = sprite_icon(mr_status_icon, size: 16, css_class: "merge-request-status #{mr_status_class}")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment