Describe diff preferences in review UI documentation

Change-Id: I61b4692a3f8656ecbbcc2eb31746ba9a0537dbd9
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin 2014-05-08 16:49:15 +02:00
parent d37a134f2f
commit fe8ca4c3ce
7 changed files with 139 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

View File

@ -710,14 +710,12 @@ the Git web browser.
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"]
The checkbox in front of the project name and the file name allows the
patch to be marked as reviewed.
patch to be marked as reviewed. The link:#mark-reviewed[Mark Reviewed]
diff preference allows to control whether the files should be
automatically marked as reviewed when they are viewed.
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"]
Syntax coloring is supported for many languages and file types.
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"]
The scrollbar shows patch diffs and inline comments as annotations.
This provides a good overview of the lines in the patch that are
relevant for reviewing. By clicking on an annotation one can quickly
@ -777,8 +775,8 @@ To link to a line in the old file version, '@a<line-number>' must be
appended to the patch link. These links can be used to directly link to
certain inline comments.
If the diff preference `Expand All Comments` is set to `Expand`, all
inline comments will be automatically expanded.
If the diff preference link:#expand-all-comments[Expand All Comments]
is set to `Expand`, all inline comments will be automatically expanded.
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"]
@ -877,6 +875,140 @@ level comment.
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"]
[[diff-preferences]]
=== Diff Preferences
There are several options to control how patch diffs should be
rendered. Users can configure their preferences in the diff
preferences. The diff preferences can be accessed by clicking on the
settings icon in the screen header.
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"]
The diff preferences popup allows to change the diff preferences.
By clicking on the `Save` button changes to the diff preferences are
saved permanently. Clicking on the `Apply` button applies the new
diff preferences to the current screen, but they are discarded when the
screen is refreshed. The `Save` button is only available if the user is
signed in.
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"]
The following diff preferences can be configured:
- `Theme`:
+
Controls the theme that is used to render the file content.
+
E.g. users could choose to work with a dark theme.
+
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"]
- `Ignore Whitespace`:
+
Controls whether differences in whitespace should be ignored or not.
+
** `None`:
+
All differences in whitespace are highlighted.
+
** `At Line End`:
+
Whitespace differences at the end of lines are ignored.
+
** `Leading, At Line End`:
+
Whitespace differences at the beginning and end of lines are ignored.
+
** `All`:
+
All differences in whitespace are ignored.
- `Tab Width`:
+
Controls how many spaces should be displayed for a tab.
- `Columns`:
+
Sets the preferred line length. At this position a vertical dashed line
is displayed so that one can easily detect lines the exceed the
preferred line length.
+
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"]
- `Lines Of Context`:
+
The number of context lines that should be displayed before and after
any diff. If the `entire file` checkbox is selected, the full file is
rendered.
+
Skipped common lines can be expanded by clicking on the placeholder for
the skipped lines.
+
Clicking on "... skipped <n> common lines ..." expands the complete
block of skipped lines.
+
If many lines are skipped there are additional links to expand the
context by ten lines before and after the skipped block.
+
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"]
- `Intraline Difference`:
+
Controls whether intraline differences should be highlighted.
+
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"]
- `Syntax Highlighting`:
+
Controls whether syntax highlighting should be enabled.
+
The language for the syntax highlighting is automatically detected from
the file extension.
+
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"]
- `Whitespace Errors`:
+
Controls whether whitespace errors are highlighted.
- `Show Tabs`:
+
Controls whether tabs are highlighted.
- `Line Numbers`:
+
Controls whether line numbers are shown.
- `Top Menu`:
+
Controls whether the top menu is shown.
[[mark-reviewed]]
- `Mark Reviewed`:
+
Controls whether the files of the patch set should be automatically
marked as reviewed when they are viewed.
[[expand-all-comments]]
- `Expand All Comments`:
+
Controls whether all comments should be automatically expanded.
- `Render`:
+
Controls how patch files that exceed the screen size are rendered.
+
If `Fast` is selected file contents which are outside of the visible
area are not attached to the browser's DOM tree. This makes the
rendering fast, but searching by `Ctrl+F` only finds content which is
in the visible area.
+
If `Slow` is selected all file contents are attached to the browser's
DOM tree, which makes the rendering slow for large files. The advantage
of this setting is that `Ctrl+F` can be used to search in the complete
file.
GERRIT
------
Part of link:index.html[Gerrit Code Review]