Merge branch 'stable-2.9'

* stable-2.9:
  Describe 'No Differences' label in review UI documentation
  Describe red bar for line gaps in review UI documentation
  Link new review UI documentation from 2.9 release notes
  Add 'View Plugins' global capability that allows to list plugins
  Keep new draft comment expanded if expand all comments is set
  Allow to download reposize.sh script from Gerrit
  Link new review UI documentation from new change screen welcome popup
  Document major differences between old and new review UI
  Describe keyboard shortcuts in review UI documentation
  Describe navigation in patch file in review UI documentation
  Describe Vim-like search in review UI documentation
  Upgrade jgit to v3.4.0.201405051725-m7
  Link 2.8.5 release notes from 2.9 release notes
  Review UI docs: Update screenshot about navigation to show all arrows
  Review UI Docs: Remove note about double-click not adding new comments
  Describe diff preferences in review UI documentation
  Add new screenshot that shows the result after replying with done
  Describe navigation between patches in review UI documentation
  Describe patch set selection and patch download in review UI docs

Conflicts:
	lib/jgit/BUCK

Change-Id: I3b63776c5eed46406c93996b190f968e294f84eb
This commit is contained in:
David Pursehouse 2014-05-12 12:33:42 +09:00
commit b9f568523e
38 changed files with 345 additions and 360 deletions

View File

