An enhanced image diff plugin for PolyGerrit.

Clone this repo:

Branches

  1. 25557a1 Remove usage of customStyle by Tao Zhou · 4 months ago master
  2. fc2484a Bazel: Automatically fix lint errors with buildifier by David Pursehouse · 8 months ago
  3. 61e00a9 Pass require() as an externs def to the JS compiler. by brohlfs · 9 months ago
  4. d439294 Fix the script import of resemblejs by brohlfs · 9 months ago
  5. f8160b2 Revert "Use "resemblejs" dep" by Ben Rohlfs · 9 months ago

Image Diff

A plugin that provides a rich image diffing experience in PolyGerrit. Currently, the plugin features two modes: Highlight Mode and Onion Skin.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Yarn - Node package manager

Installing

Use Homebrew to install yarn on macOS:

brew install yarn

Reference here for instruction on how to install on other systems.

Clone the repo and run

yarn install

to install the dependencies.

Highlight Mode

Highlight example

This mode uses the Resemble.JS (1.2.1) library in its development The following features are included in this mode:

  • Percentage of difference between the images
  • Ability to ignore color in the comparison
  • Ability to make the diff color more discernible
  • Change the diff color
  • View the diff in full screen

Onion Skin

Opacity example

Onion Skin mode is a great way for users to notice changes in the images that might be overlooked when you look at them side by side. By overlaying the new image on top of the old image, the users can change the opacity to see the transition that were made.

The following features are included in this mode:

  • Scale the new image to the same size as the old image
  • Changing the opacity of the top image

Testing

This plugin uses polymer-cli to test.

Inside your image-diff repo, run polymer serve to start a local web server and open localhost:8080/test to view your tests. See here for more info.

Development

Reference here on how to set up your Gerrit testsite and here for PolyGerrit plugin development.

Authors