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