Use placeholder in change list size col
Specifically. uses the placeholder for unknown sizes in the change list. Bug: Issue 8467 Change-Id: I6d1ae5c3f5eaa18906832a380313ed577ff87262
This commit is contained in:
		@@ -210,7 +210,12 @@ limitations under the License.
 | 
			
		||||
      <gr-tooltip-content
 | 
			
		||||
          has-tooltip
 | 
			
		||||
          title="[[_computeSizeTooltip(change)]]">
 | 
			
		||||
        <span>[[_computeChangeSize(change)]]</span>
 | 
			
		||||
        <template is="dom-if" if="[[_changeSize]]">
 | 
			
		||||
            <span>[[_changeSize]]</span>
 | 
			
		||||
        </template>
 | 
			
		||||
        <template is="dom-if" if="[[!_changeSize]]">
 | 
			
		||||
            <span class="placeholder">--</span>
 | 
			
		||||
        </template>
 | 
			
		||||
      </gr-tooltip-content>
 | 
			
		||||
    </td>
 | 
			
		||||
    <template is="dom-repeat" items="[[labelNames]]" as="labelName">
 | 
			
		||||
 
 | 
			
		||||
@@ -45,6 +45,10 @@
 | 
			
		||||
        value: false,
 | 
			
		||||
      },
 | 
			
		||||
      showNumber: Boolean,
 | 
			
		||||
      _changeSize: {
 | 
			
		||||
        type: String,
 | 
			
		||||
        computed: '_computeChangeSize(change)',
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    behaviors: [
 | 
			
		||||
@@ -153,7 +157,7 @@
 | 
			
		||||
    _computeChangeSize(change) {
 | 
			
		||||
      const delta = change.insertions + change.deletions;
 | 
			
		||||
      if (isNaN(delta) || delta === 0) {
 | 
			
		||||
        return '🤷'; // Unknown
 | 
			
		||||
        return null; // Unknown
 | 
			
		||||
      }
 | 
			
		||||
      if (delta < CHANGE_SIZE.XS) {
 | 
			
		||||
        return 'XS';
 | 
			
		||||
 
 | 
			
		||||
@@ -226,7 +226,7 @@ limitations under the License.
 | 
			
		||||
      assert.equal(element._computeChangeSize({
 | 
			
		||||
        insertions: 'foo',
 | 
			
		||||
        deletions: 'bar',
 | 
			
		||||
      }), '🤷');
 | 
			
		||||
      }), null);
 | 
			
		||||
      assert.equal(element._computeChangeSize({
 | 
			
		||||
        insertions: 1,
 | 
			
		||||
        deletions: 1,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user