@ -1311,6 +1311,12 @@ capability allows the granted group to
link:cmd-show-connections.html[look at Gerrit's current connections via ssh].
[[capability_viewPlugins]]
=== View Plugins
Allow viewing the list of installed plugins.
[[capability_viewQueue]]
=== View Queue

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

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: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View File

@ -3,7 +3,6 @@
== Tutorial
. Getting started
.. link:intro-quick.html[A Quick Introduction to Gerrit]
.. link:intro-change-screen.html[A Quick Introduction to the New Change Screen]
.. link:intro-project-owner.html[Project Owner Guide]
.. link:http://source.android.com/submit-patches/workflow[Default Android Workflow] (external)
. Web

View File

@ -1,322 +0,0 @@
= Change Screen - Introduction
As of Gerrit 2.8 the change screen was redesigned from the ground up. The old
change screen is deprecated and will be discontinued in one of the next Gerrit
releases.
The design spirit of the new change screen is simplicity: only one patch set is
presented on the screen. The list of related changes is always visible and
optional elements are moved to pop down boxes.
This is not only a facelift. The main highlights are under the hood:
* Old style RPC calls are replaced by the REST API
* The prettify syntax highlighting library was replaced by CodeMirror
* Automatic refresh of open changes
* Support to download a patch direct in browser: no local repo is needed
* JS API integration: it was never so easy to add change/revision actions or
HTML fragments to the UI from a plugin
This document is intended to help users to switch to the new change screen.
Further information on the topic can be found in the:
link:https://groups.google.com/forum/#!topic/repo-discuss/6Ryz9p6AzgE[
CodeScreen2 thread on the repo-discuss mailing list].
[[configuration]]
== Configuration
The new change screen is activated by default. It can be deactivated
system-wide by changing the link:config-gerrit.html[gerrit.changeScreen]
setting to `OLD_UI`.
Users can switch between the old and new screens by selecting "Old Screen" or
"New Screen" in the "Change View" setting on their user preferences page.
[[switching-between-patch-sets]]
== Switching between patch sets
As already mentioned above, the main difference between the old and the new
change screen is the fact that only one patch set is presented on the screen.
To switch to other patch sets for the given change, the drop down 'Patch Sets'
box is used on the right upper side of the change header. The current selected
patch set and the number of patch sets are shown on the drop down in the form:
"currently active patch set/number of patch sets". To indicate that not the
current patch set is active, change header contains: "Not Current" headline
instead of the change status.
Patch sets are always sorted in descending order. The option to switch between
ascending and reverse patch set sorting order is not supported on the new change
screen.
Key bindings: "n" & "p" to navigate between the patch sets.
[[download-commands]]
== Download commands
The commands to checkout, pull, or cherry-pick a patchset moved to the
'Download' drop down box. Patch files can be downloaded as base64 encoded or
zipped versions. Download-plugin must be installed to see the download actions.
If download plugin is not installed, only patch files hyperlinks are shown.
Change state is cached in browsers, and the change state includes the download
URLs. If the change is modified (e.g. add a message or change a label vote)
the cached state in the browser will be invalidated and the download commands
will update. Another option to invalidate the cache is to use "Ctrl+Shift+R".
[[included-in]]
== Included in
To see the branches a specific change was merged into and the list of the tags
a change was tagged with, use the 'Included In' drop down on the change header,
to the left of the 'Revisions' drop down.
Note that this list is only visible on merged changes.
[[quick-approve]]
== Quick approve
The so called 'Quick approve' button is some times confusing. Normal users (i.e.
non-maintainers) see this as 'Verified+1' button to the right of the 'Reply'
button.
The button is not always "Verified+1". The button appears if a user has
permission to vote the max score in exactly one label that the rules have marked
as NEED.
For a maintainer with both 'Verified+1' and 'Code-Review+2' powers the button
does not appear, as both categories are still marked NEED and the maintainer has
permission to use both. If another maintainer scores 'Code-Review+2', then the
button displays as 'Verified+1'. If a verifier scores 'Verified+1' the button
displays as 'Code-Review+2'.
It is important to note that by design, the user cannot provide a comment when
using this button, hence the name 'Quick approve'. To provide comments, the
'Reply' button should be used.
[[reply-button]]
== Reply button
This button corresponds to the 'Review' button the on patch set panel on the old
change screen. The user can optionally send an email during the vote. Inline
comments are displayed inside of the ReplyBox. Editing them inline in the
ReplyBox is currently not possible.
Hint: if "LGTM" (acronym for 'Looks Good To Me') is typed in the ReplyBox,
then the highest possible score for 'Code-Review' category for logged in user
is selected.
Key bindings: "a" to open the drop down. "ESC" to close it.
[[edit-commit-message]]
== Edit commit message
To edit the commit message use the 'Edit Message' button on the change header,
which will open a drop-down editor box.
Key bindings: "e" to open the drop down. "ESC" to close it.
[[star-change]]
== Star and unstar changes
Star change icon allows to star the change, so that "starredby:self" query can
retrieve the starred changes later. If the change is already starred, then
clicking the icon again unstars the change.
Key bindings: "s" to star/unstar the change.
[[permalink-change]]
== Permalink a change
Hyperlink "Change <change link>" is a control that serves for two purposes:
reload the change and permalink the change. To permalink,
Right mouse click -> Copy Link Address.
Key bindings: "R" to reload the change.
[[edit-change-topic]]
== Edit change topic
To edit the topic use the edit icon to the right of the topic field.
Key bindings: "t" to open the drop down. "ESC" to close it.
[[abandon-restore]]
== Abandon or Restore changes
When a change is abandoned or restored, a panel appears and a comment message
can be provided.
[[working-with-drafts]]
== Working with draft changes and patch sets
When a change or a patch set is a draft, then three additional buttons
appear on the action panel: 'Publish', 'Delete Revision', and 'Delete
Change'. 'Delete Revision' button is only visible when there are at
least two (draft) revisions. In the 'Patch Set' drop down a "(DRAFT)"
suffix is added to the patch set number to indicate that the patch set
is a draft.
[[draft-comments]]
== Highlight draft comments
If a patch set has draft comments that weren't published yet, then that patch
set is marked on the list in the 'Patch Sets' drop down list. In addition a red
"draft" prefix appears on the filenames in the file table.
[[codemirror]]
== CodeMirror
On the user preferences page, 'Side By Side' or 'Unified Diff' view can be
configured. Use the "/" key to start the CodeMirror search, like in 'vim'.
Key bindings are not customizable at the moment. They may be added in the future.
Range comments are supported on CodeMirror's 'Side By Side' screen. Highlight
lines with the mouse and then click the bottom-most line number to create a
range comment for the highlighted lines. It can also be used to select a
region on one line to emphasize what the comment is related to.
Key bindings:
* j / k: next line / previous line
* n / p: next diff chunk / previous diff chunk
* ] / [: next file / previous file
* u: up to change
* c: create a new inline comment (focus has to be in CodeMirror view)
* / or <Ctrl> + f: search in the current file
* <Shift> + o: expand or collapse all comments on current line
* <Enter> or o: expand or collapse comment
* <Esc> or Cancel: comment edit
* i: toggle intraline differences
* ,: Show diff preferences
* <Ctrl> + s: Save draft comment
[[reviewers]]
== Reviewers
Reviewers who actually voted on the change or were added to the change but didn't
vote yet are shown as "chip" in the 'Reviewers' field.
The votes per category are listed above the File list.
To add a reviewer, use the 'Add...' button to the right of the 'Reviewers'
field. Typing into the pop-up text field activates auto completion of user or
group names.
To remove reviewers click on the 'x' icon in the reviewer's "chip".
Votable categories are shown as a tooltip for each reviewer.
Key bindings: "c" to add a reviewer. "ESC" to close the drop down.
[[auto-refresh]]
== Auto refresh of change data
On the new change screen polling for updates to the currently open change is
activated per default. For example, if another user votes or comments on the
same change, then a popup window appears on the bottom right corner of the
screen to notify the user that the change was updated.
The default delay is 30 seconds. It can be configured with the
link:config-gerrit.html[change.updateDelay] setting.
[[related-changes]]
== "Related changes"
A tab control on the third column shows the related changes. There are 4
different tabs:
* Related Changes
This tab page shows changes on which the current change depends (ancestors) and
open changes that depend on the current change (descendants). For merge commits
it shows also the closed changes that are going to be merged into the
destination branch by accepting the merge commit. It is kind of a dependency
too, but not in the sense of "these changes have to be submitted in order to
submit this change".
Unlike the old change screen it doesn't explicitly say "needed by" and "depends
on" any more, but the relationship can still be inferred from the position of
the change in the list. Changes listed above the current change are dependents;
changes below the current change are dependencies.
Indicators are appended on the commit message headlines of related changes to
signify dependencies on outdated changes, or commits that are not associated to
changes under review:
If the selected patch set of a change is older than its latest patch set,
the change is marked with an orange dot.
If a descendant change depends on a patch set that is older than the selected
patch set of a change, the descendent change is marked with a tilde (~).
If an ancestor commit is not associated to a Gerrit change, i.e. has been pushed
directly to the repository bypassing review, it is marked with a black dot.
This tab is only visible if related changes for the current active
change exist.
* Same Topic Changes
Changes that share the same topic are listed on this tab page. Only changes
in status opened are currently shown.
This tab is only visible if same topic changes for the current active
change exist.
* Cherry-Picks Changes
Changes with the same change id for the current project are listed on this
tab page. Note that also abandoned or merged changes can be shown. Currently
the status of the listed changes is not shown.
This tab is only visible if cherry-picked changes for the current active
change exist.
* Conflicts With Changes
Changes that are conflicting with the current change are listed on this
tab. Only the changes that are mergeable are currently shown. Non mergeable
changes are filtered out.
This tab is only visible if there are conflicting changes with the
current change.
Key bindings: "J" & "K" to navigate between the related changes. "O" to
open the currently selected change on one of the related changes tab page.
[[file-table]]
== File table
The user can now manually toggle the 'reviewed' flag per file using the check
box to the left of the filename.
Key bindings: "j" & "k" to navigate in the file table, "r" to toggle the
'reviewed' flag, and "o" or "Enter" to open diff in CodeMirror or unified diff
view.
[[diff-against]]
== Diff against
In the 'Diff against' dropdown, base reference version can be selected. On
selecting an entry the file table list is reloaded and shows only the files
that were changed compared to this reference version. The selected revision
is passed to the side by side view, so that code mirror windows "remember"
the base reference version choice made on the change screen.
[[history]]
== History
The history table shows change messages and inline file comments. Expand All and
Collapse All buttons show/hide the messages.
Key bindings: "x" expands all messages, "z" collapses them again.
GERRIT
------
Part of link:index.html[Gerrit Code Review]
SEARCHBOX
---------

View File

@ -688,9 +688,16 @@ stays intact; signed tags will lose their signature):
If a link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
limit] is configured on the server you may need to remove large objects
from the history before you are able to push. To find large objects in
the history of your project you can use the
link:https://gerrit.googlesource.com/gerrit/+/master/contrib/reposize.sh[
reposize.sh] script from Gerrit's `contrib` folder. You can then use the
the history of your project you can use the `reposize.sh` script which
you can download from Gerrit:
$ curl -Lo reposize.sh http://review.example.com:8080/tools/scripts/reposize.sh
or
$ scp -p -P 29418 john.doe@review.example.com:scripts/reposize.sh .
You can then use the
link:https://www.kernel.org/pub/software/scm/git/docs/git-filter-branch.html[
git filter-branch] command to remove the large objects from the history
of all branches:

