From 3a12ebf262c7674b0ed96a666beeaa26c3d000d3 Mon Sep 17 00:00:00 2001 From: Viktar Donich Date: Wed, 6 Dec 2017 13:59:46 -0800 Subject: [PATCH] Create a `robot-comment-controls` plugin endpoint This is needed to add "Not important" link by a plugin. Change-Id: Id8ef0a372e7111c12631cf41aafce9ac6a33e7f0 --- Documentation/pg-plugin-endpoints.txt | 25 ++++++++++++++----- .../diff/gr-diff-comment/gr-diff-comment.html | 10 ++++++-- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/Documentation/pg-plugin-endpoints.txt b/Documentation/pg-plugin-endpoints.txt index 315ef203db..b838e873fd 100644 --- a/Documentation/pg-plugin-endpoints.txt +++ b/Documentation/pg-plugin-endpoints.txt @@ -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] diff --git a/polygerrit-ui/app/elements/diff/gr-diff-comment/gr-diff-comment.html b/polygerrit-ui/app/elements/diff/gr-diff-comment/gr-diff-comment.html index 0ea341d208..8087e2f335 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-comment/gr-diff-comment.html +++ b/polygerrit-ui/app/elements/diff/gr-diff-comment/gr-diff-comment.html @@ -17,7 +17,9 @@ limitations under the License. - + + + @@ -25,9 +27,9 @@ limitations under the License. + - @@ -307,6 +309,10 @@ limitations under the License.
+ + + +