commit | 63506828a3cd79509256482c45e82c10a86d782d | [log] [tgz] |
---|---|---|
author | Ben Rohlfs <brohlfs@google.com> | Thu Nov 03 11:17:26 2022 +0100 |
committer | Ben Rohlfs <brohlfs@google.com> | Mon Nov 07 13:38:29 2022 +0100 |
tree | 228bb4426358c95207fc6297564382b141499d3c | |
parent | f7f040e78c80180b77434108d49cfce7839d0432 [diff] |
Fix diff layers for lit based rendering The diff layer API allows layers to manipulate the DOM directly, and this API is hard to change. So at least for now we have to maintain this API also for the new lit based rendering. Direct DOM manipulation does not work well with the Lit controlled DOM rendering, which is written and optimized for a rendering process without external manipulation. So what we are doing is that we initiate the diff layer manipulations for each diff row in `updated()`. And once the layer annotations are complete, we mark the component as "dirty" using a new `layersApplied` field. When a diff row is being re-rendered we have to ensure that all parts of the DOM are removed and re-constructed, if some layer may have touched them. The easiest way to do that is to remove those DOM parts in one rendering pass and then initiate another rendering pass to bring them back. Btw, `gr-app-element` is doing something similar with its `invalidateChangeViewCache` field. Unfortunately layers can theoretically affect the content cells and the line number cells. In reality only the coverage layer affects the line number cells, and there is no good reason for this being a diff layer at all. Otherwise we could have moved this logic of remove+re-construct into `gr-diff-text`. That would have a been a bit simpler. Release-Notes: skip Change-Id: I5280d843fe72ae096a12c1e081e213f8bdb7343f
Gerrit is a code review and project management tool for Git based projects.
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.
For information about how to install and use Gerrit, refer to the documentation.
Our canonical Git repository is located on googlesource.com. There is a mirror of the repository on Github.
Please report bugs on the issue tracker.
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.
The Developer Mailing list is repo-discuss on Google Groups.
Gerrit is provided under the Apache License 2.0.
Install Bazel and run the following:
git clone --recurse-submodules https://gerrit.googlesource.com/gerrit cd gerrit && bazel build release
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>]
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.