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