Skip to content

Commit 89f4593

Browse files
authored
Document PR file tree view
1 parent b6e4ed3 commit 89f4593

File tree

4 files changed

+32
-2
lines changed

4 files changed

+32
-2
lines changed
Loading

content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Filtering files in a pull request
3-
intro: 'To help you quickly review changes in a large pull request, you can filter changed files.'
3+
intro: 'To help you quickly review changes in a large pull request, you can filter changed files{% if pr-tree-view %} or use the file tree to navigate between files{% endif %}.'
44
redirect_from:
55
- /github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request
66
- /articles/filtering-files-in-a-pull-request-by-file-type
@@ -16,7 +16,9 @@ topics:
1616
- Pull requests
1717
shortTitle: Filter files
1818
---
19-
You can filter files in a pull request by file extension type, such as `.html` or `.js`, lack of an extension, code ownership, or dotfiles.
19+
You can filter files in a pull request by file extension type, such as `.html` or `.js`, lack of an extension, code ownership, or dotfiles.{% if pr-tree-view %} You can also use the file tree to filter by file path, navigate between files, or see a high level view of the changed files.{% endif %}
20+
21+
## Using the file filter dropdown
2022

2123
{% tip %}
2224

@@ -32,6 +34,26 @@ You can filter files in a pull request by file extension type, such as `.html` o
3234
5. Optionally, to clear the filter selection, under the **Files changed** tab, click **Clear**.
3335
![Clear file filter selection](/assets/images/help/pull_requests/clear-file-filter.png)
3436

37+
{% if pr-tree-view %}
38+
## Using the file tree
39+
40+
{% data reusables.repositories.sidebar-pr %}
41+
1. In the list of pull requests, click the pull request you'd like to filter.
42+
{% data reusables.repositories.changed-files %}
43+
1. If the file tree is hidden, click **Show file tree** to display the file tree.
44+
45+
{% note %}
46+
47+
**Note**: The file tree will not display if your screen width is too narrow or if the pull request only includes one file.
48+
49+
{% endnote %}
50+
51+
1. Click on a file in the file tree to view the corresponding file diff.
52+
![Pull request file tree](/assets/images/help/pull_requests/pr-file-tree.png)
53+
1. To filter by file path, enter part or all of the file path in the **Filter changed files** search box. Alternatively, use the file filter dropdown. For more information, see "[Using the file filter dropdown](#using-the-file-filter-dropdown)."
54+
55+
{% endif %}
56+
3557
## Further reading
3658

3759
- "[About comparing branches in a pull request](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-comparing-branches-in-pull-requests)"

content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ You can review changes in a pull request one file at a time. While reviewing the
3636

3737
You can also choose to hide whitespace differences. The choice you make only applies to this pull request and will be remembered the next time you visit this page.
3838
{% endif %}
39+
1. Optionally, filter the files to show only the files you want to review{% if pr-tree-view %} or use the file tree to navigate to a specific file{% endif %}. For more information, see "[Filtering files in a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request)."
3940
{% data reusables.repositories.start-line-comment %}
4041
{% data reusables.repositories.type-line-comment %}
4142
{% data reusables.repositories.suggest-changes %}

data/features/pr-tree-view.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Issue 5892
2+
# PR file tree view
3+
versions:
4+
fpt: '*'
5+
ghec: '*'
6+
ghes: '>=3.5'
7+
ghae: 'issue-5892'

0 commit comments

Comments
 (0)