blob: b459d86b41e417d67607b0d9f3bf5befad1e84cc [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
25The commit message can be edited directly in the Web UI by clicking on
26the `Edit Message` button in the change header. This opens a drop-down
27editor box in which the commit message can be edited. Saving
28modifications of the commit message automatically creates a new patch
29set for the change. The commit message may only be edited on the
30current patch set.
31
32image::images/user-review-ui-change-screen-edit-commit-message.png[width=800, link="images/user-review-ui-change-screen-edit-commit-message.png"]
33
34The numeric change ID is a link to the change and clicking on it
35refreshes the change screen. By copying the link location you can get
36the permalink of the change.
37
38image::images/user-review-ui-change-screen-permalink.png[width=800, link="images/user-review-ui-change-screen-permalink.png"]
39
40The change status shows the state of the change:
41
42- `Needs <label>`:
43+
44The change is in review and an approval on the shown label is still
45required to make the change submittable.
46
47- `Not <label>`:
48+
49The change is in review and a veto vote on the shown label is
50preventing the submit.
51
Edwin Kempinb2a8ae32014-05-02 15:03:22 +020052[[not-current]]
Edwin Kempin4fd84c92014-04-30 13:23:15 +020053- `Not Current`:
54+
55The currently viewed patch set is outdated.
56+
57Please note that some operations, like voting, are not available on
58outdated patch sets, but only on the current patch set.
59
60- `Ready to Submit`:
61+
62The change has all necessary approvals and may be submitted.
63
64- `Submitted, Merge Pending`:
65+
66The change was submitted and was added to the merge queue.
67+
68The change stays in the merge queue if it depends on a change that is
69still in review. In this case it will get automatically merged when all
70predecessor changes have been merged.
71+
72This status can also mean that the change depends on an abandoned
73change or on an outdated patch set of another change. In this case you
74may want to rebase the change.
75
76- `Merged`:
77+
78The change was successfully merged into the destination branch.
79
80- `Abandoned`:
81+
82The change was abandoned.
83
84- `Draft`:
85+
86The change is a draft that is only visible to the change owner, the
87reviewers that were explicitly added to the change, and users who have
88the link:access-control.html#category_view_drafts[View Drafts] global
89capability assigned.
90
91[[commit-info]]
92=== Commit Info Block
93
94The commit info block shows information about the commit of the
95currently viewed patch set.
96
97It displays the author and the committer as links to a list of this
98person's changes that have the same status as the currently viewed
99change.
100
101The commit ID and the link:user-changeid.html[Change-Id] are both
102displayed with a copy-to-clipboard icon that allows the ID to be copied
103into the clipboard.
104
105If a Git web browser, such as GitWeb or Gitiles, is configured, there
106is also a link to the commit in the Git web browser.
107
108image::images/user-review-ui-change-screen-commit-info.png[width=800, link="images/user-review-ui-change-screen-commit-info.png"]
109
Edwin Kempinf1a84f92014-04-30 15:37:48 +0200110[[change-info]]
111=== Change Info Block
112
113The change info block contains detailed information about the change
114and offers actions on the change.
115
116image::images/user-review-ui-change-screen-change-info.png[width=800, link="images/user-review-ui-change-screen-change-info.png"]
117
118- Change Owner:
119+
120The owner of the change is displayed as a link to a list of the owner's
121changes that have the same status as the currently viewed change.
122+
123image::images/user-review-ui-change-screen-change-info-owner.png[width=800, link="images/user-review-ui-change-screen-change-info-owner.png"]
124
125- Reviewers:
126+
127The reviewers of the change are displayed as chip tokens.
128+
129For each reviewer there is a tooltip that shows on which labels the
130reviewer is allowed to vote.
131+
132New reviewers can be added by clicking on the `Add...` button. Typing
133into the pop-up text field activates auto completion of user and group
134names.
135+
136Reviewers can be removed from the change by clicking on the `x` icon
137in the reviewer's chip token. Removing a reviewer also removes the
138current votes of the reviewer. The removal of votes is recorded as a
139message on the change.
140+
141Removing reviewers is protected by permissions:
142
143** Users can always remove themselves.
144** The change owner may remove any zero or positive score.
145** Users with the link:access-control.html#category_remove_reviewer[
146 Remove Reviewer] access right, the branch owner, the project owner
147 and Gerrit administrators may remove anyone.
148
149+
150image::images/user-review-ui-change-screen-change-info-reviewers.png[width=800, link="images/user-review-ui-change-screen-change-info-reviewers.png"]
151
152- Project / Branch / Topic:
153+
154The name of the project for which the change was done is displayed as a
155link to the link:user-dashboards.html#project-default-dashboard[default
156dashboard] of the project. If no default dashboard is defined, the link
157opens a list of open changes on the project.
158+
159Clicking on the settings icon on the right side navigates to the
160project administration screen.
161+
162The name of the destination branch is displayed as a link to a list
163with all changes on this branch that have the same status as the
164currently viewed change.
165+
166If a topic was assigned to the change it is displayed below the branch.
167By clicking on the edit icon the topic can be set. This requires the
168link:access-control.html#category_edit_topic_name[Edit Topic Name]
169access right. To be able to set a topic on a closed change, the
170`Edit Topic Name` must be assigned with the `force` flag.
171+
172image::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"]
173
174- Submit Strategy:
175+
176The link:project-setup.html#submit_type[submit strategy] that will be
177used to submit the change. The submit strategy is only displayed for
178open changes.
179+
180image::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"]
181+
182If a change cannot be merged due to path conflicts this is highlighted
183by a bold red `Cannot Merge` label.
184+
185image::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"]
186
187- Time of Last Update:
188+
189image::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"]
190
191- Actions:
192+
193Depending on the change state and the permissions of the user, different
194actions are available on the change:
195
196** `Merge Change`:
197+
198Submits the change and adds it to the merge queue. If possible the
199change is merged into the destination branch.
200+
201The `Merge Change` button is available if the change is submittable and
202the link:access-control.html#category_submit[Submit] access right is
203assigned.
204+
205It is also possible to submit changes that have merge conflicts. This
206allows to do the conflict resolution for a change series in a single
207merge commit and submit the changes in reverse order.
208
209** `Abandon`:
210+
211Abandons the change.
212+
213The `Abandon` button is only available if the change is open and the
214link:access-control.html#category_abandon[Abandon] access right is
215assigned.
216+
217When a change is abandoned, a panel appears that allows one to type a
218comment message to explain why the change is being abandoned.
219
220** `Restore`:
221+
222Restores the change.
223+
224The `Restore` button is only available if the change is abandoned and
225the link:access-control.html#category_abandon[Abandon] and the
226link:access-control.html#category_push[Push] access right is
227assigned.
228+
229When a change is restored, a panel appears that allows one to type a
230comment message to explain why the change is being restored.
231
232** `Rebase`:
233+
234Rebases the change. The rebase is always done with content merge
235enabled. If the rebase is successful a new patch set with the rebased
236commit is created. If the rebase fails, there are conflicts that have
237to be resolved manually.
238+
239If the change does not depend on another open change, it is rebased
240onto the tip of the destination branch.
241+
242If the change depends on another open change, it is rebased onto the
243current patch set of that other change.
244+
245The `Rebase` button is only available if the change can be rebased and
246the link:access-control.html#category_rebase[Rebase] access right is
247assigned. Rebasing merge commits is not supported.
248
249** `Cherry-Pick`:
250+
251Allows to cherry-pick the change to another branch. The destination
252branch can be selected from a dialog. Cherry-picking a change creates a
253new open change on the selected destination branch.
254+
255It is also possible to cherry-pick a change to the same branch. This is
256effectively the same as rebasing it to the current tip of the
257destination branch. This can be used to remove dependencies on other
258open changes.
259+
260Users can only cherry-pick changes to branches for which they are
261allowed to upload changes for review.
262
263** `Publish`:
264+
265Publishes the currently viewed draft patch set. If this is the first
266patch set of a change that is published, the change will be published
267as well.
268+
269The `Publish` button is only available if a draft patch set is viewed
270and the user is the change owner or has the
271link:access-control.html#category_publish_drafts[Publish Drafts] access
272right assigned.
273
274** `Delete Change` / `Delete Revision`:
275+
276Deletes the draft change / the currently viewed draft patch set.
277+
278The `Delete Change` / `Delete Revision` buttons are only available if a
279draft patch set is viewed and the user is the change owner or has the
280link:access-control.html#category_delete_drafts[Delete Drafts] access
281right assigned.
282
283** Further actions may be available if plugins are installed.
284
285+
286image::images/user-review-ui-change-screen-change-info-actions.png[width=800, link="images/user-review-ui-change-screen-change-info-actions.png"]
287
288- Labels & Votes:
289+
290Approving votes are colored green; veto votes are colored red.
291+
292image::images/user-review-ui-change-screen-change-info-labels.png[width=800, link="images/user-review-ui-change-screen-change-info-labels.png"]
293
Edwin Kempinab777f12014-05-02 11:47:57 +0200294[[files]]
295=== File List
296
297The file list shows the files that are modified in the currently viewed
298patch set.
299
300image::images/user-review-ui-change-screen-file-list.png[width=800, link="images/user-review-ui-change-screen-file-list.png"]
301
302The checkboxes in front of the file names allow files to be marked as reviewed.
303
304image::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"]
305
306The type of a file modification is indicated by the character in front
307of the file name:
308
309- 'no character' (Modified):
310+
311The file existed before this change and is modified.
312
313- `A` (Added):
314+
315The file is newly added.
316
317- `D` (Deleted):
318+
319The file is deleted.
320
321- `R` (Renamed):
322+
323The file is renamed.
324
325- `C` (Copied):
326+
327The file is new and is copied from an existing file.
328
329image::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"]
330
331If a file is renamed or copied, the name of the original file is
332displayed in gray below the file name.
333
334image::images/user-review-ui-change-screen-file-list-rename.png[width=800, link="images/user-review-ui-change-screen-file-list-rename.png"]
335
336Repeating path segments are grayed out.
337
338image::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"]
339
340Inline comments on a file are shown in the `Comments` column.
341
342Draft comments, i.e. comments that have been written by the current
343user but not yet published, are highlighted in red.
344
345New comments from other users, that were published after the current
346user last reviewed this change, are highlighted in bold.
347
348image::images/user-review-ui-change-screen-file-list-comments.png[width=800, link="images/user-review-ui-change-screen-file-list-comments.png"]
349
350The size of the modifications in the files can be seen in the `Size`
351column. The footer row shows the total size of the change.
352
353For files, the `Size` column shows the sum of inserted and deleted
354lines as one number. For the total size, inserted and deleted lines are
355shown separately. In addition, the number of insertions and deletions
356is shown as a bar. The size of the bar indicates the amount of changed
357lines, and its coloring in green and red shows the proportion of
358insertions to deletions.
359
360The size information is useful to easily spot the files that contain
361the most modifications; these files are likely to be the most relevant
362files for this change. The total change size gives an estimate of how
363long a review of this change may take.
364
365image::images/user-review-ui-change-screen-file-list-size.png[width=800, link="images/user-review-ui-change-screen-file-list-size.png"]
366
367In the header of the file list, the `Diff Against` selection can be
368changed. This selection allows one to choose if the currently viewed
369patch set should be compared against its base or against another patch
370set of this change. The file list is updated accordingly.
371
372The file list header also provides an `Open All` button that opens the
373diff views for all files in the file list.
374
375image::images/user-review-ui-change-screen-file-list-header.png[width=800, link="images/user-review-ui-change-screen-file-list-header.png"]
376
Edwin Kempinb2a8ae32014-05-02 15:03:22 +0200377[[patch-sets]]
378=== Patch Sets
379
380The change screen only presents one patch set at a time. Which patch
381set is currently viewed can be seen from the `Patch Sets` drop-down
382panel in the change header. It shows the number of the currently viewed
383patch set and the total number of patch sets, in the form: "current
384patch set/number of patch sets".
385
386If a non-current patch set is viewed this is indicated by the
387link:#not-current[Not Current] change state. Please note that some
388operations are only available on the current patch set.
389
390image::images/user-review-ui-change-screen-patch-sets.png[width=800, link="images/user-review-ui-change-screen-patch-sets.png"]
391
392The patch set drop-down list shows the list of patch sets and allows to
393switch between them. The patch sets are sorted in descending order so
394that the current patch set is always on top.
395
396Patch sets that have unpublished draft comments are marked by a comment
397icon.
398
399Draft patch sets are marked with `DRAFT`.
400
401image::images/user-review-ui-change-screen-patch-set-list.png[width=800, link="images/user-review-ui-change-screen-patch-set-list.png"]
402
Edwin Kempin0cb1ccb2014-05-05 13:22:03 +0200403[[download]]
404=== Download
405
406The `Download` drop-down panel in the change header offers commands and
407links for downloading the currently viewed patch set.
408
409image::images/user-review-ui-change-screen-download-commands.png[width=800, link="images/user-review-ui-change-screen-download-commands.png"]
410
411The available download commands depend on the installed Gerrit plugins.
412The most popular plugin for download commands, the
413link:https://gerrit-review.googlesource.com/#/admin/projects/plugins/download-commands[
414download-commands] plugin, provides commands to checkout, pull and
415cherry-pick a patch set.
416
417Each command has a copy-to-clipboard icon that allows the command to be
418copied into the clipboard. This makes it easy to paste and execute the
419command on a Git command line.
420
421If several download schemes are configured on the server (e.g. SSH and
422HTTP) there is a drop-down list to switch between the download schemes.
423Gerrit automatically remembers the download scheme that was last chosen
424and selects this download scheme the next time the download commands
425drop-down panel is opened.
426
427The `Patch-File` links provide the Git patch file for the currently
428viewed patch set for download. The patch file can be base64 encoded or
429zipped.
430
431The `Archive` links allow one to download an archive with the contents
432of the currently viewed patch set. The archive is offered in several
433formats (e.g. tar and tbz2); which formats are available depends on the
434configuration of the server.
435
436image::images/user-review-ui-change-screen-download-commands-list.png[width=800, link="images/user-review-ui-change-screen-download-commands-list.png"]
437
Edwin Kempin811bd582014-05-05 13:39:24 +0200438[[included-in]]
439=== Included In
440
441For merged changes the `Included In` drop-down panel is available in
442the change header.
443
444image::images/user-review-ui-change-screen-included-in.png[width=800, link="images/user-review-ui-change-screen-included-in.png"]
445
446The `Included In` drop-down panel shows the branches and tags in which
447the change is included. E.g. if a change fixes a bug, this allows to
448quickly see in which released versions the bug-fix is contained
449(assuming that every release is tagged).
450
451image::images/user-review-ui-change-screen-included-in-list.png[width=800, link="images/user-review-ui-change-screen-included-in-list.png"]
452
Edwin Kempin981cc952014-05-05 14:04:08 +0200453[[star]]
454=== Star Change
455
456The star icon in the change header allows to mark the change as a
457favorite. Clicking on the star icon again, unstars the change.
458
459image::images/user-review-ui-change-screen-star.png[width=800, link="images/user-review-ui-change-screen-star.png"]
460
461Starring a change turns on email notifications for this change.
462
463Starred changed are listed under `My` > `Starred Changes`.
464and can be queried by the link:user-search.html#is[is:starred] search
465operator.
466
Edwin Kempin8ab5b532014-05-05 17:10:31 +0200467[[related-changes]]
468=== Related Changes
469
470If there are changes that are related to the currently viewed change
471they are displayed in the third column of the change screen.
472
473There are several lists of related changes and a tab control is used to
474display each list of related changes in its own tab.
475
476The following tabs may be displayed:
477
478[[related-changes-tab]]
479- `Related Changes`:
480+
481This tab page shows changes on which the current change depends
482(ancestors) and open changes that depend on the current change
483(descendants). For merge commits it also shows the closed changes that
484will be merged into the destination branch by submitting the merge
485commit.
486+
487The changes are sorted in the same way as the output of 'git log'. This
488means the relationship between the changes can be inferred from the
489position of the changes in the list. Changes listed above the current
490change are descendants; changes below the current change are ancestors.
491+
492This tab is only available for open changes.
493+
494image::images/user-review-ui-change-screen-related-changes.png[width=800, link="images/user-review-ui-change-screen-related-changes.png"]
495+
496Related changes may be decorated with an icon to signify dependencies
497on outdated patch sets, or commits that are not associated to changes
498under review:
499+
500** Orange Dot:
501+
502The selected patch set of the change is outdated; it is not the current
503patch set of the change.
504+
505If an ancestor change is marked with an orange dot it means that the
506currently viewed patch set depends on a outdated patch set of the
507ancestor change. This is because a new patch set for the ancestor
508change was uploaded in the meantime and as result the currently viewed
509patch set now needs to be rebased.
510+
511If a descendant change is marked with an orange dot it means that an
512old patch set of the descendant change depends on the currently viewed
513patch set. It may be that the descendant was rebased in the meantime
514and with the new patch set this dependency was removed.
515
516** Green Tilde:
517+
518The selected patch set of the change is an indirect descendant of the
519currently viewed patch set; it has a dependency to another patch set of
520this change. E.g. this could mean that a new patch set was uploaded for
521this change and the descendant change now needs to be rebased. Please
522note that following the link to an indirect descendant change may
523result in a completely different related changes listing.
524
525** Black Dot:
526+
527Indicates a merged ancestor, e.g. the commit was directly pushed into
528the repository bypassing code review, or the ancestor change was
529reviewed and submitted on another branch. The latter may indicate that
530the user has accidentally pushed the commit to the wrong branch, e.g.
531the commit was done on `branch-a`, but was then pushed to
532`refs/for/branch-b`.
533
534+
535image::images/user-review-ui-change-screen-related-changes-indicators.png[width=800, link="images/user-review-ui-change-screen-related-changes-indicators.png"]
536
537- `Conflicts With`:
538+
539This tab page shows changes that conflict with the current change.
540Non-mergeable changes are filtered out; only conflicting changes that
541are mergeable are shown.
542+
543If this change is merged, its conflicting changes will have merge
544conflicts and must be rebased. The rebase of the other changes with the
545conflict resolution must then be done manually.
546+
547image::images/user-review-ui-change-screen-conflicts-with.png[width=800, link="images/user-review-ui-change-screen-conflicts-with.png"]
548
549- `Same Topic`:
550+
551This tab page shows changes that have the same topic as the current
552change. Only open changes are included in the list.
553+
554image::images/user-review-ui-change-screen-same-topic.png[width=800, link="images/user-review-ui-change-screen-same-topic.png"]
555
556- `Cherry-Picks`:
557+
558This tab page shows changes with the same link:user-changeid.html[
559Change-Id] for the current project.
560+
561Abandoned changes are filtered out.
562+
563For each change in this list the destination branch is shown as a
564prefix in front of the change subject.
565+
566image::images/user-review-ui-change-screen-cherry-picks.png[width=800, link="images/user-review-ui-change-screen-cherry-picks.png"]
567
568If there are no related changes for a tab, the tab is not displayed.
569
Edwin Kempinc6cab612014-05-06 11:09:05 +0200570[[reply]]
571=== Reply
572
573The `Reply...` button in the change header allows to reply to the
574currently viewed patch set; one can add a summary comment, publish
575inline draft comments, and vote on the labels.
576
577image::images/user-review-ui-change-screen-reply.png[width=800, link="images/user-review-ui-change-screen-reply.png"]
578
579Clicking on the `Reply...` button opens a popup panel.
580
581A text box allows to type a summary comment for the currently viewed
582patch set.
583
584If the current patch set is viewed, radio buttons are displayed for
585each label on which the user is allowed to vote. Voting on non-current
586patch sets is not possible.
587
588Typing "LGTM" (acronym for 'Looks Good To Me') in the summary comment
589text box automatically selects the highest possible score for the
590'Code-Review' label.
591
592The inline draft comments that will be published are displayed in a
593separate section so that they can be reviewed before publishing. There
594are links to navigate to the inline comments which can be used if a
595comment needs to be edited.
596
597The `Post` button publishes the comments and the votes.
598
599The `send email` checkbox controls whether the reply should trigger
600email notifications for other users. Deselecting the checkbox means
601that there will be no email notification about the change update to the
602change author, the reviewers or any other user.
603
604image::images/user-review-ui-change-screen-replying.png[width=800, link="images/user-review-ui-change-screen-replying.png"]
605
606If a user can approve a label that is still required, a quick approve
607button appears in the change header that allows to add this missing
608approval by a single click. The quick approve button only appears if
609there is a single label that is still required and can be approved by
610the user.
611
612E.g. if a change requires approvals on the 'Code-Review' and the
613'Verified' labels, and there is already a '+1 Verified' vote, then
614if the user is allowed to vote the max score on 'Code-Review', a
615`Code-Review+2` quick approve button appears that approves the
616'Code-Review' label if clicked.
617
618Using the quick approve button also publishes all inline draft
619comments; a summary comment is only added if the reply popup panel is
620open when the quick approve button is clicked.
621
622image::images/user-review-ui-change-screen-quick-approve.png[width=800, link="images/user-review-ui-change-screen-quick-approve.png"]
623
Edwin Kempin7a682812014-05-06 14:45:01 +0200624[[history]]
625=== History
626
627The history of the change can be seen in the lower part of the screen.
628
629The history contains messages for all kinds of change updates, e.g. a
630message is added when a new patch set is uploaded or when a review was
631done.
632
633Messages with new comments from other users, that were published after
634the current user last reviewed this change, are automatically expanded.
635
636image::images/user-review-ui-change-screen-history.png[width=800, link="images/user-review-ui-change-screen-history.png"]
637
638It is possible to directly reply to a change message by clicking on the
639reply icon in the right upper corner of a change message. This opens
640the reply popup panel and prefills the text box with the quoted comment.
641Then the reply can be written below the quoted comment or inserted
642inline. Lines starting with " > " will be rendered as a block quote.
643Please note that for a correct rendering it is important to leave a blank
644line between a quoted block and the reply to it.
645
646image::images/user-review-ui-change-screen-reply-to-comment.png[width=800, link="images/user-review-ui-change-screen-reply-to-comment.png"]
647
648Inline comments are directly displayed in the change history and there
649are links to navigate to the inline comments.
650
651image::images/user-review-ui-change-screen-inline-comments.png[width=800, link="images/user-review-ui-change-screen-inline-comments.png"]
652
653The `Expand All` button expands all messages; the `Collapse All` button
654collapses all messages.
655
Edwin Kempin772418f2014-05-06 15:45:35 +0200656[[update-notification]]
657=== Update Notification
658
659The change screen automatically polls for updates to the currently
660viewed change. If there is an update the user is informed by a popup
661panel in the bottom right corner.
662
663The polling frequency depends on the server configuration; by default
664it is 30 seconds. Polling may also be completely disabled by the
665administrator.
666
667image::images/user-review-ui-change-screen-change-update.png[width=800, link="images/user-review-ui-change-screen-change-update.png"]
668
Edwin Kempin41d9d302014-05-06 16:02:06 +0200669[[plugin-extensions]]
670=== Plugin Extensions
671
672Gerrit plugins may extend the change screen; they can add buttons for
673additional actions to the change info block and display arbitrary UI
674controls below the change info block.
675
676image::images/user-review-ui-change-screen-plugin-extensions.png[width=800, link="images/user-review-ui-change-screen-plugin-extensions.png"]
677
Edwin Kempinae57e182014-04-30 13:38:55 +0200678[[old-change-screen]]
679=== Old Change Screen
680
681In addition to the normal change screen, this Gerrit version still
682includes the old change screen that was used in earlier Gerrit
683versions. Users that want to continue using the old change screen can
684configure it in their preferences under
685`Settings` > `Preferences` > `Change View`:
686
687image::images/user-review-ui-change-view-preference.png[width=800, link="images/user-review-ui-change-view-preference.png"]
688
689[WARNING]
690The old change screen will be removed in a later version of Gerrit.
691
Edwin Kempind38ddf52014-05-07 14:31:42 +0200692[[side-by-side]]
693== Side-by-Side Diff Screen
694
695The side-by-side diff screen shows a single patch; the old file version
696is displayed on the left side of the screen; the new file version is
697displayed on the right side of the screen.
698
699This screen allows to review a patch and to comment on it.
700
701image::images/user-review-ui-side-by-side-diff-screen.png[width=800, link="images/user-review-ui-side-by-side-diff-screen.png"]
702
703In the screen header the project name and the name of the viewed patch
704file are shown.
705
706If a Git web browser is configured on the server, the project name and
707the file path are displayed as links to the project and the folder in
708the Git web browser.
709
710image::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"]
711
712The checkbox in front of the project name and the file name allows the
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +0200713patch to be marked as reviewed. The link:#mark-reviewed[Mark Reviewed]
714diff preference allows to control whether the files should be
715automatically marked as reviewed when they are viewed.
Edwin Kempind38ddf52014-05-07 14:31:42 +0200716
717image::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"]
718
Edwin Kempind38ddf52014-05-07 14:31:42 +0200719The scrollbar shows patch diffs and inline comments as annotations.
720This provides a good overview of the lines in the patch that are
721relevant for reviewing. By clicking on an annotation one can quickly
722navigate to the corresponding line in the patch.
723
724image::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"]
725
Edwin Kempind8057e52014-05-08 13:52:32 +0200726[[patch-set-selection]]
727In the header, on each side, the list of patch sets is shown. Clicking
728on a patch set changes the selection for the patch set comparison and
729the screen is refreshed to show the diff between the selected patch
730sets. The currently selected patch set is highlighted by a light blue
731background.
732
733On the left side `Base` can be selected to compare a patch set against
734its base. For merge commits `Auto Merge` is available instead which
735allows to compare the patch against the result of the auto merge. The
736auto merge version may contain Git conflict markers and is useful for
737reviewing how conflicts are resolved by a patch.
738
739Reviewers that are reviewing a patch for the first time look at its
740diff against its base; reviewers that have reviewed an old patch
741version before, may see what has changed since that version by
742comparing the old patch against the current patch.
743
744image::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"]
745
746The download icon next to the patch set list allows to download the
747patch. Unless the mime type of the file is configured as safe, the
748download file is a zip archive that contains the patch file.
749
Edwin Kempind37a1342014-05-08 14:02:35 +0200750For navigating between the patches in a patch set there are navigation
751buttons on the right side of the screen header. The left arrow button
752navigates to the previous patch; the right arrow button navigates to
753the next patch. The arrow up button leads back to the change screen. In
754all cases the selection for the patch set comparison is kept.
755
756image::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"]
757
Edwin Kempin004c3472014-05-07 16:56:59 +0200758[[inline-comments]]
759=== Inline Comments
760
761Inline comments are displayed directly in the patch file under the code
762that is commented. Inline comments can be placed on lines or on code
763blocks.
764
765If an inline comment relates to a code block, this code block is
766highlighted by a yellow background.
767
768Code blocks with comments may overlap. This means it is possible to
769attach several comments to the same code.
770
771The lines of the patch file are linkable. To link to a certain line in
772the patch file, '@<line-number>' must be appended to the patch link,
773e.g. `http://host:8080/#/c/56857/2/Documentation/user-review-ui.txt@665`.
774To link to a line in the old file version, '@a<line-number>' must be
775appended to the patch link. These links can be used to directly link to
776certain inline comments.
777
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +0200778If the diff preference link:#expand-all-comments[Expand All Comments]
779is set to `Expand`, all inline comments will be automatically expanded.
Edwin Kempin004c3472014-05-07 16:56:59 +0200780
781image::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"]
782
783In the header of the comment box, the name of the comment author and
784the timestamp of the comment are shown. If avatars are configured on
785the server, the avatar image of the comment author is displayed in the
786top left corner. Below the actual comment there are buttons to reply to
787the comment.
788
789image::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"]
790
791Clicking on the `Reply` button opens an editor to type the reply.
792
793Quoting is supported, but only by manually copying & pasting the old
794comment that should be quoted and prefixing every line by " > ". Please
795note that for a correct rendering it is important to leave a blank line
796between a quoted block and the reply to it.
797
798Clicking on the `Save` button saves the comment as a draft. To make it
799visible to other users it must be published from the change screen by
800link:#reply[replying] to the change.
801
802The `Cancel` button cancels the editing and discards any changes to the
803draft comment.
804
805Clicking on the `Discard` button deletes the inline draft comment.
806
807image::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"]
808
809Draft comments are marked by the text "Draft" in the header in the
810place of the comment author.
811
812A draft comment can be edited by clicking on the `Edit` button, or
813deleted by clicking on the `Discard` button.
814
815image::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"]
816
817Clicking on the `Done` button is a quick way to reply with "Done" to a
818comment. This is used to mark a comment as addressed by a follow-up
819patch set.
820
821image::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"]
822
823[[add-inline-comment]]
824To add a new inline comment there are several possibilities:
825
826- select a code block and press 'c'
827- select a code block and click on the popup comment icon
828- go to a line, by clicking on it or by key navigation, and press 'c'
829- click on a line number
830
831There are many ways to select code for commenting on it. The most
832frequently used methods are:
833
834- by mouse:
835** click and drag with the mouse to select a block
836** double-click on a word to select it
837** double-click and drag with the mouse to select a code block word-wise
838** triple-click on a line to select it
839** triple-click and drag with the mouse to select a code block line-wise
840
841- by keys (the same keys that are used for visual selection in Vim):
842** press 'v' + arrow keys (or 'h', 'j', 'k', 'l') to select a block
843** press 'V' + arrow keys (or 'j', 'k') to select a code block line-wise
844** type 'bvw' to select a word
845
846Please note that double-click does *not* insert a new comment on a line
847as it used to do in the old side-by-side diff screen; double-click is
848used to select a word for commenting on it.
849
850image::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"]
851
852For typing the new comment, a new comment box is shown under the code
853that is commented.
854
855Clicking on the `Save` button saves the new comment as a draft. To make
856it visible to other users it must be published from the change screen
857by link:#reply[replying] to the change.
858
859Clicking on the `Discard` button deletes the new comment.
860
861image::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"]
862
Edwin Kempin9df27ac2014-05-08 13:06:18 +0200863[[file-level-comments]]
864=== File Level Comments
865
866Comments that apply to a whole file can be added on file level.
867
868File level comments are added by clicking on the comment icon in the
869header above the file.
870
871image::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"]
872
873Clicking on the comment icon opens a comment box for typing the file
874level comment.
875
876image::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"]
877
Edwin Kempinfe8ca4c2014-05-08 16:49:15 +0200878[[diff-preferences]]
879=== Diff Preferences
880
881There are several options to control how patch diffs should be
882rendered. Users can configure their preferences in the diff
883preferences. The diff preferences can be accessed by clicking on the
884settings icon in the screen header.
885
886image::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"]
887
888The diff preferences popup allows to change the diff preferences.
889By clicking on the `Save` button changes to the diff preferences are
890saved permanently. Clicking on the `Apply` button applies the new
891diff preferences to the current screen, but they are discarded when the
892screen is refreshed. The `Save` button is only available if the user is
893signed in.
894
895image::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"]
896
897The following diff preferences can be configured:
898
899- `Theme`:
900+
901Controls the theme that is used to render the file content.
902+
903E.g. users could choose to work with a dark theme.
904+
905image::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"]
906
907- `Ignore Whitespace`:
908+
909Controls whether differences in whitespace should be ignored or not.
910+
911** `None`:
912+
913All differences in whitespace are highlighted.
914+
915** `At Line End`:
916+
917Whitespace differences at the end of lines are ignored.
918+
919** `Leading, At Line End`:
920+
921Whitespace differences at the beginning and end of lines are ignored.
922+
923** `All`:
924+
925All differences in whitespace are ignored.
926
927- `Tab Width`:
928+
929Controls how many spaces should be displayed for a tab.
930
931- `Columns`:
932+
933Sets the preferred line length. At this position a vertical dashed line
934is displayed so that one can easily detect lines the exceed the
935preferred line length.
936+
937image::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"]
938
939- `Lines Of Context`:
940+
941The number of context lines that should be displayed before and after
942any diff. If the `entire file` checkbox is selected, the full file is
943rendered.
944+
945Skipped common lines can be expanded by clicking on the placeholder for
946the skipped lines.
947+
948Clicking on "... skipped <n> common lines ..." expands the complete
949block of skipped lines.
950+
951If many lines are skipped there are additional links to expand the
952context by ten lines before and after the skipped block.
953+
954image::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"]
955
956- `Intraline Difference`:
957+
958Controls whether intraline differences should be highlighted.
959+
960image::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"]
961
962- `Syntax Highlighting`:
963+
964Controls whether syntax highlighting should be enabled.
965+
966The language for the syntax highlighting is automatically detected from
967the file extension.
968+
969image::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"]
970
971- `Whitespace Errors`:
972+
973Controls whether whitespace errors are highlighted.
974
975- `Show Tabs`:
976+
977Controls whether tabs are highlighted.
978
979- `Line Numbers`:
980+
981Controls whether line numbers are shown.
982
983- `Top Menu`:
984+
985Controls whether the top menu is shown.
986
987[[mark-reviewed]]
988- `Mark Reviewed`:
989+
990Controls whether the files of the patch set should be automatically
991marked as reviewed when they are viewed.
992
993[[expand-all-comments]]
994- `Expand All Comments`:
995+
996Controls whether all comments should be automatically expanded.
997
998- `Render`:
999+
1000Controls how patch files that exceed the screen size are rendered.
1001+
1002If `Fast` is selected file contents which are outside of the visible
1003area are not attached to the browser's DOM tree. This makes the
1004rendering fast, but searching by `Ctrl+F` only finds content which is
1005in the visible area.
1006+
1007If `Slow` is selected all file contents are attached to the browser's
1008DOM tree, which makes the rendering slow for large files. The advantage
1009of this setting is that `Ctrl+F` can be used to search in the complete
1010file.
1011
Edwin Kempin4fd84c92014-04-30 13:23:15 +02001012GERRIT
1013------
1014Part of link:index.html[Gerrit Code Review]
1015
1016SEARCHBOX
1017---------