Skip to content

Commit

Permalink
Document PR file tree view
Browse files Browse the repository at this point in the history
  • Loading branch information
skedwards88 authored Mar 3, 2022
1 parent b6e4ed3 commit 89f4593
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 %}

Expand All @@ -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**.
![Clear file filter selection](/assets/images/help/pull_requests/clear-file-filter.png)

{% 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.
![Pull request file tree](/assets/images/help/pull_requests/pr-file-tree.png)
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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
7 changes: 7 additions & 0 deletions data/features/pr-tree-view.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Issue 5892
# PR file tree view
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.5'
ghae: 'issue-5892'

0 comments on commit 89f4593

Please sign in to comment.