View File

@ -659,6 +659,7 @@ Administrator that has authenticated with digest authentication:
"viewCaches": true,
"flushCaches": true,
"viewConnections": true,
"viewPlugins": true,
"viewQueue": true,
"runGC": true
}
@ -1145,6 +1146,8 @@ link:access-control.html#capability_viewCaches[View Caches] capability.
|`viewConnections` |not set if `false`|Whether the user has the
link:access-control.html#capability_viewConnections[View Connections]
capability.
|`viewPlugins` |not set if `false`|Whether the user has the
link:access-control.html#capability_viewPlugins[View Plugins] capability.
|`viewQueue` |not set if `false`|Whether the user has the
link:access-control.html#capability_viewQueue[View Queue] capability.
|=================================

View File

@ -126,6 +126,11 @@ The entries in the map are sorted by capability ID.
"id": "viewConnections",
"name": "View Connections"
},
"viewPlugins": {
"kind": "gerritcodereview#capability",
"id": "viewPlugins",
"name": "View Plugins"
},
"viewQueue": {
"kind": "gerritcodereview#capability",
"id": "viewQueue",

View File

@ -78,10 +78,6 @@ results.
"title": "Gerrit Code Review - Hooks",
"url": "Documentation/config-hooks.html"
},
{
"title": "Change Screen - Introduction",
"url": "Documentation/intro-change-screen.html"
},
{
"title": "Gerrit Code Review - /groups/ REST API",
"url": "Documentation/rest-api-groups.html"

View File

@ -23,6 +23,10 @@ namespace.
Lists the plugins installed on the Gerrit server. Only the enabled
plugins are returned unless the `all` option is specified.
To be allowed to see the installed plugins, a user must be a member of
a group that is granted the 'View Plugins' capability or the
'Administrate Server' capability.
As result a map is returned that maps the plugin IDs to
link:#plugin-info[PluginInfo] entries. The entries in the map are sorted
by plugin ID.

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
@ -725,6 +723,50 @@ navigate to the corresponding line in the patch.
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"]
A gap between lines in the file content that is caused by aligning the
left and right side or by displaying inline comments is shown as a
vertical red bar in the line number column. This prevents a gap from
being mistaken for blank lines in the file
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"]
[[patch-set-selection]]
In the header, on each side, the list of patch sets is shown. Clicking
on a patch set changes the selection for the patch set comparison and
the screen is refreshed to show the diff between the selected patch
sets. The currently selected patch set is highlighted by a light blue
background.
On the left side `Base` can be selected to compare a patch set against
its base. For merge commits `Auto Merge` is available instead which
allows to compare the patch against the result of the auto merge. The
auto merge version may contain Git conflict markers and is useful for
reviewing how conflicts are resolved by a patch.
Reviewers that are reviewing a patch for the first time look at its
diff against its base; reviewers that have reviewed an old patch
version before, may see what has changed since that version by
comparing the old patch against the current patch.
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"]
If the compared patches are identical, this is highlighted by a red
`No Differences` label in the screen header.
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"]
The download icon next to the patch set list allows to download the
patch. Unless the mime type of the file is configured as safe, the
download file is a zip archive that contains the patch file.
For navigating between the patches in a patch set there are navigation
buttons on the right side of the screen header. The left arrow button
navigates to the previous patch; the right arrow button navigates to
the next patch. The arrow up button leads back to the change screen. In
all cases the selection for the patch set comparison is kept.
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"]
[[inline-comments]]
=== Inline Comments
@ -745,8 +787,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"]
@ -788,14 +830,15 @@ Clicking on the `Done` button is a quick way to reply with "Done" to a
comment. This is used to mark a comment as addressed by a follow-up
patch set.
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"]
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"]
[[add-inline-comment]]
To add a new inline comment there are several possibilities:
- select a code block and press 'c'
- select a code block and click on the popup comment icon
- go to a line, by clicking on it or by key navigation, and press 'c'
- go to a line, by clicking on it or by link:#key-navigation[key
navigation], and press 'c'
- click on a line number
There are many ways to select code for commenting on it. The most
@ -813,10 +856,6 @@ frequently used methods are:
** press 'V' + arrow keys (or 'j', 'k') to select a code block line-wise
** type 'bvw' to select a word
Please note that double-click does *not* insert a new comment on a line
as it used to do in the old side-by-side diff screen; double-click is
used to select a word for commenting on it.
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"]
For typing the new comment, a new comment box is shown under the code
@ -845,6 +884,218 @@ 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"]
[[search]]
=== Search
For searching within a patch file, a Vim-like search is supported.
Typing `/` opens the search box. Typing in the search box immediately
highlights matches in the patch file with a yellow background. Using
JavaScript regular expressions in the search term is supported. The
search is case insensitive. After confirming the search by `ENTER` one
can navigate between the matches by `n` / `N` to go to the next /
previous match. Skipped lines are automatically expanded if they
contain a match and one navigates to it.
For additional possibilities to search please check the
link:http://www.vim.org/docs.php[Vim documentation]. There are other
useful ways to search, e.g. while the cursor is on a word, pressing `*`
or `#` searches for the next or previous occurrence of the word.
Searching by `Ctrl-F` finds matches only in the visible area of the
screen unless the link:#render[Render] diff preference is set to `Slow`.
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"]
[[key-navigation]]
=== Key Navigation
Vim-like commands can be used to navigate within a patch file:
- `h` / `j` / `k` / `l` moves the cursor left / down / up / right
- `0` / `$` moves the cursor to the start / end of the line
- `gg` / `G` moves to cursor to the start / end of the file
- `Ctrl-D` / `Ctrl-U` scolls downwards / upwards
Please check the link:http://www.vim.org/docs.php[Vim documentation]
for further information.
[[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.
[[keyboard-shortcuts]]
== Keyboard Shortcuts
Navigation within the review UI can be completely done by keys, and
most actions can be controlled by keyboard shortcuts. Typing `?` opens
a popup that shows a list of available keyboard shortcuts:
- Change Screen
+
image::images/user-review-ui-change-screen-keyboard-shortcuts.png[width=800, link="images/user-review-ui-change-screen-keyboard-shortcuts.png"]
- Side-by-Side Diff Screen
+
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"]
+
In addition, Vim-like commands can be used to link:#key-navigation[
navigate] and link:#search[search] within a patch file.
[[new-vs-old]]
== New Review UI vs. Old Review UI
There are some important conceptual differences between the old and
new review UIs:
- The old change screen directly shows all patch sets of the change.
With the new change screen only a single patch set is displayed;
users can switch between the patch sets by choosing another patch
set from the link:#patch-sets[Patch Sets] drop down panel in the
screen header.
- On the old side-by-side diff screen, new comments are inserted by
double-clicking on a line. With the new side-by-side diff screen
double-click is used to select a word for commenting on it; there
are link:#add-inline-comment[several ways to insert new comments],
e.g. by selecting a code block and clicking on the popup comment
icon.
Limitations of the new review UI:
- The new side-by-side diff screen cannot render images.
Users preferring the old review UI can link:#old-change-screen[
configure the change view] in their preferences.
GERRIT
------
Part of link:index.html[Gerrit Code Review]

