Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 3ff9662

Browse files
smashwilsonvanessayuennkuychaco
committed
Document using a "PullRequestReviewsItem" for review navigation.
Co-Authored-By: Vanessa Yuen <[email protected]> Co-Authored-By: Katrina Uychaco <[email protected]>
1 parent 91dac9a commit 3ff9662

File tree

1 file changed

+39
-25
lines changed

1 file changed

+39
-25
lines changed

docs/feature-requests/003-pull-request-review.md

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Peer review is also a critical part of the path to acceptance for pull requests
2626
![center pane](https://user-images.githubusercontent.com/378023/46985265-75c9fe00-d124-11e8-9b34-572cd1aaf701.png)
2727

2828
* Clicking a pull request in the list opens a `PullRequestDetailItem` in the workspace center.
29-
29+
* Clicking the "Reviews" label or progress bar opens a `PullRequestReviewsItem` in the right dock.
3030

3131
### PullRequestDetailItem
3232

@@ -38,14 +38,15 @@ At the top of each `PullRequestDetailItem` is a summary about the pull request,
3838

3939
- Overview
4040
- Files (**new**)
41-
- Reviews (**new**)
4241
- Commits
4342
- Build Status
4443

45-
Below the tabs is a "tools bar" for controls to toggle review comments or collapse files.
44+
Below the tabs is a "tools bar" with controls to toggle review comments or collapse files.
4645

4746
#### Footer
4847

48+
> TODO: Add "open" button
49+
4950
![reviews panel](https://user-images.githubusercontent.com/378023/46536010-17ad4780-c8e8-11e8-8338-338bb592efc5.png)
5051

5152
A panel at the bottom of the pane shows the progress for resolved review comments. It also has a "Review Changes" button to create a new review. This panel is persistent throughout all sub-views. It allows creating new reviews no matter where you are. Below examples with the existing sub-views:
@@ -54,6 +55,7 @@ Overview | Commits | Build Status
5455
--- | --- | ---
5556
![overview](https://user-images.githubusercontent.com/378023/46535907-ca30da80-c8e7-11e8-9401-2b8660d56c25.png) | ![commits](https://user-images.githubusercontent.com/378023/46535908-ca30da80-c8e7-11e8-87ca-01637f2554b6.png) | ![build status](https://user-images.githubusercontent.com/378023/46535909-cac97100-c8e7-11e8-8813-47fdaa3ece57.png)
5657

58+
When the pull request is checked out, an "open" button is shown in the review footer. Clicking "open" opens a `PullRequestReviewsItem` for this pull request's review comments as an item in the right workspace dock.
5759

5860
### Files (tab)
5961

@@ -70,26 +72,6 @@ Uncollapsed (default) | Collapsed
7072

7173
* For large diffs, the files can be collapsed to get a better overview.
7274

73-
74-
### Reviews (tab)
75-
76-
Clicking on the "Reviews" tab shows all reviews of a pull request. This is akin to the review summaries that appear on the "Conversation" tab on dotcom. In addition, each review also includes review comments and their diff.
77-
78-
![reviews](https://user-images.githubusercontent.com/378023/46535563-c81a4c00-c8e6-11e8-9c0b-6ea575556101.png)
79-
80-
Uncollapsed (default) | Collapsed
81-
--- | ---
82-
![reviews](https://user-images.githubusercontent.com/378023/46535563-c81a4c00-c8e6-11e8-9c0b-6ea575556101.png) | ![collapsed reviews](https://user-images.githubusercontent.com/378023/46926357-62a72780-d06b-11e8-9344-23389d1c727c.png)
83-
84-
* Comments can be collapsed to get a better overview.
85-
* Reviews get sorted by "urgency". Showing reviews that still need to get adressed at the top:
86-
1. "recommended" changes
87-
2. "commented" changes
88-
3. "no review" (when a reviewer only leaves review comments, but no summary)
89-
4. "approved" changes
90-
5. "previous" reviews (when a reviewer made an earlier review and it's now out-dated)
91-
* Within each group, sorting is done by "newest first".
92-
9375
#### Create a new review
9476

9577
##### `+` Button
@@ -131,7 +113,39 @@ Clicking "Finish your review" from a comment or clicking "Review Changes" in the
131113
* Review comments can be resolved by clicking on the "Resolve conversation" buttons.
132114
* If the "reply..." editor has non-whitespace content, it is submitted as a final comment first.
133115

134-
#### Context and navigation
116+
### PullRequestReviewsItem
117+
118+
This item is opened in the workspace's right dock when the user:
119+
120+
* Clicks the review progress bar in the GitHub tab.
121+
* Clicks the "open" button on the review summary footer of a `PullRequestDetailItem`.
122+
* Clicks the "<>" button on a review comment in the "Files" tab of a `PullRequestDetailItem`.
123+
124+
It shows a scrollable view of all of the reviews and comments associated with a specific pull request,
125+
126+
> TODO: Illustration for the PullRequestReviewsItem
127+
128+
Reviews are sorted by "urgency," showing reviews that still need to be addressed at the top. Within each group, sorting is done by "newest first".
129+
130+
1. "recommended" changes
131+
2. "commented" changes
132+
3. "no review" (when a reviewer only leaves review comments, but no summary)
133+
4. "approved" changes
134+
5. "previous" reviews (when a reviewer made an earlier review and it's now out-dated)
135+
136+
Clicking on a review summary comment expands or collapses the associated review comments.
137+
138+
Clicking on a review comment opens a `TextEditor` on the corresponding position of the file under review. The clicked review comment is highlighted as the "current" one.
139+
140+
#### Within an open TextEditor
141+
142+
If an open `TextEditor` corresponds to a file that has one or more review comments in an open `PullRequestReviewsItem`, gutter and line decorations are added to the lines that match those review comment positions. The "current" one is styled differently to stand out.
143+
144+
> TODO: Illustrate the "review comment here" gutter and line decorations
145+
146+
Clicking on the gutter icon reveals the `PullRequestReviewsItem` and highlights that review comment as the "current" one, scrolling to it and expanding its review if necessary.
147+
148+
### Context and navigation
135149

136150
Review comments are shown in 3 different places. The comments themselves have the same functionality, but allow the comment to be seen in a different context, depending on different use cases. For example "reviewing a pull request", "addressing feedback", "editing the entire file".
137151

@@ -145,7 +159,7 @@ In order to navigate between comments or switch context, each comment has the fo
145159

146160
* Clicking on the `<>` button in a review comment shows the comment in the entire file. If possible, the scroll-position is retained. This allows to quickly get more context about the code.
147161
* If the current pull request is not checked out, the `<>` button is disabled, and a tooltip prompts the user to check out the pull request to edit the source.
148-
* Clicking on the "sandwich" button shows the comment under the "Reviews" tab.
162+
* Clicking on the "sandwich" button shows the comment in the corresponding `PullRequestReviewsItem`.
149163
* Clicking on the "file-+" button (not shown in above screenshot) shows the comment under the "Files" tab.
150164
* The up and down arrow buttons navigate to the next and previous unresolved review comments.
151165
* Reaction emoji may be added to each comment with the "emoji" button. Existing emoji reaction tallies are included beneath each comment.

0 commit comments

Comments
 (0)