As per UX instructions, adds a border between the images and replaces
the image outline with a box shadow.
Change-Id: Iec157ce7e346cab217a49d6fcee5977c1702478c
Puts the plugin endpoint in a <td> with a colspan that allows the other
columns (e.g. line number col) to be sized independently. Also renames
the endpoint from 'imageDiff' to 'image-diff' in keeping with the
pattern set by other plugin endpoints.
Change-Id: If11066e7694d0459b3257b42abe308685975bf9b
Adds a <gr-endpoint-decorator> in an image diff. The existing
side-by-side image diff format will remain (at least for now), and the
diff of the images will be shown centered between and below them. This
is done to not disrupt the existing table formatting.
Change-Id: Id6453ea1ee2897393b5acdb6f0cd2168892d33ab
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
The present symbol is "n-ary times operator" (U+2A09), from
the supplemental mathematical operators block, which renders
a much larger glyph than typical for basic multiplication.
This change replaces it with "multiplication sign" (U+00D7),
from the Latin-1 supplement block. It is the symbol ordinarily
used for multiplication (including dimensions), and is also
likely present in more fonts.
Change-Id: Id0e168bc61e25924e6b651587dc6b19a06c185f7
Formerly, if a formatted text component tried to render without the
project config (used by inner linked text components) it would
temporarily fall-back to rendering the unformatted (and un-linkified)
text via `.textContent` -- mirroring the behavior of gr-linked-text.
The result is formatted text elements (when rendered without a project
config) appear as one long line of text. Unlike linkification, however,
text can be accurately formatted with or without the project config --
so this disruptive, poor UX is unnecessary.
The formatted text component is updated to format text when the project
config has not provided, and to re-render when the config has been
provided.
In order to propagate project config loads to the formatted text
components hosted by diff comments, the REST calls must be made by the
diff thread component. To make this call, the thread must have the
project's name, so gr-diff-builder is updated to provide this name to
thread components.
Bug: Issue 6686
Change-Id: I8d09c740930500e99cb5f87b92f4d72f3f50a9ce
Runtime errors occurred when image diffs showed added or removed images
(as opposed to modified images). With this change, test cases are added
to encode behavior against future regressions, and diff builder logic is
updated to avoid the error.
Bug: Issue 5995
Change-Id: If04220256074dac245b971e6229f0dae4a175689
Previously there were times when binary data from an image diff would
display. This change adds a check in the diff processor for image diffs
and does not display anything other than the file line in that case.
This change also addresses an issue where the label is calculated too
soon. The image size (if it exists) is supposed to be included as part
of the label, but often this was calculated before the image was done
rendering, so it didn't display.
Bug: Issue 5887
Change-Id: I9cd1ad0c3f2603492d7d84892147bd6852bbae29
Apply diff annotations (intraline differences and comment ranges) by
executing the annotation layers in order to each line. The diff builder
maintains an ordered array of annotation layers which are communicated
to GrDiffBuilder subclass instances. The builder also listens to each
layer for notifications that annotations have changed for some line
range and re-renders (i.e. re-applies the pipeline on DIV.contentText
elements) accordingly.
Change-Id: Iea0599d4869cafaadc0974158153a91d927913e8
Moves the diff-processing functionality of the gr-diff-builder component
into a new gr-diff-processor component which exposes a promise-based
interface. This is step one of creating an asynchronous (non-blocking)
diff rendering system.
As much as possible, this change is a transfer of code (with tests) from
one component to another, making it easier to verify that functionality
has not changed. Cleanup of the code, and refactoring it into a
more-testable form will come with later changes.
Feature: Issue 3916
Change-Id: I875b03b20bf953b128cbe3c5001ba1f8eba12c61
A number of classes used in PolyGerrit are defined in vanilla JS files
that are included multiple times by various elements. For example,
gr-diff-line.js is included by the gr-diff-builder and by gr-diff
elements. Adds #ifndef-style guards to each of these libraries to
prevent redefinition and avoid different elements potentially referring
to different versions of the same class.
Change-Id: I45e3ba425a59989b328475b1fe58fd9f350c8ae0
This reverts commit 56689af0f92ce13f90ff9369544c5f9cc0412f09.
Reason for revert: This change broke adding draft comments in the diff
view.
Change-Id: Icfbd3eb4e24cce3e1690e7eaf12e14e5705c7e3e