View File

@ -13,8 +13,9 @@ As of Gerrit 2.9, Java 1.7 is required.
Gerrit 2.9 includes the bug fixes done with
link:ReleaseNotes-2.8.1.html[Gerrit 2.8.1],
link:ReleaseNotes-2.8.2.html[Gerrit 2.8.2],
link:ReleaseNotes-2.8.3.html[Gerrit 2.8.3], and
link:ReleaseNotes-2.8.4.html[Gerrit 2.8.4].
link:ReleaseNotes-2.8.3.html[Gerrit 2.8.3],
link:ReleaseNotes-2.8.4.html[Gerrit 2.8.4], and
link:ReleaseNotes-2.8.5.html[Gerrit 2.8.5].
These bug fixes are *not* listed in these release notes.
Schema Change
@ -36,6 +37,18 @@ Release Highlights
------------------
* The new change screen is now the default change screen.
+
The
link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/user-review-ui.html[
documentation of the new review UI] describes the new screens in detail
and highlights the important functionality with screenshots.
+
Users that are accessing the new change screen for the first time are
informed about the new change screen by a welcome popup. The welcome
popup links to the review UI documentation and allows users to go back
to the old change screen.
* 'Gerrit Inspector' for interactive inspection and troubleshooting of a running
Gerrit instance.

