Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree view in Pull Requests, similar to GitLab/GitHub/Azure DevOps #18192

Closed
nunoperalta opened this issue Jan 6, 2022 · 16 comments · Fixed by #21012
Closed

Tree view in Pull Requests, similar to GitLab/GitHub/Azure DevOps #18192

nunoperalta opened this issue Jan 6, 2022 · 16 comments · Fixed by #21012
Labels
topic/ui Change the appearance of the Gitea UI topic/ui-interaction Change the process how users use Gitea instead of the visual appearance type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@nunoperalta
Copy link

nunoperalta commented Jan 6, 2022

Feature Description

The current way Gitea shows the file changes on a Pull Request (whether in Preview/Simulation or when the PR is created), to me feels disorganized and hard to review, as it shows ALL files in the same page.
For big PRs, this gets really messy/hard.

I actually feel very comfortable reviewing PRs using Azure DevOps, as they show a tree of the files changed (organized by affected folders), so that we can review one by one, by clicking on the file we want to review, and it will show the whole file on the right side, with the changes.

https://docs.microsoft.com/en-us/azure/devops/repos/git/review-pull-requests?view=azure-devops&tabs=browser

Screenshots

image-12

image-13

--

sshot-2022-01-06-00-46-37-1

pull-request-all-changes-dropdown

@lunny
Copy link
Member

lunny commented Jan 6, 2022

We have one, but in the top.

image

@6543
Copy link
Member

6543 commented Jan 6, 2022

wasn't there a plugin out in the wild for github that also support gitea??

@wxiaoguang
Copy link
Contributor

We have one, but in the top.

Does Gite has a tree view? I think the author means the left tree for file list, it's more friendly and easier to use.

@lunny
Copy link
Member

lunny commented Jan 6, 2022

We have one, but in the top.

Does Gite has a tree view? I think the author means the left tree for file list, it's more friendly and easier to use.

We have a file list on the top of the files view.

@nunoperalta
Copy link
Author

We have one, but in the top.

image

Hey
Thanks for the reply.

I'm not sure I understand what you mean (or what your screenshot is showing).

There just seems to be plain text with the stats, and each box below has the name of the file.
But I don't find anywhere an organized Tree of files, which I can click to see that file individually.

Similar to using VS Code, opening a file from the File Explorer at the left side, and the contents appear on the right side.
But the Tree / File Explorer only contains the changed files,
and the left side would either contain a Split View or Unified View of differences.

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jan 6, 2022
@qm012
Copy link

qm012 commented Mar 5, 2022

expectation plus this need

@nunoperalta
Copy link
Author

btw, GitHub is implementing that. It's available under "Feature preview", although I'm not seeing the new version yet (even if enabled).

But here's the image in the "Feature preview" area:

152002241-026a1fb8-897c-4653-a64d-f4b328574ba0

@nunoperalta
Copy link
Author

Ah -- it's appearing to me now!!

Here's an example for this PR: https://github.com/go-gitea/gitea/pull/19007/files

sshot-2022-03-05-15-36-52-1

sshot-2022-03-05-15-37-29-1

@lunny
Copy link
Member

lunny commented Mar 6, 2022

As a workaround, you can use some chrome extensions, i.e. git-master

@delvh
Copy link
Member

delvh commented Mar 30, 2022

I have a suggestion for the icons:
While I do find it useful to display icons showing whether the file was added, modified, or deleted; I do not like the wasted space by displaying the file icon.
The folder icon is alright, as you can then quickly skim through which tree items are folders.
However, while using this feature in GitHub already, I noticed that there is unused potential here:
Instead of knowing that it is a file, I would find it much more useful to display a read-only checkbox (so most likely two different checkbox icons, one checked and one unchecked) showing whether you have already viewed this file while reviewing.
Implementing this is of course only possible once you can actually mark files as viewed, so it would depend on #19007 to get merged.

But the base implementation does not depend on this suggestion.

@wxiaoguang wxiaoguang changed the title Tree view in Pull Requests, similar to Azure DevOps Tree view in Pull Requests, similar to GitLab/GitHub/Azure DevOps Mar 30, 2022
@6543 6543 added topic/ui Change the appearance of the Gitea UI topic/ui-interaction Change the process how users use Gitea instead of the visual appearance labels Mar 30, 2022
@sebastiande
Copy link

As a workaround, you can use some chrome extensions, i.e. git-master

I think git-master is always showing all files and not only the changed files of a pull request, so it does not help.

@denwwer
Copy link

denwwer commented Jul 20, 2022

Hi, is any updates about that?

@happyxhw
Copy link

+1

@sebastian-sauer
Copy link
Contributor

sebastian-sauer commented Aug 31, 2022

I've tried to get a first file list on the left of the tree view.

fomantic will add support for a tree (hopefully) with the next 2.9 release - so for now this is (at least for me) a good step to have a file list on the left to easy navigate in a pr.

image

I've created a WIP PR #21012 with my changes.

@sebastian-sauer
Copy link
Contributor

Please see the PR for an updated screenshot with a first non collapsible tree view of files.

@sebastian-sauer
Copy link
Contributor

Now the tree has collapsible directories and a github like show / hide mechanism.

Please see updated screenshots in PR.

wxiaoguang added a commit that referenced this issue Sep 27, 2022
This PR adds a filetree to the left side of the files/diff view.

Initially the filetree will not be shown and may be shown via a new
"Show file tree" button.

Showing and hiding is using the same icon as github. Folders are
collapsible. On small devices (max-width 991 PX) the file tree will be
hidden.

Close #18192

Co-authored-by: wxiaoguang <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI topic/ui-interaction Change the process how users use Gitea instead of the visual appearance type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants