Create a robot-comment-controls plugin endpoint

This is needed to add "Not important" link by a plugin.

Change-Id: Id8ef0a372e7111c12631cf41aafce9ac6a33e7f0
This commit is contained in:
Viktar Donich
2017-12-06 13:59:46 -08:00
parent 9f881fe41a
commit 3a12ebf262
2 changed files with 27 additions and 8 deletions

View File

@@ -36,9 +36,10 @@ components.
The following endpoints are available to plugins.
=== change-view-integration
This extension point is located between `Files` and `Messages` section on the
change view page, and it may take full page's width. Primary purpose is to
enable plugins to display custom CI-related information (build status, etc).
The `change-view-integration` extension point is located between `Files` and
`Messages` section on the change view page, and it may take full page's
width. Primary purpose is to enable plugins to display custom CI-related
information (build status, etc).
* `change`
+
@@ -51,9 +52,9 @@ current revision displayed, an instance of
link:rest-api-changes.html#revision-info[RevisionInfo]
=== change-metadata-item
The change-metadata-item extension point is located on the bottom of the change
view left panel, under the `Label Status` and `Links` sections. Its width is
equal to the left panel's, and its primary purpose is to allow plugins to add
The `change-metadata-item` extension point is located on the bottom of the
change view left panel, under the `Label Status` and `Links` sections. Its width
is equal to the left panel's, and its primary purpose is to allow plugins to add
sections of metadata to the left panel.
In addition to default parameters, the following are available:
@@ -67,3 +68,15 @@ link:rest-api-changes.html#change-info[ChangeInfo]
+
current revision displayed, an instance of
link:rest-api-changes.html#revision-info[RevisionInfo]
=== robot-comment-controls
The `robot-comment-controls` extension point is located inside each comment
rendered on the diff page, and is only visible when the comment is a robot
comment, specifically if the comment has a `robot_id` property.
In addition to default parameters, the following are available:
* `comment`
+
current comment displayed, an instance of
link:rest-api-changes.html#comment-info[CommentInfo]

View File

@@ -17,7 +17,9 @@ limitations under the License.
<link rel="import" href="../../../bower_components/polymer/polymer.html">
<link rel="import" href="../../../behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior.html">
<link rel="import" href="../../../bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html">
<link rel="import" href="../../shared/gr-textarea/gr-textarea.html">
<link rel="import" href="../../../styles/shared-styles.html">
<link rel="import" href="../../plugins/gr-endpoint-decorator/gr-endpoint-decorator.html">
<link rel="import" href="../../plugins/gr-endpoint-param/gr-endpoint-param.html">
<link rel="import" href="../../shared/gr-button/gr-button.html">
<link rel="import" href="../../shared/gr-confirm-dialog/gr-confirm-dialog.html">
<link rel="import" href="../../shared/gr-date-formatter/gr-date-formatter.html">
@@ -25,9 +27,9 @@ limitations under the License.
<link rel="import" href="../../shared/gr-overlay/gr-overlay.html">
<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">
<link rel="import" href="../../shared/gr-storage/gr-storage.html">
<link rel="import" href="../../shared/gr-textarea/gr-textarea.html">
<link rel="import" href="../../shared/gr-tooltip-content/gr-tooltip-content.html">
<link rel="import" href="../gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog.html">
<link rel="import" href="../../../styles/shared-styles.html">
<script src="../../../scripts/rootElement.js"></script>
@@ -307,6 +309,10 @@ limitations under the License.
</div>
</div>
<div class="actions robotActions" hidden$="[[!_showRobotActions]]">
<gr-endpoint-decorator name="robot-comments-controls">
<gr-endpoint-param name="comment" value="[[comment]]">
</gr-endpoint-param>
</gr-endpoint-decorator>
<gr-button link class="action fix"
on-tap="_handleFix"
disabled="[[robotButtonDisabled]]">