
Formerly, gr-diff would make its own REST calls for diff comments in the patch range and path being viewed. However, these calls by the diff view were redundant to the more general comment requests made by either gr-diff-view (which requests all comments to support skipping to the next file with comments) or gr-change-view (which requests comments individually for each inline diff). With this change, the diff component no longer loads comments for itself, but is rather provided the comments from its host view via a public property. In this way the host view can load the more-general comment data, and filter it down for the diff view's params. Introduces the gr-comment-api component to simplify loading and filtering diff comments for use by diff views. By using this new component: * The diff view makes only one request for comments (including drafts and robot comments) to support skipping to the next comment and displaying comments in the diff view. * The change view makes only one request for comments for all inline diffs. Bug: Issue 5299 Change-Id: Ia14a01619f1f9881aa0d253fd3f49af9a17f3dce
27 lines
1.0 KiB
HTML
27 lines
1.0 KiB
HTML
<!--
|
|
Copyright (C) 2017 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<link rel="import" href="../../../bower_components/polymer/polymer.html">
|
|
<link rel="import" href="../../../behaviors/gr-patch-set-behavior/gr-patch-set-behavior.html">
|
|
<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">
|
|
|
|
<dom-module id="gr-comment-api">
|
|
<template>
|
|
<gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
|
|
</template>
|
|
<script src="gr-comment-api.js"></script>
|
|
</dom-module>
|