Document PR file tree view
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Filtering files in a pull request
|
||||
intro: 'To help you quickly review changes in a large pull request, you can filter changed files.'
|
||||
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 %}.'
|
||||
redirect_from:
|
||||
- /github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request
|
||||
- /articles/filtering-files-in-a-pull-request-by-file-type
|
||||
@@ -16,7 +16,9 @@ topics:
|
||||
- Pull requests
|
||||
shortTitle: Filter files
|
||||
---
|
||||
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.
|
||||
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 %}
|
||||
|
||||
## Using the file filter dropdown
|
||||
|
||||
{% tip %}
|
||||
|
||||
@@ -32,6 +34,26 @@ You can filter files in a pull request by file extension type, such as `.html` o
|
||||
5. Optionally, to clear the filter selection, under the **Files changed** tab, click **Clear**.
|
||||

|
||||
|
||||
{% if pr-tree-view %}
|
||||
## Using the file tree
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
1. In the list of pull requests, click the pull request you'd like to filter.
|
||||
{% data reusables.repositories.changed-files %}
|
||||
1. If the file tree is hidden, click **Show file tree** to display the file tree.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: The file tree will not display if your screen width is too narrow or if the pull request only includes one file.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
1. Click on a file in the file tree to view the corresponding file diff.
|
||||

|
||||
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)."
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[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)"
|
||||
|
||||
@@ -36,6 +36,7 @@ You can review changes in a pull request one file at a time. While reviewing the
|
||||
|
||||
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.
|
||||
{% endif %}
|
||||
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)."
|
||||
{% data reusables.repositories.start-line-comment %}
|
||||
{% data reusables.repositories.type-line-comment %}
|
||||
{% data reusables.repositories.suggest-changes %}
|
||||
|
||||
Reference in New Issue
Block a user