
Uses slotting to pass the created comment thread elements to gr-diff. In the initial rendering phase, the thread elements are redistributed to the gr-diff-builder, who filters and attaches them as before. After that, added comments are listened for by gr-diff, and attached to the appropriate thread group. With this change, gr-diff and descendants no longer depend on gr-diff-comment-thread and decendants. However, they still depend on the specifics of the Gerrit comment model (for computing lines of interest and for the ranged comment layer), which is a dependency we will cut next. Change-Id: Ifdb5da86d6bf6160efba9bc59dd347b1c5e55e85
40 lines
1.2 KiB
HTML
40 lines
1.2 KiB
HTML
<!--
|
|
@license
|
|
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="../gr-diff-comment-thread/gr-diff-comment-thread.html">
|
|
<link rel="import" href="../../../styles/shared-styles.html">
|
|
|
|
<dom-module id="gr-diff-comment-thread-group">
|
|
<template>
|
|
<style include="shared-styles">
|
|
:host {
|
|
display: block;
|
|
max-width: var(--content-width, 80ch);
|
|
white-space: normal;
|
|
}
|
|
div ::slotted(*) + div ::slotted(*) {
|
|
margin-top: .2em;
|
|
}
|
|
</style>
|
|
<div>
|
|
<slot class="comment-thread"></slot>
|
|
</div>
|
|
</template>
|
|
<script src="gr-diff-comment-thread-group.js"></script>
|
|
</dom-module>
|