Completely rewrite commenting components and data model

This XL change consists of many things. Firstly, it converts the three
central commenting components from PolymerElement to LitElement:
<gr-comment>, <gr-comment-thread>, <gr-thread-list>. As usual, that
also means that the components are partially listening to application
wide state through subscriptions instead of getting all the data from
their parents.

The comment threads are still passed down from parent components, but
it is expected that thread lists and thread objects are immutable and
always change as a whole. The advantage is that the components don't
have to watch sub-properties. And Lit handles component re-use and
change detection very well, so there is no performance issue and also
no problem of undesired user-visible re-rendering.

REST API calls around retrieving, modifying and discarding of comments
were moved strictly to the comments-service. The components don't make
backend calls themselves.

The data model was changed such that drafts are now cleanly split up
into DraftInfo for saved drafts and UnsavedInfo for unsaved drafts.
Saved drafts are managed by the comments service and model, and changes
to them are propagated throughout the app. Unsaved drafts are just local
UI state of the comment components.

Storing temporary unsaved comment information in localStorage is removed
in this change. The goal is to replace this by auto-saving comments, so
users can still not lose a substantial amount of data. Ideally auto-
saving will be implemented in a child change and submitted together.

Google-Bug-Id: b/206014286
Change-Id: Ia6d3324516ef5db32a7562852319b645a5bb0f6e
56 files changed
tree: 99425241ec8f36d542b49e921ec88bee9edfad14
  1. .settings/
  2. .ts-out/
  3. antlr3/
  4. contrib/
  5. Documentation/
  6. e2e-tests/
  7. java/
  8. javatests/
  9. lib/
  10. modules/
  11. plugins/
  12. polygerrit-ui/
  13. prolog/
  14. prologtests/
  15. proto/
  16. resources/
  17. tools/
  18. webapp/
  19. .bazelignore
  20. .bazelproject
  21. .bazelrc
  22. .bazelversion
  23. .editorconfig
  24. .git-blame-ignore-revs
  25. .gitignore
  26. .gitmodules
  27. .gitreview
  28. .mailmap
  29. .pydevproject
  30. .zuul.yaml
  31. BUILD
  32. COPYING
  33. INSTALL
  34. Jenkinsfile
  35. package.json
  36. README.md
  37. SUBMITTING_PATCHES
  38. version.bzl
  39. WORKSPACE
  40. yarn.lock
README.md

Gerrit Code Review

Gerrit is a code review and project management tool for Git based projects.

Build Status Maven Central

Objective

Gerrit makes reviews easier by showing changes in a side-by-side display, and allowing inline comments to be added by any reviewer.

Gerrit simplifies Git based project maintainership by permitting any authorized user to submit changes to the master Git repository, rather than requiring all approved changes to be merged in by hand by the project maintainer.

Documentation

For information about how to install and use Gerrit, refer to the documentation.

Source

Our canonical Git repository is located on googlesource.com. There is a mirror of the repository on Github.

Reporting bugs

Please report bugs on the issue tracker.

Contribute

Gerrit is the work of hundreds of contributors. We appreciate your help!

Please read the contribution guidelines.

Note that we do not accept Pull Requests via the Github mirror.

Getting in contact

The Developer Mailing list is repo-discuss on Google Groups.

License

Gerrit is provided under the Apache License 2.0.

Build

Install Bazel and run the following:

    git clone --recurse-submodules https://gerrit.googlesource.com/gerrit
    cd gerrit && bazel build release

Install binary packages (Deb/Rpm)

The instruction how to configure GerritForge/BinTray repositories is here

On Debian/Ubuntu run:

    apt-get update & apt-get install gerrit=<version>-<release>

NOTE: release is a counter that starts with 1 and indicates the number of packages that have been released with the same version of the software.

On CentOS/RedHat run:

    yum clean all && yum install gerrit-<version>[-<release>]

On Fedora run:

    dnf clean all && dnf install gerrit-<version>[-<release>]

Use pre-built Gerrit images on Docker

Docker images of Gerrit are available on DockerHub

To run a CentOS 8 based Gerrit image:

    docker run -p 8080:8080 gerritcodereview/gerrit[:version]-centos8

To run a Ubuntu 20.04 based Gerrit image:

    docker run -p 8080:8080 gerritcodereview/gerrit[:version]-ubuntu20

NOTE: release is optional. Last released package of the version is installed if the release number is omitted.