Merge "Add placeholder to some change list fields"
This commit is contained in:
@@ -100,6 +100,9 @@ limitations under the License.
|
||||
.u-gray-background {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.placeholder {
|
||||
color: rgba(0, 0, 0, .87);
|
||||
}
|
||||
@media only screen and (max-width: 50em) {
|
||||
:host {
|
||||
display: flex;
|
||||
@@ -112,7 +115,7 @@ limitations under the License.
|
||||
<gr-change-star change="{{change}}"></gr-change-star>
|
||||
</td>
|
||||
<td class="cell number" hidden$="[[!showNumber]]" hidden>
|
||||
<a href$="[[changeURL]]"> [[change._number]]</a>
|
||||
<a href$="[[changeURL]]">[[change._number]]</a>
|
||||
</td>
|
||||
<td class="cell subject"
|
||||
hidden$="[[isColumnHidden('Subject', visibleChangeTableColumns)]]">
|
||||
@@ -130,7 +133,12 @@ limitations under the License.
|
||||
</td>
|
||||
<td class="cell status"
|
||||
hidden$="[[isColumnHidden('Status', visibleChangeTableColumns)]]">
|
||||
[[changeStatusString(change)]]
|
||||
<template is="dom-if" if="[[status]]">
|
||||
[[status]]
|
||||
</template>
|
||||
<template is="dom-if" if="[[!status]]">
|
||||
<span class="placeholder">--</span>
|
||||
</template>
|
||||
</td>
|
||||
<td class="cell owner"
|
||||
hidden$="[[isColumnHidden('Owner', visibleChangeTableColumns)]]">
|
||||
@@ -141,6 +149,9 @@ limitations under the License.
|
||||
<template is="dom-if" if="[[change.assignee]]">
|
||||
<gr-account-link account="[[change.assignee]]"></gr-account-link>
|
||||
</template>
|
||||
<template is="dom-if" if="[[!change.assignee]]">
|
||||
<span class="placeholder">--</span>
|
||||
</template>
|
||||
</td>
|
||||
<td class="cell project"
|
||||
hidden$="[[isColumnHidden('Project', visibleChangeTableColumns)]]">
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
type: String,
|
||||
computed: '_computeChangeURL(change)',
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
computed: 'changeStatusString(change)',
|
||||
},
|
||||
showStar: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
|
||||
@@ -188,7 +188,10 @@ limitations under the License.
|
||||
});
|
||||
|
||||
test('assignee only displayed if there is one', () => {
|
||||
element.change = {};
|
||||
flushAsynchronousOperations();
|
||||
assert.isNotOk(element.$$('.assignee gr-account-link'));
|
||||
assert.equal(element.$$('.assignee').textContent.trim(), '--');
|
||||
element.change = {
|
||||
assignee: {
|
||||
name: 'test',
|
||||
|
||||
Reference in New Issue
Block a user