Initial pass for tooltip changes
Makes changes for truncation and combines the two related CSS classes. Applies new tooltip comp as close as possible to the span for testing.
This commit is contained in:
parent
b1ab2cfd10
commit
3e949356db
5 changed files with 13 additions and 34 deletions
|
@ -57,6 +57,9 @@ export default {
|
|||
},
|
||||
},
|
||||
computed: {
|
||||
boundary() {
|
||||
return this.dropdownLength === 1 ? 'viewport' : 'scrollParent';
|
||||
},
|
||||
status() {
|
||||
return this.job && this.job.status ? this.job.status : {};
|
||||
},
|
||||
|
@ -104,7 +107,7 @@ export default {
|
|||
<div class="ci-job-component">
|
||||
<gl-link
|
||||
v-if="status.has_details"
|
||||
v-gl-tooltip
|
||||
v-gl-tooltip="{ boundary, placement: 'bottom' }"
|
||||
:href="status.details_path"
|
||||
:title="tooltipText"
|
||||
:class="cssClassJobName"
|
||||
|
@ -115,7 +118,7 @@ export default {
|
|||
|
||||
<div
|
||||
v-else
|
||||
v-gl-tooltip
|
||||
v-gl-tooltip="{ boundary, placement: 'bottom' }"
|
||||
:title="tooltipText"
|
||||
:class="cssClassJobName"
|
||||
class="js-job-component-tooltip non-details-job-component"
|
||||
|
|
|
@ -27,7 +27,8 @@ export default {
|
|||
<template>
|
||||
<span class="ci-job-name-component">
|
||||
<ci-icon :status="status" />
|
||||
|
||||
<span class="ci-status-text"> {{ name }} </span>
|
||||
<span class="ci-status-text text-truncate mw-70p gl-pl-1 d-inline-block align-bottom">
|
||||
{{ name }}
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
|
|
|
@ -428,6 +428,7 @@ img.emoji {
|
|||
|
||||
.mw-460 { max-width: 460px; }
|
||||
.mw-6em { max-width: 6em; }
|
||||
.mw-70p { max-width: 70%; }
|
||||
|
||||
.min-height-0 { min-height: 0; }
|
||||
|
||||
|
|
|
@ -712,15 +712,9 @@
|
|||
top: 8px;
|
||||
}
|
||||
|
||||
.ci-build-text,
|
||||
.ci-status-text {
|
||||
max-width: 110px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: bottom;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
font-weight: $gl-font-weight-normal;
|
||||
font-weight: 200;
|
||||
}
|
||||
|
||||
@mixin mini-pipeline-graph-color(
|
||||
|
@ -912,26 +906,6 @@ button.mini-pipeline-graph-dropdown-toggle {
|
|||
flex: 1;
|
||||
}
|
||||
|
||||
// build name
|
||||
.ci-build-text,
|
||||
.ci-status-text {
|
||||
font-weight: 200;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 70%;
|
||||
margin-left: 2px;
|
||||
display: inline-block;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
display: block;
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(xs) {
|
||||
max-width: 60%;
|
||||
}
|
||||
}
|
||||
|
||||
.ci-status-icon {
|
||||
@extend .append-right-8;
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
- if status.has_details?
|
||||
= link_to status.details_path, class: 'mini-pipeline-graph-dropdown-item', data: { toggle: 'tooltip', title: tooltip, container: 'body' } do
|
||||
%span{ class: klass }= sprite_icon(status.icon)
|
||||
%span.ci-build-text= subject.name
|
||||
%span.ci-build-text.text-truncate.mw-70p.gl-pl-1= subject.name
|
||||
|
||||
- else
|
||||
.menu-item.mini-pipeline-graph-dropdown-item{ data: { toggle: 'tooltip', title: tooltip, container: 'body' } }
|
||||
%span{ class: klass }= sprite_icon(status.icon)
|
||||
%span.ci-build-text= subject.name
|
||||
%span.ci-build-text.text-truncate.mw-70p.gl-pl-1= subject.name
|
||||
|
||||
- if status.has_action?
|
||||
= link_to status.action_path, class: "ci-action-icon-container ci-action-icon-wrapper js-ci-action-icon", method: status.action_method, data: { toggle: 'tooltip', title: status.action_title, container: 'body' } do
|
||||
|
|
Loading…
Reference in a new issue