blob: cb72519b899f4696fb33378508cc9eae3f3ee979 [file] [log] [blame]
Edwin Kempin4fd84c92014-04-30 13:23:15 +02001= Review UI
2
3Reviewing changes is an important task and the Gerrit Web UI provides
4many functionalities to make the review process comfortable and
5efficient. This is a guide through the review UI that explains the
6different functions and UI elements.
7
8[[change-screen]]
9== Change Screen
10
11The change screen shows the details of a single change and provides
12various actions on it.
13
14image::images/user-review-ui-change-screen.png[width=800, link="images/user-review-ui-change-screen.png"]
15
16[[commit-message]]
17=== Commit Message Block
18
19The focus of the change screen is on the commit message since this is
20the most important information about a change. The numeric change ID
21and the change status are displayed right above the commit message.
22
23image::images/user-review-ui-change-screen-commit-message.png[width=800, link="images/user-review-ui-change-screen-commit-message.png"]
24
Edwin Kempinf9b4bc92014-11-05 13:14:57 +010025[[permalink]]
Edwin Kempin4fd84c92014-04-30 13:23:15 +020026The numeric change ID is a link to the change and clicking on it
27refreshes the change screen. By copying the link location you can get
28the permalink of the change.
29
30image::images/user-review-ui-change-screen-permalink.png[width=800, link="images/user-review-ui-change-screen-permalink.png"]
31
Edwin Kempinf9b4bc92014-11-05 13:14:57 +010032[[change-status]]
Edwin Kempin4fd84c92014-04-30 13:23:15 +020033The change status shows the state of the change:
34
Edwin Kempinf9b4bc92014-11-05 13:14:57 +010035- [[needs]]`Needs <label>`:
Edwin Kempin4fd84c92014-04-30 13:23:15 +020036+
37The change is in review and an approval on the shown label is still
38required to make the change submittable.
39
Edwin Kempinf9b4bc92014-11-05 13:14:57 +010040- [[not]]`Not <label>`:
Edwin Kempin4fd84c92014-04-30 13:23:15 +020041+
42The change is in review and a veto vote on the shown label is
43preventing the submit.
44
Edwin Kempinf9b4bc92014-11-05 13:14:57 +010045- [[not-current]]`Not Current`:
Edwin Kempin4fd84c92014-04-30 13:23:15 +020046+
47The currently viewed patch set is outdated.
48+
49Please note that some operations, like voting, are not available on
50outdated patch sets, but only on the current patch set.
51
Edwin Kempinf9b4bc92014-11-05 13:14:57 +010052- [[ready-to-submit]]`Ready to Submit`:
Edwin Kempin4fd84c92014-04-30 13:23:15 +020053+
54The change has all necessary approvals and may be submitted.
55
Edwin Kempinf9b4bc92014-11-05 13:14:57 +010056- [[merged]]`Merged`:
Edwin Kempin4fd84c92014-04-30 13:23:15 +020057+
58The change was successfully merged into the destination branch.
59
Edwin Kempinf9b4bc92014-11-05 13:14:57 +010060- [[abandoned]]`Abandoned`:
Edwin Kempin4fd84c92014-04-30 13:23:15 +020061+
62The change was abandoned.
63
Edwin Kempinf9b4bc92014-11-05 13:14:57 +010064- [[draft]]`Draft`:
Edwin Kempin4fd84c92014-04-30 13:23:15 +020065+
66The change is a draft that is only visible to the change owner, the
67reviewers that were explicitly added to the change, and users who have
68the link:access-control.html#category_view_drafts[View Drafts] global
69capability assigned.
70
71[[commit-info]]
72=== Commit Info Block
73
74The commit info block shows information about the commit of the
75currently viewed patch set.
76
77It displays the author and the committer as links to a list of this
78person's changes that have the same status as the currently viewed
79change.
80
Orgad Shaneh306ed3c2014-07-20 08:58:28 +030081The commit ID, the parent commit(s) and the link:user-changeid.html[Change-Id] are
Edwin Kempin4fd84c92014-04-30 13:23:15 +020082displayed with a copy-to-clipboard icon that allows the ID to be copied
83into the clipboard.
84
Dave Borowitza3d67882015-06-05 15:22:23 -070085If a Git web browser, such as gitweb or Gitiles, is configured, there
Edwin Kempin4fd84c92014-04-30 13:23:15 +020086is also a link to the commit in the Git web browser.
87
88image::images/user-review-ui-change-screen-commit-info.png[width=800, link="images/user-review-ui-change-screen-commit-info.png"]
89
Orgad Shaneh306ed3c2014-07-20 08:58:28 +030090If a merge commit is viewed this is highlighted by an icon.
Edwin Kempinb6c2a3b2014-05-14 10:37:17 +020091
92image::images/user-review-ui-change-screen-commit-info-merge-commit.png[width=800, link="images/user-review-ui-change-screen-commit-info-merge-commit.png"]
93
Edwin Kempinf1a84f92014-04-30 15:37:48 +020094[[change-info]]
95=== Change Info Block
96
97The change info block contains detailed information about the change
98and offers actions on the change.
99
100image::images/user-review-ui-change-screen-change-info.png[width=800, link="images/user-review-ui-change-screen-change-info.png"]
101
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100102- [[change-owner]]Change Owner:
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200103+
104The owner of the change is displayed as a link to a list of the owner's
105changes that have the same status as the currently viewed change.
106+
107image::images/user-review-ui-change-screen-change-info-owner.png[width=800, link="images/user-review-ui-change-screen-change-info-owner.png"]
108
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100109- [[reviewers]]Reviewers:
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200110+
111The reviewers of the change are displayed as chip tokens.
112+
113For each reviewer there is a tooltip that shows on which labels the
114reviewer is allowed to vote.
115+
116New reviewers can be added by clicking on the `Add...` button. Typing
117into the pop-up text field activates auto completion of user and group
118names.
119+
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100120[[remove-reviewer]]
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200121Reviewers can be removed from the change by clicking on the `x` icon
122in the reviewer's chip token. Removing a reviewer also removes the
123current votes of the reviewer. The removal of votes is recorded as a
124message on the change.
125+
126Removing reviewers is protected by permissions:
127
128** Users can always remove themselves.
129** The change owner may remove any zero or positive score.
130** Users with the link:access-control.html#category_remove_reviewer[
131 Remove Reviewer] access right, the branch owner, the project owner
132 and Gerrit administrators may remove anyone.
133
134+
135image::images/user-review-ui-change-screen-change-info-reviewers.png[width=800, link="images/user-review-ui-change-screen-change-info-reviewers.png"]
136
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100137- [[project-branch-topic]]Project / Branch / Topic:
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200138+
139The name of the project for which the change was done is displayed as a
140link to the link:user-dashboards.html#project-default-dashboard[default
141dashboard] of the project. If no default dashboard is defined, the link
142opens a list of open changes on the project.
143+
144Clicking on the settings icon on the right side navigates to the
145project administration screen.
146+
147The name of the destination branch is displayed as a link to a list
148with all changes on this branch that have the same status as the
149currently viewed change.
150+
151If a topic was assigned to the change it is displayed below the branch.
152By clicking on the edit icon the topic can be set. This requires the
153link:access-control.html#category_edit_topic_name[Edit Topic Name]
154access right. To be able to set a topic on a closed change, the
155`Edit Topic Name` must be assigned with the `force` flag.
156+
157image::images/user-review-ui-change-screen-change-info-project-branch-topic.png[width=800, link="images/user-review-ui-change-screen-change-info-project-branch-topic.png"]
158
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100159- [[submit-strategy]]Submit Strategy:
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200160+
161The link:project-setup.html#submit_type[submit strategy] that will be
162used to submit the change. The submit strategy is only displayed for
163open changes.
164+
165image::images/user-review-ui-change-screen-change-info-submit-strategy.png[width=800, link="images/user-review-ui-change-screen-change-info-submit-strategy.png"]
166+
167If a change cannot be merged due to path conflicts this is highlighted
168by a bold red `Cannot Merge` label.
169+
170image::images/user-review-ui-change-screen-change-info-cannot-merge.png[width=800, link="images/user-review-ui-change-screen-change-info-cannot-merge.png"]
171
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100172- [[update-time]]Time of Last Update:
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200173+
174image::images/user-review-ui-change-screen-change-info-last-update.png[width=800, link="images/user-review-ui-change-screen-change-info-last-update.png"]
175
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100176- [[actions]]Actions:
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200177+
178Depending on the change state and the permissions of the user, different
179actions are available on the change:
180
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100181** [[submit]]`Submit`:
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200182+
183Submits the change and adds it to the merge queue. If possible the
184change is merged into the destination branch.
185+
David Pursehouse53b1bd02014-05-09 11:18:08 +0900186The `Submit` button is available if the change is submittable and
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200187the link:access-control.html#category_submit[Submit] access right is
188assigned.
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200189
Andrew Bonventre4af9d8c2016-05-26 15:08:32 -0400190** [[revert]]`Revert`:
191+
192Reverts the change via creating a new one.
193+
194The `Revert` button is available if the change has been submitted.
195+
196When the `Revert` button is pressed, a panel will appear to allow
197the user to enter a commit message for the reverting change.
198+
199Once a revert change is created, the original author and any reviewers
200of the original change are added as reviewers and a message is posted
201to the original change linking to the revert.
202
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100203** [[abandon]]`Abandon`:
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200204+
205Abandons the change.
206+
207The `Abandon` button is only available if the change is open and the
208link:access-control.html#category_abandon[Abandon] access right is
209assigned.
210+
211When a change is abandoned, a panel appears that allows one to type a
212comment message to explain why the change is being abandoned.
213
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100214** [[restore]]`Restore`:
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200215+
216Restores the change.
217+
218The `Restore` button is only available if the change is abandoned and
219the link:access-control.html#category_abandon[Abandon] and the
220link:access-control.html#category_push[Push] access right is
221assigned.
222+
223When a change is restored, a panel appears that allows one to type a
224comment message to explain why the change is being restored.
225
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100226** [[rebase]]`Rebase`:
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200227+
228Rebases the change. The rebase is always done with content merge
229enabled. If the rebase is successful a new patch set with the rebased
230commit is created. If the rebase fails, there are conflicts that have
231to be resolved manually.
232+
233If the change does not depend on another open change, it is rebased
234onto the tip of the destination branch.
235+
236If the change depends on another open change, it is rebased onto the
237current patch set of that other change.
238+
Zalan Blenessy366d7852015-03-18 11:40:48 +0100239It is possible to change parent revision of a change. The new parent
240revision can be another change towards the same target branch, or
241the tip of the target branch.
242+
243The `Rebase` button is only available if
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200244the link:access-control.html#category_rebase[Rebase] access right is
245assigned. Rebasing merge commits is not supported.
246
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100247** [[cherry-pick]]`Cherry-Pick`:
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200248+
249Allows to cherry-pick the change to another branch. The destination
250branch can be selected from a dialog. Cherry-picking a change creates a
251new open change on the selected destination branch.
252+
253It is also possible to cherry-pick a change to the same branch. This is
254effectively the same as rebasing it to the current tip of the
255destination branch. This can be used to remove dependencies on other
256open changes.
257+
258Users can only cherry-pick changes to branches for which they are
259allowed to upload changes for review.
260
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100261** [[publish]]`Publish`:
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200262+
263Publishes the currently viewed draft patch set. If this is the first
264patch set of a change that is published, the change will be published
265as well.
266+
267The `Publish` button is only available if a draft patch set is viewed
268and the user is the change owner or has the
269link:access-control.html#category_publish_drafts[Publish Drafts] access
270right assigned.
271
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100272** [[delete]]`Delete Change` / `Delete Revision`:
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200273+
Alice Kober-Sotzek2f48a852017-02-10 14:00:29 +0100274Deletes the change / the currently viewed draft patch set.
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200275+
Paladox none580ae0e2017-02-12 18:15:48 +0000276For open or abandoned changes, the `Delete Change` button will be available
277and if the user is the change owner and is granted the
278link:access-control.html#category_delete_own_changes[Delete Own Changes]
279permission or if they are an administrator. For draft changes,
280the `Delete Change` / `Delete Revision` buttons will be available if the user is
281the change owner or has the
282link:access-control.html#category_delete_drafts[Delete Drafts] access right assigned.
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200283
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100284** [[plugin-actions]]Further actions may be available if plugins are installed.
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200285
286+
287image::images/user-review-ui-change-screen-change-info-actions.png[width=800, link="images/user-review-ui-change-screen-change-info-actions.png"]
288
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100289- [[labels]]Labels & Votes:
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200290+
291Approving votes are colored green; veto votes are colored red.
292+
293image::images/user-review-ui-change-screen-change-info-labels.png[width=800, link="images/user-review-ui-change-screen-change-info-labels.png"]
294
Edwin Kempinab777f12014-05-02 11:47:57 +0200295[[files]]
296=== File List
297
298The file list shows the files that are modified in the currently viewed
299patch set.
300
301image::images/user-review-ui-change-screen-file-list.png[width=800, link="images/user-review-ui-change-screen-file-list.png"]
302
Edwin Kempin8fd96b92016-12-05 16:39:03 +0100303[[magic-files]]
304In addition to the modified files the file list contains magic files
305that are generated by Gerrit and which don't exist in the repository.
306The magic files contain additional commit data that should be
307reviewable and allow users to comment on this data. The magic files are
308always listed first. The following magic files exist:
309
310* `Commit Message`:
311+
312The commit message and headers with the parent commit(s), the author
313information and the committer information.
314
315* `Merge List` (for merge commits only):
316+
317The list of commits that are being integrated into the destination
318branch by submitting the merge commit.
319
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100320[[change-screen-mark-reviewed]]
Edwin Kempinab777f12014-05-02 11:47:57 +0200321The checkboxes in front of the file names allow files to be marked as reviewed.
322
323image::images/user-review-ui-change-screen-file-list-mark-as-reviewed.png[width=800, link="images/user-review-ui-change-screen-file-list-mark-as-reviewed.png"]
324
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100325[[modification-type]]
Edwin Kempinab777f12014-05-02 11:47:57 +0200326The type of a file modification is indicated by the character in front
327of the file name:
328
329- 'no character' (Modified):
330+
331The file existed before this change and is modified.
332
333- `A` (Added):
334+
335The file is newly added.
336
337- `D` (Deleted):
338+
339The file is deleted.
340
341- `R` (Renamed):
342+
343The file is renamed.
344
345- `C` (Copied):
346+
347The file is new and is copied from an existing file.
348
349image::images/user-review-ui-change-screen-file-list-modification-type.png[width=800, link="images/user-review-ui-change-screen-file-list-modification-type.png"]
350
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100351[[rename-or-copy]]
Edwin Kempinab777f12014-05-02 11:47:57 +0200352If a file is renamed or copied, the name of the original file is
353displayed in gray below the file name.
354
355image::images/user-review-ui-change-screen-file-list-rename.png[width=800, link="images/user-review-ui-change-screen-file-list-rename.png"]
356
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100357[[repeating-path-segments]]
Edwin Kempinab777f12014-05-02 11:47:57 +0200358Repeating path segments are grayed out.
359
360image::images/user-review-ui-change-screen-file-list-repeating-paths.png[width=800, link="images/user-review-ui-change-screen-file-list-repeating-paths.png"]
361
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100362[[inline-comments-column]]
Edwin Kempinab777f12014-05-02 11:47:57 +0200363Inline comments on a file are shown in the `Comments` column.
364
365Draft comments, i.e. comments that have been written by the current
366user but not yet published, are highlighted in red.
367
368New comments from other users, that were published after the current
369user last reviewed this change, are highlighted in bold.
370
371image::images/user-review-ui-change-screen-file-list-comments.png[width=800, link="images/user-review-ui-change-screen-file-list-comments.png"]
372
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100373[[size]]
David Pursehouse8bd6f782015-01-30 11:06:38 +0900374The size of the modifications in the files can be seen in the `Size` column. The
375footer row shows the total size of the change.
Edwin Kempinab777f12014-05-02 11:47:57 +0200376
377The size information is useful to easily spot the files that contain
378the most modifications; these files are likely to be the most relevant
379files for this change. The total change size gives an estimate of how
380long a review of this change may take.
381
David Pursehouse8bd6f782015-01-30 11:06:38 +0900382When the "Show Change Sizes As Colored Bars" user preference is enabled, the
383`Size` column shows the sum of inserted and deleted lines as one number. In
384addition, the change size is shown as a bar. The size of the bar indicates the
385amount of changed lines, and its coloring shows the proportion of insertions
386(green) to deletions (red).
387
388When the "Show Change Sizes As Colored Bars" user preference is disabled, the
389colored bar is not shown. For added and renamed files, the `Size` column
390shows the number of inserted and deleted lines. For new files, the column only
391shows the total number of lines in the new file. No size is shown for binary
392files and deleted files.
393
Edwin Kempinab777f12014-05-02 11:47:57 +0200394image::images/user-review-ui-change-screen-file-list-size.png[width=800, link="images/user-review-ui-change-screen-file-list-size.png"]
395
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100396[[diff-against]]
Edwin Kempinab777f12014-05-02 11:47:57 +0200397In the header of the file list, the `Diff Against` selection can be
398changed. This selection allows one to choose if the currently viewed
399patch set should be compared against its base or against another patch
400set of this change. The file list is updated accordingly.
401
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100402[[open-all]]
Edwin Kempinab777f12014-05-02 11:47:57 +0200403The file list header also provides an `Open All` button that opens the
404diff views for all files in the file list.
405
406image::images/user-review-ui-change-screen-file-list-header.png[width=800, link="images/user-review-ui-change-screen-file-list-header.png"]
407
Edwin Kempinb2a8ae32014-05-02 15:03:22 +0200408[[patch-sets]]
409=== Patch Sets
410
411The change screen only presents one patch set at a time. Which patch
412set is currently viewed can be seen from the `Patch Sets` drop-down
413panel in the change header. It shows the number of the currently viewed
414patch set and the total number of patch sets, in the form: "current
415patch set/number of patch sets".
416
417If a non-current patch set is viewed this is indicated by the
418link:#not-current[Not Current] change state. Please note that some
419operations are only available on the current patch set.
420
421image::images/user-review-ui-change-screen-patch-sets.png[width=800, link="images/user-review-ui-change-screen-patch-sets.png"]
422
Orgad Shanehce43e0f2014-09-03 22:53:44 +0300423Another indication is a highlighted drop-down label.
424
425image::images/user-review-ui-change-screen-not-current.png[width=800, link="images/user-review-ui-change-screen-not-current.png"]
426
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100427[[patch-set-drop-down]]
Edwin Kempinb2a8ae32014-05-02 15:03:22 +0200428The patch set drop-down list shows the list of patch sets and allows to
429switch between them. The patch sets are sorted in descending order so
430that the current patch set is always on top.
431
Edwin Kempinb2a8ae32014-05-02 15:03:22 +0200432Draft patch sets are marked with `DRAFT`.
433
434image::images/user-review-ui-change-screen-patch-set-list.png[width=800, link="images/user-review-ui-change-screen-patch-set-list.png"]
435
Edwin Kempin0cb1ccb2014-05-05 13:22:03 +0200436[[download]]
437=== Download
438
439The `Download` drop-down panel in the change header offers commands and
440links for downloading the currently viewed patch set.
441
442image::images/user-review-ui-change-screen-download-commands.png[width=800, link="images/user-review-ui-change-screen-download-commands.png"]
443
444The available download commands depend on the installed Gerrit plugins.
445The most popular plugin for download commands, the
446link:https://gerrit-review.googlesource.com/#/admin/projects/plugins/download-commands[
447download-commands] plugin, provides commands to checkout, pull and
448cherry-pick a patch set.
449
450Each command has a copy-to-clipboard icon that allows the command to be
451copied into the clipboard. This makes it easy to paste and execute the
452command on a Git command line.
453
454If several download schemes are configured on the server (e.g. SSH and
455HTTP) there is a drop-down list to switch between the download schemes.
456Gerrit automatically remembers the download scheme that was last chosen
457and selects this download scheme the next time the download commands
458drop-down panel is opened.
459
460The `Patch-File` links provide the Git patch file for the currently
461viewed patch set for download. The patch file can be base64 encoded or
462zipped.
463
464The `Archive` links allow one to download an archive with the contents
465of the currently viewed patch set. The archive is offered in several
466formats (e.g. tar and tbz2); which formats are available depends on the
467configuration of the server.
468
469image::images/user-review-ui-change-screen-download-commands-list.png[width=800, link="images/user-review-ui-change-screen-download-commands-list.png"]
470
Edwin Kempin811bd582014-05-05 13:39:24 +0200471[[included-in]]
472=== Included In
473
474For merged changes the `Included In` drop-down panel is available in
475the change header.
476
477image::images/user-review-ui-change-screen-included-in.png[width=800, link="images/user-review-ui-change-screen-included-in.png"]
478
479The `Included In` drop-down panel shows the branches and tags in which
480the change is included. E.g. if a change fixes a bug, this allows to
481quickly see in which released versions the bug-fix is contained
482(assuming that every release is tagged).
483
484image::images/user-review-ui-change-screen-included-in-list.png[width=800, link="images/user-review-ui-change-screen-included-in-list.png"]
485
Edwin Kempin981cc952014-05-05 14:04:08 +0200486[[star]]
487=== Star Change
488
489The star icon in the change header allows to mark the change as a
490favorite. Clicking on the star icon again, unstars the change.
491
492image::images/user-review-ui-change-screen-star.png[width=800, link="images/user-review-ui-change-screen-star.png"]
493
494Starring a change turns on email notifications for this change.
495
496Starred changed are listed under `My` > `Starred Changes`.
497and can be queried by the link:user-search.html#is[is:starred] search
498operator.
499
Edwin Kempin8ab5b532014-05-05 17:10:31 +0200500[[related-changes]]
501=== Related Changes
502
503If there are changes that are related to the currently viewed change
504they are displayed in the third column of the change screen.
505
506There are several lists of related changes and a tab control is used to
507display each list of related changes in its own tab.
508
509The following tabs may be displayed:
510
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100511- [[related-changes-tab]]`Related Changes`:
Edwin Kempin8ab5b532014-05-05 17:10:31 +0200512+
513This tab page shows changes on which the current change depends
514(ancestors) and open changes that depend on the current change
515(descendants). For merge commits it also shows the closed changes that
516will be merged into the destination branch by submitting the merge
517commit.
518+
519The changes are sorted in the same way as the output of 'git log'. This
520means the relationship between the changes can be inferred from the
521position of the changes in the list. Changes listed above the current
522change are descendants; changes below the current change are ancestors.
523+
Edwin Kempin68cfe472014-05-12 15:10:25 +0200524For merged changes this tab is only shown if there are open
525descendants.
Edwin Kempin8ab5b532014-05-05 17:10:31 +0200526+
527image::images/user-review-ui-change-screen-related-changes.png[width=800, link="images/user-review-ui-change-screen-related-changes.png"]
528+
529Related changes may be decorated with an icon to signify dependencies
530on outdated patch sets, or commits that are not associated to changes
531under review:
532+
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100533** [[outdated]]Orange Dot:
Edwin Kempin8ab5b532014-05-05 17:10:31 +0200534+
535The selected patch set of the change is outdated; it is not the current
536patch set of the change.
537+
538If an ancestor change is marked with an orange dot it means that the
539currently viewed patch set depends on a outdated patch set of the
540ancestor change. This is because a new patch set for the ancestor
541change was uploaded in the meantime and as result the currently viewed
542patch set now needs to be rebased.
543+
544If a descendant change is marked with an orange dot it means that an
545old patch set of the descendant change depends on the currently viewed
546patch set. It may be that the descendant was rebased in the meantime
547and with the new patch set this dependency was removed.
548
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100549** [[indirect-descendant]]Green Tilde:
Edwin Kempin8ab5b532014-05-05 17:10:31 +0200550+
551The selected patch set of the change is an indirect descendant of the
552currently viewed patch set; it has a dependency to another patch set of
553this change. E.g. this could mean that a new patch set was uploaded for
554this change and the descendant change now needs to be rebased. Please
555note that following the link to an indirect descendant change may
556result in a completely different related changes listing.
557
Dave Borowitzbbaea3f2015-03-13 13:56:41 -0700558** [[closed-ancestor]]Black Dot:
Edwin Kempin8ab5b532014-05-05 17:10:31 +0200559+
Stefan Beller7e23cd02015-06-18 11:40:18 -0700560Indicates a closed ancestor, e.g. the commit was directly pushed into
Edwin Kempin8ab5b532014-05-05 17:10:31 +0200561the repository bypassing code review, or the ancestor change was
562reviewed and submitted on another branch. The latter may indicate that
563the user has accidentally pushed the commit to the wrong branch, e.g.
564the commit was done on `branch-a`, but was then pushed to
565`refs/for/branch-b`.
Stefan Beller7e23cd02015-06-18 11:40:18 -0700566A black dot is also present if the change was abandoned.
Edwin Kempin8ab5b532014-05-05 17:10:31 +0200567
Stefan Beller03d67902015-06-18 15:52:24 -0700568** [[closed-ancestor-abandoned]]Strikethrough Subject:
569+
570When the commit is abandoned, its subject line will be striked
571through.
572
Edwin Kempin8ab5b532014-05-05 17:10:31 +0200573+
574image::images/user-review-ui-change-screen-related-changes-indicators.png[width=800, link="images/user-review-ui-change-screen-related-changes-indicators.png"]
575
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100576- [[conflicts-with]]`Conflicts With`:
Edwin Kempin8ab5b532014-05-05 17:10:31 +0200577+
578This tab page shows changes that conflict with the current change.
579Non-mergeable changes are filtered out; only conflicting changes that
580are mergeable are shown.
581+
582If this change is merged, its conflicting changes will have merge
583conflicts and must be rebased. The rebase of the other changes with the
584conflict resolution must then be done manually.
585+
586image::images/user-review-ui-change-screen-conflicts-with.png[width=800, link="images/user-review-ui-change-screen-conflicts-with.png"]
587
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100588- [[same-topic]]`Same Topic`:
Edwin Kempin8ab5b532014-05-05 17:10:31 +0200589+
590This tab page shows changes that have the same topic as the current
591change. Only open changes are included in the list.
592+
593image::images/user-review-ui-change-screen-same-topic.png[width=800, link="images/user-review-ui-change-screen-same-topic.png"]
594
Stefan Beller09feaac2015-06-29 16:20:10 -0700595- [[submitted-together]]`Submitted Together`:
596+
597This tab page shows changes that will be submitted together with the
598currently viewed change, when clicking the submit button. It includes
599ancestors of the current patch set.
600+
601This may include changes and its ancestors with the same topic if
602`change.submitWholeTopic` is enabled. Only open changes with the
603same topic are included in the list.
604+
605
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100606- [[cherry-picks]]`Cherry-Picks`:
Edwin Kempin8ab5b532014-05-05 17:10:31 +0200607+
608This tab page shows changes with the same link:user-changeid.html[
609Change-Id] for the current project.
610+
611Abandoned changes are filtered out.
612+
613For each change in this list the destination branch is shown as a
614prefix in front of the change subject.
615+
616image::images/user-review-ui-change-screen-cherry-picks.png[width=800, link="images/user-review-ui-change-screen-cherry-picks.png"]
617
618If there are no related changes for a tab, the tab is not displayed.
619
Edwin Kempinc6cab612014-05-06 11:09:05 +0200620[[reply]]
621=== Reply
622
623The `Reply...` button in the change header allows to reply to the
624currently viewed patch set; one can add a summary comment, publish
625inline draft comments, and vote on the labels.
626
627image::images/user-review-ui-change-screen-reply.png[width=800, link="images/user-review-ui-change-screen-reply.png"]
628
629Clicking on the `Reply...` button opens a popup panel.
630
Sebastian Schuberth027c4352016-02-02 09:24:29 +0100631[[summary-comment]]
Edwin Kempinc6cab612014-05-06 11:09:05 +0200632A text box allows to type a summary comment for the currently viewed
Sebastian Schuberth027c4352016-02-02 09:24:29 +0100633patch set. Some basic markdown-like syntax is supported which renders
634indented lines preformatted, lines starting with "- " or "* " as list
635items, and lines starting with "> " as block quotes (also see replying to
636link:#reply-to-message[messages] and link:#reply-inline-comment[inline comments]).
Edwin Kempinc6cab612014-05-06 11:09:05 +0200637
Richard Möhne4abe9a2014-11-13 20:05:13 +0100638Note that you can set the text and tooltip of the button in
639link:config-gerrit.html#change.replyLabel[gerrit.config].
640
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100641[[vote]]
Edwin Kempinc6cab612014-05-06 11:09:05 +0200642If the current patch set is viewed, radio buttons are displayed for
643each label on which the user is allowed to vote. Voting on non-current
644patch sets is not possible.
645
Edwin Kempinc6cab612014-05-06 11:09:05 +0200646The inline draft comments that will be published are displayed in a
647separate section so that they can be reviewed before publishing. There
648are links to navigate to the inline comments which can be used if a
649comment needs to be edited.
650
651The `Post` button publishes the comments and the votes.
652
Edwin Kempinc6cab612014-05-06 11:09:05 +0200653image::images/user-review-ui-change-screen-replying.png[width=800, link="images/user-review-ui-change-screen-replying.png"]
654
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100655[[quick-approve]]
Edwin Kempinc6cab612014-05-06 11:09:05 +0200656If a user can approve a label that is still required, a quick approve
657button appears in the change header that allows to add this missing
658approval by a single click. The quick approve button only appears if
659there is a single label that is still required and can be approved by
660the user.
661
662E.g. if a change requires approvals on the 'Code-Review' and the
663'Verified' labels, and there is already a '+1 Verified' vote, then
664if the user is allowed to vote the max score on 'Code-Review', a
665`Code-Review+2` quick approve button appears that approves the
666'Code-Review' label if clicked.
667
668Using the quick approve button also publishes all inline draft
669comments; a summary comment is only added if the reply popup panel is
670open when the quick approve button is clicked.
671
672image::images/user-review-ui-change-screen-quick-approve.png[width=800, link="images/user-review-ui-change-screen-quick-approve.png"]
673
Edwin Kempin7a682812014-05-06 14:45:01 +0200674[[history]]
675=== History
676
677The history of the change can be seen in the lower part of the screen.
678
679The history contains messages for all kinds of change updates, e.g. a
680message is added when a new patch set is uploaded or when a review was
681done.
682
683Messages with new comments from other users, that were published after
684the current user last reviewed this change, are automatically expanded.
685
686image::images/user-review-ui-change-screen-history.png[width=800, link="images/user-review-ui-change-screen-history.png"]
687
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100688[[reply-to-message]]
Edwin Kempin7a682812014-05-06 14:45:01 +0200689It is possible to directly reply to a change message by clicking on the
690reply icon in the right upper corner of a change message. This opens
691the reply popup panel and prefills the text box with the quoted comment.
692Then the reply can be written below the quoted comment or inserted
Sebastian Schuberth027c4352016-02-02 09:24:29 +0100693inline. Lines starting with "> " will be rendered as a block quote.
Edwin Kempin7a682812014-05-06 14:45:01 +0200694Please note that for a correct rendering it is important to leave a blank
695line between a quoted block and the reply to it.
696
697image::images/user-review-ui-change-screen-reply-to-comment.png[width=800, link="images/user-review-ui-change-screen-reply-to-comment.png"]
698
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100699[[inline-comments-in-history]]
Edwin Kempin7a682812014-05-06 14:45:01 +0200700Inline comments are directly displayed in the change history and there
701are links to navigate to the inline comments.
702
703image::images/user-review-ui-change-screen-inline-comments.png[width=800, link="images/user-review-ui-change-screen-inline-comments.png"]
704
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100705[[expand-all]]
Edwin Kempin7a682812014-05-06 14:45:01 +0200706The `Expand All` button expands all messages; the `Collapse All` button
707collapses all messages.
708
Edwin Kempin772418f2014-05-06 15:45:35 +0200709[[update-notification]]
710=== Update Notification
711
712The change screen automatically polls for updates to the currently
713viewed change. If there is an update the user is informed by a popup
714panel in the bottom right corner.
715
716The polling frequency depends on the server configuration; by default
717it is 30 seconds. Polling may also be completely disabled by the
718administrator.
719
720image::images/user-review-ui-change-screen-change-update.png[width=800, link="images/user-review-ui-change-screen-change-update.png"]
721
Edwin Kempin41d9d302014-05-06 16:02:06 +0200722[[plugin-extensions]]
723=== Plugin Extensions
724
725Gerrit plugins may extend the change screen; they can add buttons for
726additional actions to the change info block and display arbitrary UI
727controls below the change info block.
728
729image::images/user-review-ui-change-screen-plugin-extensions.png[width=800, link="images/user-review-ui-change-screen-plugin-extensions.png"]
730
Edwin Kempind38ddf52014-05-07 14:31:42 +0200731[[side-by-side]]
732== Side-by-Side Diff Screen
733
734The side-by-side diff screen shows a single patch; the old file version
735is displayed on the left side of the screen; the new file version is
736displayed on the right side of the screen.
737
738This screen allows to review a patch and to comment on it.
739
740image::images/user-review-ui-side-by-side-diff-screen.png[width=800, link="images/user-review-ui-side-by-side-diff-screen.png"]
741
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100742[[side-by-side-header]]
Edwin Kempind38ddf52014-05-07 14:31:42 +0200743In the screen header the project name and the name of the viewed patch
744file are shown.
745
746If a Git web browser is configured on the server, the project name and
747the file path are displayed as links to the project and the folder in
748the Git web browser.
749
750image::images/user-review-ui-side-by-side-diff-screen-project-and-file.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-project-and-file.png"]
751
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100752[[side-by-side-mark-reviewed]]
Edwin Kempind38ddf52014-05-07 14:31:42 +0200753The checkbox in front of the project name and the file name allows the
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +0200754patch to be marked as reviewed. The link:#mark-reviewed[Mark Reviewed]
755diff preference allows to control whether the files should be
756automatically marked as reviewed when they are viewed.
Edwin Kempind38ddf52014-05-07 14:31:42 +0200757
758image::images/user-review-ui-side-by-side-diff-screen-reviewed.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-reviewed.png"]
759
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100760[[scrollbar]]
Edwin Kempind38ddf52014-05-07 14:31:42 +0200761The scrollbar shows patch diffs and inline comments as annotations.
762This provides a good overview of the lines in the patch that are
763relevant for reviewing. By clicking on an annotation one can quickly
764navigate to the corresponding line in the patch.
765
766image::images/user-review-ui-side-by-side-diff-screen-scrollbar.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-scrollbar.png"]
767
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100768[[gaps]]
Edwin Kempin1266ac8f2014-05-09 09:39:31 +0200769A gap between lines in the file content that is caused by aligning the
770left and right side or by displaying inline comments is shown as a
771vertical red bar in the line number column. This prevents a gap from
772being mistaken for blank lines in the file
773
774image::images/user-review-ui-side-by-side-diff-screen-red-bar.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-red-bar.png"]
775
Edwin Kempind8057e52014-05-08 13:52:32 +0200776[[patch-set-selection]]
777In the header, on each side, the list of patch sets is shown. Clicking
778on a patch set changes the selection for the patch set comparison and
779the screen is refreshed to show the diff between the selected patch
780sets. The currently selected patch set is highlighted by a light blue
781background.
782
783On the left side `Base` can be selected to compare a patch set against
784its base. For merge commits `Auto Merge` is available instead which
785allows to compare the patch against the result of the auto merge. The
786auto merge version may contain Git conflict markers and is useful for
787reviewing how conflicts are resolved by a patch.
788
789Reviewers that are reviewing a patch for the first time look at its
790diff against its base; reviewers that have reviewed an old patch
791version before, may see what has changed since that version by
792comparing the old patch against the current patch.
793
794image::images/user-review-ui-side-by-side-diff-screen-patch-sets.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-patch-sets.png"]
795
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100796[[download-file]]
Edwin Kempin6db9bcd2014-06-06 09:32:05 +0200797The download icon next to the patch set list allows to download the
798patch. Unless the mime type of the file is configured as safe, the
799download file is a zip archive that contains the patch file.
800
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100801[[no-differences]]
Edwin Kempin01280cc2014-05-09 09:53:30 +0200802If the compared patches are identical, this is highlighted by a red
803`No Differences` label in the screen header.
804
805image::images/user-review-ui-side-by-side-diff-screen-no-differences.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-no-differences.png"]
806
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100807[[side-by-side-rename]]
Edwin Kempinafb4fcc2014-06-06 09:52:52 +0200808If a file was renamed, the old and new file paths are shown in the
809header together with a similarity index that shows how much of the file
810content is unmodified.
811
812image::images/user-review-ui-side-by-side-diff-screen-rename.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-rename.png"]
Edwin Kempind8057e52014-05-08 13:52:32 +0200813
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100814[[navigation]]
Edwin Kempind37a1342014-05-08 14:02:35 +0200815For navigating between the patches in a patch set there are navigation
816buttons on the right side of the screen header. The left arrow button
817navigates to the previous patch; the right arrow button navigates to
818the next patch. The arrow up button leads back to the change screen. In
819all cases the selection for the patch set comparison is kept.
820
821image::images/user-review-ui-side-by-side-diff-screen-navigation.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-navigation.png"]
822
Edwin Kempin004c3472014-05-07 16:56:59 +0200823[[inline-comments]]
824=== Inline Comments
825
826Inline comments are displayed directly in the patch file under the code
827that is commented. Inline comments can be placed on lines or on code
828blocks.
829
830If an inline comment relates to a code block, this code block is
831highlighted by a yellow background.
832
833Code blocks with comments may overlap. This means it is possible to
834attach several comments to the same code.
835
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100836[[line-links]]
Edwin Kempin004c3472014-05-07 16:56:59 +0200837The lines of the patch file are linkable. To link to a certain line in
838the patch file, '@<line-number>' must be appended to the patch link,
839e.g. `http://host:8080/#/c/56857/2/Documentation/user-review-ui.txt@665`.
840To link to a line in the old file version, '@a<line-number>' must be
841appended to the patch link. These links can be used to directly link to
842certain inline comments.
843
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +0200844If the diff preference link:#expand-all-comments[Expand All Comments]
845is set to `Expand`, all inline comments will be automatically expanded.
Edwin Kempin004c3472014-05-07 16:56:59 +0200846
847image::images/user-review-ui-side-by-side-diff-screen-inline-comments.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-inline-comments.png"]
848
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100849[[comment]]
Edwin Kempin004c3472014-05-07 16:56:59 +0200850In the header of the comment box, the name of the comment author and
851the timestamp of the comment are shown. If avatars are configured on
852the server, the avatar image of the comment author is displayed in the
853top left corner. Below the actual comment there are buttons to reply to
854the comment.
855
856image::images/user-review-ui-side-by-side-diff-screen-comment-box.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-comment-box.png"]
857
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100858[[reply-inline-comment]]
Edwin Kempin004c3472014-05-07 16:56:59 +0200859Clicking on the `Reply` button opens an editor to type the reply.
860
861Quoting is supported, but only by manually copying & pasting the old
Sebastian Schuberth027c4352016-02-02 09:24:29 +0100862comment that should be quoted and prefixing every line by "> ". Please
Edwin Kempin004c3472014-05-07 16:56:59 +0200863note that for a correct rendering it is important to leave a blank line
864between a quoted block and the reply to it.
865
866Clicking on the `Save` button saves the comment as a draft. To make it
867visible to other users it must be published from the change screen by
868link:#reply[replying] to the change.
869
870The `Cancel` button cancels the editing and discards any changes to the
871draft comment.
872
873Clicking on the `Discard` button deletes the inline draft comment.
874
875image::images/user-review-ui-side-by-side-diff-screen-comment-reply.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-comment-reply.png"]
876
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100877[[draft-inline-comment]]
Edwin Kempin004c3472014-05-07 16:56:59 +0200878Draft comments are marked by the text "Draft" in the header in the
879place of the comment author.
880
881A draft comment can be edited by clicking on the `Edit` button, or
882deleted by clicking on the `Discard` button.
883
884image::images/user-review-ui-side-by-side-diff-screen-comment-edit.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-comment-edit.png"]
885
Edwin Kempinf9b4bc92014-11-05 13:14:57 +0100886[[done]]
Edwin Kempin004c3472014-05-07 16:56:59 +0200887Clicking on the `Done` button is a quick way to reply with "Done" to a
888comment. This is used to mark a comment as addressed by a follow-up
889patch set.
890
Edwin Kempin44606652014-05-09 08:31:05 +0200891image::images/user-review-ui-side-by-side-diff-screen-replied-done.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-replied-done.png"]
Edwin Kempin004c3472014-05-07 16:56:59 +0200892
893[[add-inline-comment]]
894To add a new inline comment there are several possibilities:
895
896- select a code block and press 'c'
897- select a code block and click on the popup comment icon
Edwin Kempin7feeb952014-05-09 11:16:56 +0200898- go to a line, by clicking on it or by link:#key-navigation[key
899 navigation], and press 'c'
Edwin Kempin004c3472014-05-07 16:56:59 +0200900- click on a line number
901
902There are many ways to select code for commenting on it. The most
903frequently used methods are:
904
905- by mouse:
906** click and drag with the mouse to select a block
907** double-click on a word to select it
908** double-click and drag with the mouse to select a code block word-wise
909** triple-click on a line to select it
910** triple-click and drag with the mouse to select a code block line-wise
911
912- by keys (the same keys that are used for visual selection in Vim):
913** press 'v' + arrow keys (or 'h', 'j', 'k', 'l') to select a block
914** press 'V' + arrow keys (or 'j', 'k') to select a code block line-wise
915** type 'bvw' to select a word
916
Edwin Kempin004c3472014-05-07 16:56:59 +0200917image::images/user-review-ui-side-by-side-diff-screen-comment.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-comment.png"]
918
919For typing the new comment, a new comment box is shown under the code
920that is commented.
921
922Clicking on the `Save` button saves the new comment as a draft. To make
923it visible to other users it must be published from the change screen
924by link:#reply[replying] to the change.
925
926Clicking on the `Discard` button deletes the new comment.
927
928image::images/user-review-ui-side-by-side-diff-screen-commented.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-commented.png"]
929
Edwin Kempin9df27ac2014-05-08 13:06:18 +0200930[[file-level-comments]]
931=== File Level Comments
932
933Comments that apply to a whole file can be added on file level.
934
935File level comments are added by clicking on the comment icon in the
936header above the file.
937
938image::images/user-review-ui-side-by-side-diff-screen-file-level-comment.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-file-level-comment.png"]
939
940Clicking on the comment icon opens a comment box for typing the file
941level comment.
942
943image::images/user-review-ui-side-by-side-diff-screen-file-level-commented.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-file-level-commented.png"]
944
Edwin Kempin6113a1f2014-05-09 10:48:34 +0200945[[search]]
946=== Search
947
948For searching within a patch file, a Vim-like search is supported.
949Typing `/` opens the search box. Typing in the search box immediately
950highlights matches in the patch file with a yellow background. Using
951JavaScript regular expressions in the search term is supported. The
952search is case insensitive. After confirming the search by `ENTER` one
953can navigate between the matches by `n` / `N` to go to the next /
954previous match. Skipped lines are automatically expanded if they
955contain a match and one navigates to it.
956
957For additional possibilities to search please check the
958link:http://www.vim.org/docs.php[Vim documentation]. There are other
959useful ways to search, e.g. while the cursor is on a word, pressing `*`
960or `#` searches for the next or previous occurrence of the word.
961
962Searching by `Ctrl-F` finds matches only in the visible area of the
963screen unless the link:#render[Render] diff preference is set to `Slow`.
964
965image::images/user-review-ui-side-by-side-diff-screen-search.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-search.png"]
966
Edwin Kempin7feeb952014-05-09 11:16:56 +0200967[[key-navigation]]
968=== Key Navigation
969
970Vim-like commands can be used to navigate within a patch file:
971
972- `h` / `j` / `k` / `l` moves the cursor left / down / up / right
973- `0` / `$` moves the cursor to the start / end of the line
974- `gg` / `G` moves to cursor to the start / end of the file
David Pursehouse4b067752017-03-03 15:54:53 +0900975- `Ctrl-D` / `Ctrl-U` scrolls downwards / upwards
Edwin Kempin7feeb952014-05-09 11:16:56 +0200976
977Please check the link:http://www.vim.org/docs.php[Vim documentation]
978for further information.
979
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +0200980[[diff-preferences]]
981=== Diff Preferences
982
983There are several options to control how patch diffs should be
984rendered. Users can configure their preferences in the diff
985preferences. The diff preferences can be accessed by clicking on the
986settings icon in the screen header.
987
988image::images/user-review-ui-side-by-side-diff-screen-preferences.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-preferences.png"]
989
990The diff preferences popup allows to change the diff preferences.
991By clicking on the `Save` button changes to the diff preferences are
992saved permanently. Clicking on the `Apply` button applies the new
993diff preferences to the current screen, but they are discarded when the
994screen is refreshed. The `Save` button is only available if the user is
995signed in.
996
997image::images/user-review-ui-side-by-side-diff-screen-preferences-popup.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-preferences-popup.png"]
998
999The following diff preferences can be configured:
1000
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001001- [[theme]]`Theme`:
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001002+
1003Controls the theme that is used to render the file content.
1004+
1005E.g. users could choose to work with a dark theme.
1006+
1007image::images/user-review-ui-side-by-side-diff-screen-dark-theme.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-dark-theme.png"]
1008
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001009- [[ignore-whitespace]]`Ignore Whitespace`:
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001010+
1011Controls whether differences in whitespace should be ignored or not.
1012+
1013** `None`:
1014+
1015All differences in whitespace are highlighted.
1016+
1017** `At Line End`:
1018+
1019Whitespace differences at the end of lines are ignored.
1020+
1021** `Leading, At Line End`:
1022+
1023Whitespace differences at the beginning and end of lines are ignored.
1024+
1025** `All`:
1026+
1027All differences in whitespace are ignored.
1028
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001029- [[tab-width]]`Tab Width`:
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001030+
1031Controls how many spaces should be displayed for a tab.
1032
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001033- [[columns]]`Columns`:
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001034+
1035Sets the preferred line length. At this position a vertical dashed line
1036is displayed so that one can easily detect lines the exceed the
1037preferred line length.
1038+
1039image::images/user-review-ui-side-by-side-diff-screen-column.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-column.png"]
1040
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001041- [[lines-of-context]]`Lines Of Context`:
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001042+
1043The number of context lines that should be displayed before and after
1044any diff. If the `entire file` checkbox is selected, the full file is
1045rendered.
1046+
1047Skipped common lines can be expanded by clicking on the placeholder for
1048the skipped lines.
1049+
1050Clicking on "... skipped <n> common lines ..." expands the complete
1051block of skipped lines.
1052+
1053If many lines are skipped there are additional links to expand the
1054context by ten lines before and after the skipped block.
1055+
1056image::images/user-review-ui-side-by-side-diff-screen-expand-skipped-lines.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-expand-skipped-lines.png"]
1057
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001058- [[intraline-difference]]`Intraline Difference`:
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001059+
1060Controls whether intraline differences should be highlighted.
1061+
1062image::images/user-review-ui-side-by-side-diff-screen-intraline-difference.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-intraline-difference.png"]
1063
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001064- [[syntax-highlighting]]`Syntax Highlighting`:
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001065+
1066Controls whether syntax highlighting should be enabled.
1067+
1068The language for the syntax highlighting is automatically detected from
Edwin Kempin637db5e2014-05-12 08:25:26 +02001069the file extension. The language can also be set manually by selecting
1070it from the `Language` drop-down list.
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001071+
1072image::images/user-review-ui-side-by-side-diff-screen-syntax-coloring.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-syntax-coloring.png"]
1073
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001074- [[whitespace-errors]]`Whitespace Errors`:
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001075+
1076Controls whether whitespace errors are highlighted.
1077
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001078- [[show-tabs]]`Show Tabs`:
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001079+
1080Controls whether tabs are highlighted.
1081
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001082- [[line-numbers]]`Line Numbers`:
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001083+
1084Controls whether line numbers are shown.
1085
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001086- [[empty-pane]]`Empty Pane`:
David Ostrovskya64d6892014-05-01 21:55:00 +02001087+
1088Controls whether empty panes are shown or not. The Left pane is empty when a
1089file was added; the right pane is empty when a file was deleted.
1090
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001091- [[left-side]]`Left Side`:
Edwin Kempin91de46f2014-05-12 08:28:32 +02001092+
David Ostrovskya000b232014-05-13 07:47:06 +02001093Controls whether the left side is shown. This preference is not
1094persistent and is ignored by the `Save` button. Every time a
1095patch diff is opened, this preference is reset to `Show`.
Edwin Kempin91de46f2014-05-12 08:28:32 +02001096
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001097- [[top-menu]]`Top Menu`:
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001098+
1099Controls whether the top menu is shown.
1100
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001101- [[auto-hide-diff-table-header]]`Auto Hide Diff Table Header`:
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001102+
1103Controls whether the diff table header should be automatically hidden
1104when scrolling down more than half of a page.
1105
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001106- [[mark-reviewed]]`Mark Reviewed`:
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001107+
1108Controls whether the files of the patch set should be automatically
1109marked as reviewed when they are viewed.
1110
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001111- [[expand-all-comments]]`Expand All Comments`:
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001112+
1113Controls whether all comments should be automatically expanded.
1114
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001115- [[render]]`Render`:
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001116+
1117Controls how patch files that exceed the screen size are rendered.
1118+
1119If `Fast` is selected file contents which are outside of the visible
1120area are not attached to the browser's DOM tree. This makes the
1121rendering fast, but searching by `Ctrl+F` only finds content which is
1122in the visible area.
1123+
1124If `Slow` is selected all file contents are attached to the browser's
1125DOM tree, which makes the rendering slow for large files. The advantage
1126of this setting is that `Ctrl+F` can be used to search in the complete
1127file.
Edwin Kempin9cc22c92014-05-12 08:16:52 +02001128+
1129Large files that exceed 4000 lines will not be fully rendered.
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +02001130
Paladoxee24b3c2016-09-05 23:51:02 +01001131- [[line-wrapping]]`Line Wrapping`:
1132+
1133Controls weather to enable line wrapping or not.
1134+
1135If `false` is selected then line wrapping is disabled.
1136This is the default option.
1137+
1138If `true` is selected then line wrapping is enabled.
1139
Edwin Kempin7a85f412014-05-09 12:51:51 +02001140[[keyboard-shortcuts]]
1141== Keyboard Shortcuts
1142
1143Navigation within the review UI can be completely done by keys, and
1144most actions can be controlled by keyboard shortcuts. Typing `?` opens
1145a popup that shows a list of available keyboard shortcuts:
1146
1147- Change Screen
1148+
1149image::images/user-review-ui-change-screen-keyboard-shortcuts.png[width=800, link="images/user-review-ui-change-screen-keyboard-shortcuts.png"]
1150
1151- Side-by-Side Diff Screen
1152+
1153image::images/user-review-ui-side-by-side-diff-screen-keyboard-shortcuts.png[width=800, link="images/user-review-ui-side-by-side-diff-screen-keyboard-shortcuts.png"]
1154+
1155In addition, Vim-like commands can be used to link:#key-navigation[
1156navigate] and link:#search[search] within a patch file.
1157
Edwin Kempinb7a1c7c2014-05-09 11:21:18 +02001158[[new-vs-old]]
1159== New Review UI vs. Old Review UI
1160
1161There are some important conceptual differences between the old and
1162new review UIs:
1163
1164- The old change screen directly shows all patch sets of the change.
1165 With the new change screen only a single patch set is displayed;
1166 users can switch between the patch sets by choosing another patch
1167 set from the link:#patch-sets[Patch Sets] drop down panel in the
1168 screen header.
1169- On the old side-by-side diff screen, new comments are inserted by
1170 double-clicking on a line. With the new side-by-side diff screen
1171 double-click is used to select a word for commenting on it; there
1172 are link:#add-inline-comment[several ways to insert new comments],
1173 e.g. by selecting a code block and clicking on the popup comment
1174 icon.
1175
Edwin Kempinf9b4bc92014-11-05 13:14:57 +01001176[[limitations]]
Edwin Kempinb7a1c7c2014-05-09 11:21:18 +02001177Limitations of the new review UI:
1178
1179- The new side-by-side diff screen cannot render images.
1180
Edwin Kempin7aed5f02014-11-05 13:30:22 +01001181- The new side-by-side diff screen isn't able to highlight line
1182 endings.
1183
Edwin Kempin4fd84c92014-04-30 13:23:15 +02001184GERRIT
1185------
1186Part of link:index.html[Gerrit Code Review]
1187
1188SEARCHBOX
1189---------