4 Commits

Author SHA1 Message Date
Dave Borowitz
8cdc76ba4c Add @license tags to PG HTML and JS assets
These tags are preserved by the Closure compiler and vulcanize in order
to serve the license notices embedded in the outputs. In a standalone
Gerrit server, these license are also covered in the LICENSES.txt served
with the documentation. When serving PG assets from a CDN, it's less
obvious what the corresponding LICENSES.txt file is, since the CDN is
not directly linked to a running Gerrit server. Safer to embed the
licenses in the assets themselves.

Change-Id: Id1add1451fad1baa7916882a6bda02c326ccc988
2018-03-26 10:47:55 -04:00
Wyatt Allen
acf90d192d Console log and reporting on invalid comment ranges
Change-Id: Ie1f0172cee1d7b4a2e78d5eb8c60745162f650f1
2017-03-16 17:31:31 -07:00
Wyatt Allen
5c5f00fb13 Refactors annotation layer
Formerly, the annotation layer interface provided the GrAnnotation
library as a parameter to the `annotate` method. This was so the layer
would not necessarily need to import the library at the module level
and instead could use it as a utility toolbox.

With this change, the library is no-longer part of the interface and the
layers are now expected to import it at the module layer (if they have
a use for it).

Change-Id: I49b96c67ec724708c2861ab6be3ce27a53cc1b05
2016-07-25 22:47:01 -07:00
Wyatt Allen
2f6d5450e5 Define two annotation layers
Adds a function to create an annotation layer for intraline differences
in gr-diff-builder (as a vanilla object) and introduces an annotation
layer for ranged comment highlights (as a Polymer element).

The interface for annotation layers may become more formalized later,
but at this stage, an annotation layer needs to be an object with the
following two methods.

* `annotate : Function<HTMLElement, GrDiffLine, GrAnnotation>`
* `addListener : Function<Function<Number, Number, String>>`

The `annotate` method applies that layer's annotations to the provided
DIV.contentText element and line object. The annotation library is
provided for convenience. The `addListener` method registers a listener
for when an annotation layer says that a range of lines needs to be
updated.

As of this change, the builder is not yet making use of these new
layers, leaving functionality as-is.

Change-Id: I1083aaeb7e1d6eeff46687fa5cf7b52bc6bb834d
2016-07-19 15:28:40 -07:00