Only use the externally set needs-review attribute in change-list-item
This fixes issue 11085 where a lot of changes were bolded when using Polymer 2. I could not find a reason why gr-change-list-item should have an internal needsReview property and a _computeItemNeedsReview method. In Polymer 2 an undefined change.reviewed value would result in the needs-review attribute being added, even though gr-change-list may have set the attribute explicitly (and correctly!) from the outside. I have sent a question to the Polymer expert group about this, but I think the outcome of competing computes inside and outside is undefined at best. So the likely outcome is that we will just remove the internal compute. Bug: Issue 11085 Change-Id: I6d437562cb624e07454b8e32c0a051f8ef2ac182
This commit is contained in:
@@ -40,11 +40,6 @@
|
||||
type: String,
|
||||
computed: '_computeChangeURL(change)',
|
||||
},
|
||||
needsReview: {
|
||||
type: Boolean,
|
||||
reflectToAttribute: true,
|
||||
computed: '_computeItemNeedsReview(change.reviewed)',
|
||||
},
|
||||
statuses: {
|
||||
type: Array,
|
||||
computed: 'changeStatuses(change)',
|
||||
@@ -78,10 +73,6 @@
|
||||
});
|
||||
},
|
||||
|
||||
_computeItemNeedsReview(reviewed) {
|
||||
return !reviewed;
|
||||
},
|
||||
|
||||
_computeChangeURL(change) {
|
||||
return Gerrit.Nav.getUrlForChange(change);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user