Merge "Add a proper message for no threads in findings tab."
This commit is contained in:
@@ -637,6 +637,7 @@ limitations under the License.
|
|||||||
threads="[[_commentThreads]]"
|
threads="[[_commentThreads]]"
|
||||||
change="[[_change]]"
|
change="[[_change]]"
|
||||||
change-num="[[_changeNum]]"
|
change-num="[[_changeNum]]"
|
||||||
|
comment-tab="[[_currentView]]"
|
||||||
logged-in="[[_loggedIn]]"
|
logged-in="[[_loggedIn]]"
|
||||||
only-show-robot-comments-with-human-reply
|
only-show-robot-comments-with-human-reply
|
||||||
on-thread-list-modified="_handleReloadDiffComments"></gr-thread-list>
|
on-thread-list-modified="_handleReloadDiffComments"></gr-thread-list>
|
||||||
@@ -654,6 +655,7 @@ limitations under the License.
|
|||||||
change="[[_change]]"
|
change="[[_change]]"
|
||||||
change-num="[[_changeNum]]"
|
change-num="[[_changeNum]]"
|
||||||
logged-in="[[_loggedIn]]"
|
logged-in="[[_loggedIn]]"
|
||||||
|
comment-tab="[[_currentView]]"
|
||||||
hide-toggle-buttons
|
hide-toggle-buttons
|
||||||
on-thread-list-modified="_handleReloadDiffComments"></gr-thread-list>
|
on-thread-list-modified="_handleReloadDiffComments"></gr-thread-list>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ limitations under the License.
|
|||||||
</template>
|
</template>
|
||||||
<div id="threads">
|
<div id="threads">
|
||||||
<template is="dom-if" if="[[!threads.length]]">
|
<template is="dom-if" if="[[!threads.length]]">
|
||||||
There are no inline comment threads on any diff for this change.
|
[[_computeNoThreadsMessage(commentTab)]]
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
is="dom-repeat"
|
is="dom-repeat"
|
||||||
|
|||||||
@@ -23,6 +23,17 @@
|
|||||||
* @event thread-list-modified
|
* @event thread-list-modified
|
||||||
* @extends Polymer.Element
|
* @extends Polymer.Element
|
||||||
*/
|
*/
|
||||||
|
const NO_THREADS_MESSAGE = 'There are no inline comment threads on any diff '
|
||||||
|
+ 'for this change.';
|
||||||
|
const NO_ROBOT_COMMENTS_THREADS_MESSAGE = 'There are no findings for this ' +
|
||||||
|
'patchset.';
|
||||||
|
|
||||||
|
const CommentTabs = {
|
||||||
|
CHANGE_LOG: 0,
|
||||||
|
COMMENT_THREADS: 1,
|
||||||
|
ROBOT_COMMENTS: 2,
|
||||||
|
};
|
||||||
|
|
||||||
class GrThreadList extends Polymer.GestureEventListeners(
|
class GrThreadList extends Polymer.GestureEventListeners(
|
||||||
Polymer.LegacyElementMixin(
|
Polymer.LegacyElementMixin(
|
||||||
Polymer.Element)) {
|
Polymer.Element)) {
|
||||||
@@ -62,6 +73,7 @@
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
value: false,
|
value: false,
|
||||||
},
|
},
|
||||||
|
commentTab: Number,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,6 +83,13 @@
|
|||||||
return loggedIn ? 'show' : '';
|
return loggedIn ? 'show' : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_computeNoThreadsMessage(commentTab) {
|
||||||
|
if (commentTab === CommentTabs.ROBOT_COMMENTS) {
|
||||||
|
return NO_ROBOT_COMMENTS_THREADS_MESSAGE;
|
||||||
|
}
|
||||||
|
return NO_THREADS_MESSAGE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order as follows:
|
* Order as follows:
|
||||||
* - Unresolved threads with drafts (reverse chronological)
|
* - Unresolved threads with drafts (reverse chronological)
|
||||||
|
|||||||
Reference in New Issue
Block a user