View File

@ -32,6 +32,7 @@ class CapabilityInfo {
public boolean viewAllAccounts;
public boolean viewCaches;
public boolean viewConnections;
public boolean viewPlugins;
public boolean viewQueue;
static class QueryLimit {

View File

@ -88,6 +88,9 @@ public class GlobalCapability {
/** Can view open connections to the server's SSH port. */
public static final String VIEW_CONNECTIONS = "viewConnections";
/** Can view all installed plugins. */
public static final String VIEW_PLUGINS = "viewPlugins";
/** Can view all pending tasks in the queue (not just the filtered set). */
public static final String VIEW_QUEUE = "viewQueue";
@ -112,6 +115,7 @@ public class GlobalCapability {
NAMES_ALL.add(VIEW_ALL_ACCOUNTS);
NAMES_ALL.add(VIEW_CACHES);
NAMES_ALL.add(VIEW_CONNECTIONS);
NAMES_ALL.add(VIEW_PLUGINS);
NAMES_ALL.add(VIEW_QUEUE);
NAMES_LC = new ArrayList<>(NAMES_ALL.size());

View File

@ -14,9 +14,9 @@
package com.google.gerrit.client;
import static com.google.gerrit.common.data.GlobalCapability.ADMINISTRATE_SERVER;
import static com.google.gerrit.common.data.GlobalCapability.CREATE_GROUP;
import static com.google.gerrit.common.data.GlobalCapability.CREATE_PROJECT;
import static com.google.gerrit.common.data.GlobalCapability.VIEW_PLUGINS;
import com.google.gerrit.client.account.AccountApi;
import com.google.gerrit.client.account.AccountCapabilities;
@ -671,14 +671,14 @@ public class Gerrit implements EntryPoint {
PageLinks.ADMIN_CREATE_GROUP,
peopleBar.getWidgetIndex(groupsListMenuItem) + 1);
}
if (result.canPerform(ADMINISTRATE_SERVER)) {
if (result.canPerform(VIEW_PLUGINS)) {
insertLink(pluginsBar, C.menuPluginsInstalled(),
PageLinks.ADMIN_PLUGINS, 0);
menuLeft.insert(pluginsBar, C.menuPlugins(),
menuLeft.getWidgetIndex(peopleBar) + 1);
}
}
}, CREATE_PROJECT, CREATE_GROUP, ADMINISTRATE_SERVER);
}, CREATE_PROJECT, CREATE_GROUP, VIEW_PLUGINS);
}
if (getConfig().isDocumentationAvailable()) {

View File

@ -57,7 +57,7 @@ limitations under the License.
<div><ui:msg><span class='{style.welcome}'>Welcome to the new change screen!</span>
<a ui:field='docs'
class='{style.action}'
href='Documentation/intro-change-screen.html'
href='Documentation/user-review-ui.html'
target='_blank'>Learn more</a></ui:msg>
</div>
<div>

View File

@ -51,6 +51,7 @@ class CommentManager {
private final SortedMap<Integer, CommentGroup> sideB;
private final Set<DraftBox> unsavedDrafts;
private boolean attached;
private boolean expandAll;
CommentManager(SideBySide2 host,
PatchSet.Id base, PatchSet.Id revision,
@ -73,6 +74,7 @@ class CommentManager {
}
void setExpandAllComments(boolean b) {
expandAll = b;
for (CommentGroup g : sideA.values()) {
g.setOpenAll(b);
}
@ -210,7 +212,8 @@ class CommentManager {
group,
commentLinkProcessor,
getPatchSetIdFromSide(side),
info);
info,
expandAll);
if (info.in_reply_to() != null) {
PublishedBox r = published.get(info.in_reply_to());

View File

@ -59,6 +59,7 @@ class DraftBox extends CommentBox {
private final CommentLinkProcessor linkProcessor;
private final PatchSet.Id psId;
private final boolean expandAll;
private CommentInfo comment;
private PublishedBox replyToBox;
private Timer expandTimer;
@ -86,11 +87,13 @@ class DraftBox extends CommentBox {
CommentGroup group,
CommentLinkProcessor clp,
PatchSet.Id id,
CommentInfo info) {
CommentInfo info,
boolean expandAllComments) {
super(group, info.range());
linkProcessor = clp;
psId = id;
expandAll = expandAllComments;
initWidget(uiBinder.createAndBindUi(this));
expandTimer = new Timer() {
@ -131,7 +134,7 @@ class DraftBox extends CommentBox {
}
private void set(CommentInfo info) {
autoClosed = info.message() != null && info.message().length() < 70;
autoClosed = !expandAll && info.message() != null && info.message().length() < 70;
date.setInnerText(FormatUtil.shortFormatDayTime(info.updated()));
if (info.message() != null) {
String msg = info.message().trim();

View File

@ -134,6 +134,12 @@ public class CapabilityControl {
|| canAdministrateServer();
}
/** @return true if the user can view the installed plugins. */
public boolean canViewPlugins() {
return canPerform(GlobalCapability.VIEW_PLUGINS)
|| canAdministrateServer();
}
/** @return true if the user can view the entire queue. */
public boolean canViewQueue() {
return canPerform(GlobalCapability.VIEW_QUEUE)

View File

@ -27,6 +27,7 @@ import static com.google.gerrit.common.data.GlobalCapability.STREAM_EVENTS;
import static com.google.gerrit.common.data.GlobalCapability.VIEW_ALL_ACCOUNTS;
import static com.google.gerrit.common.data.GlobalCapability.VIEW_CACHES;
import static com.google.gerrit.common.data.GlobalCapability.VIEW_CONNECTIONS;
import static com.google.gerrit.common.data.GlobalCapability.VIEW_PLUGINS;
import static com.google.gerrit.common.data.GlobalCapability.VIEW_QUEUE;
import com.google.common.collect.Iterables;
@ -117,6 +118,7 @@ class GetCapabilities implements RestReadView<AccountResource> {
have.put(VIEW_ALL_ACCOUNTS, cc.canViewAllAccounts());
have.put(VIEW_CACHES, cc.canViewCaches());
have.put(VIEW_CONNECTIONS, cc.canViewConnections());
have.put(VIEW_PLUGINS, cc.canViewPlugins());
have.put(VIEW_QUEUE, cc.canViewQueue());
QueueProvider.QueueType queue = cc.getQueueType();

View File

@ -38,5 +38,6 @@ public class CapabilityConstants extends TranslationBundle {
public String viewAllAccounts;
public String viewCaches;
public String viewConnections;
public String viewPlugins;
public String viewQueue;
}

View File

@ -40,7 +40,7 @@ import java.util.List;
import java.util.Map;
/** List the installed plugins. */
@RequiresCapability(GlobalCapability.ADMINISTRATE_SERVER)
@RequiresCapability(GlobalCapability.VIEW_PLUGINS)
public class ListPlugins implements RestReadView<TopLevelResource> {
private final PluginLoader pluginLoader;

View File

@ -14,4 +14,5 @@ streamEvents = Stream Events
viewAllAccounts = View All Accounts
viewCaches = View Caches
viewConnections = View Connections
viewPlugins = View Plugins
viewQueue = View Queue

View File

@ -4,3 +4,5 @@
755 bin/gerrit-cherry-pick
755 hooks/commit-msg
755 scripts/reposize.sh

View File

@ -1,13 +1,13 @@
include_defs('//lib/maven.defs')
REPO = GERRIT
VERS = '3.3.1.201403241930-r.80-gd5110c3'
REPO = ECLIPSE
VERS = '3.4.0.201405051725-m7'
maven_jar(
name = 'jgit',
id = 'org.eclipse.jgit:org.eclipse.jgit:' + VERS,
bin_sha1 = 'fe38387f8a5079d660aad075cc80cfa39d269c38',
src_sha1 = '37196e15fa8e348c5073f7469da294e5285f05d9',
bin_sha1 = '421e66466c7946b8f5e5a841297fe44d2071ab88',
src_sha1 = '281dd1817e53814ee055e346d572f687688a8463',
license = 'jgit',
repository = REPO,
unsign = True,
@ -22,7 +22,7 @@ maven_jar(
maven_jar(
name = 'jgit-servlet',
id = 'org.eclipse.jgit:org.eclipse.jgit.http.server:' + VERS,
sha1 = 'f0d8a1e8abca55a5723fbd595dd63992f16dea5a',
sha1 = 'ff19ad93a4e710abcd0a9cce4c388c8b3a3c8b50',
license = 'jgit',
repository = REPO,
deps = [':jgit'],
@ -36,7 +36,7 @@ maven_jar(
maven_jar(
name = 'jgit-archive',
id = 'org.eclipse.jgit:org.eclipse.jgit.archive:' + VERS,
sha1 = 'e2938053672294e05ee540dcdb7fe57b4b7d6303',
sha1 = '647142e1faad38b4d6d4c4922dce83d890a03c0a',
license = 'jgit',
repository = REPO,
deps = [':jgit',
@ -53,7 +53,7 @@ maven_jar(
maven_jar(
name = 'junit',
id = 'org.eclipse.jgit:org.eclipse.jgit.junit:' + VERS,
sha1 = 'd9806c9bc9dac5c8f12f5c5b2b48f390c992ce32',
sha1 = 'd6878be134e7dfb7f8e96a537d60f0ec7f637833',
license = 'DO_NOT_DISTRIBUTE',
repository = REPO,
unsign = True,