commit | fad805ebf72d6ca5573d82ae47c60d401490a6d3 | [log] [tgz] |
---|---|---|
author | Ben Rohlfs <brohlfs@google.com> | Mon Apr 15 19:38:31 2024 +0200 |
committer | Ben Rohlfs <brohlfs@google.com> | Tue Apr 16 17:05:44 2024 +0200 |
tree | f0650496f4c30171f565008679d776838fc0f412 | |
parent | 0a902465dbe4b3b39ae3cbb7590e1c922f225a3d [diff] |
Fix comment widgets losing focus by stable sorting We have been hunting this bug for 6+ months: Mysteriously the comment textarea would sometimes lose focus. We had lots of users complaining, but the Gerrit team rarely ran into the problem and we did not have any way of reliably reproducing the issue. Today we did find a reproduction and could thus debug the issue: <gr-diff-host> uses the `repeat` directive to render comment thread elements. If the underlying array changes how the threads are sorted, then the directive has to remove a comment thread element and insert it somewhere else. This is not really user visible, but of course, removing the element for a split second does remove the focus. Thus the root cause is that the sorting of comment threads is not stable. We have to make sure that *for drafts* the `updated` timestamp is not considered for sorting. Otherwise every (auto-)save operation would potentially change the order of the comment thread arrays. For published comments it is fine to use the `updated` timestamp, because it won't change anymore. The sorting order actually does not matter at all (as far as we know). It must just be *stable*! Google-Bug-Id: b/299507066 Bug: Issue 295374158 Release-Notes: Fix comment widgets losing focus Change-Id: Ia7c0b11c83f2954f1e248da894158b60e0e310d6
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.