Skip to content

Add file tree to file view page #32721

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

Merged
merged 136 commits into from
Mar 15, 2025

Conversation

kerwin612
Copy link
Member

@kerwin612 kerwin612 commented Dec 5, 2024

Resolve #29328

This pull request introduces a file tree on the left side when reviewing files of a repository.

32721

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 5, 2024
@kerwin612 kerwin612 marked this pull request as draft December 5, 2024 02:38
@github-actions github-actions bot added modifies/templates This PR modifies the template files modifies/frontend labels Dec 5, 2024
@yp05327 yp05327 added this to the 1.24.0 milestone Dec 5, 2024
@pull-request-size pull-request-size bot added size/L and removed size/XL labels Dec 5, 2024
@kerwin612 kerwin612 marked this pull request as ready for review December 5, 2024 06:34
@pull-request-size pull-request-size bot added size/XL and removed size/L labels Dec 5, 2024
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Dec 5, 2024
@kerwin612 kerwin612 requested a review from wxiaoguang December 5, 2024 14:22
@lunny
Copy link
Member

lunny commented Dec 5, 2024

1 Move the three buttons on top of the left tree when expanding and move to the right once folding.
图片

2 The expanding state should be stored to users' configuration or as a session value once changed.
3 It should be sorted so that folders should always be on top of files on the left tree.
图片

@wxiaoguang wxiaoguang marked this pull request as draft December 7, 2024 03:21
@kerwin612 kerwin612 force-pushed the add-file-tree-to-file-view-page branch from 7229b60 to 59e46d4 Compare December 13, 2024 06:30
@kerwin612 kerwin612 force-pushed the add-file-tree-to-file-view-page branch from e45940d to c4e7f0c Compare December 13, 2024 12:20
@wxiaoguang wxiaoguang force-pushed the add-file-tree-to-file-view-page branch from 68f0407 to 40b61f3 Compare March 15, 2025 05:39
}

#view-file-tree.is-loading {
aspect-ratio: 5.415; /* the size is about 790 x 145 */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other PRs I have asked the same question: why? It doesn't seem right.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged labels Mar 15, 2025
@wxiaoguang
Copy link
Contributor

Almost done from my side. Still not ideal, could leave the improvements to the future.

@kerwin612 @lunny please confirm whether the changes look good

@wxiaoguang wxiaoguang force-pushed the add-file-tree-to-file-view-page branch from 405fa10 to b66330b Compare March 15, 2025 07:04
@wxiaoguang wxiaoguang force-pushed the add-file-tree-to-file-view-page branch from b66330b to 19e23da Compare March 15, 2025 07:09
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 15, 2025
@wxiaoguang wxiaoguang marked this pull request as ready for review March 15, 2025 07:11
@wxiaoguang wxiaoguang merged commit 92f997c into go-gitea:main Mar 15, 2025
26 checks passed
@wxiaoguang
Copy link
Contributor

Merged, do more improvements in the future.

@wxiaoguang wxiaoguang deleted the add-file-tree-to-file-view-page branch March 15, 2025 08:27
data-tooltip-content="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}">
{{svg "octicon-sidebar-expand"}}
</button>
<b>Files</b>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should translate this, fwiw.

@lunny lunny mentioned this pull request Mar 15, 2025
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 17, 2025
* giteaofficial/main: (23 commits)
  [skip ci] Updated translations via Crowdin
  Update tool dependencies (go-gitea#33907)
  Move hooks function to gitrepo and reduce expose repopath (go-gitea#33890)
  Replace text-align classes with tailwind (go-gitea#33905)
  Simplify secure context check (go-gitea#33906)
  Update JS and PY deps, misc tweaks (go-gitea#33903)
  Refactor functions to reduce repopath expose (go-gitea#33892)
  Move git references checking to gitrepo packages to reduce expose of repository path (go-gitea#33891)
  [skip ci] Updated translations via Crowdin
  Add missing translation (go-gitea#33900)
  Give organisation members access to organisation feeds (go-gitea#33508)
  Add lock for a repository pull mirror (go-gitea#33876)
  Fix cannot delete runners via the modal dialog (go-gitea#33895)
  Add file tree to file view page (go-gitea#32721)
  [skip ci] Updated translations via Crowdin
  Feature: Ephemeral action runners (go-gitea#33570)
  Add abstraction layer to delete repository from disk (go-gitea#33879)
  Make SearchMode have default value and add comments (go-gitea#33863)
  Fix maven panic when no package exists (go-gitea#33888)
  Add old svg class name to git entry icon (go-gitea#33884)
  ...

# Conflicts:
#	templates/repo/wiki/revision.tmpl
@go-gitea go-gitea deleted a comment from huapox Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files type/changelog Adds the changelog for a new Gitea version type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] File Tree For Preview Mode
6 participants