Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork6.3k
Follow file symlinks in the UI to their target#28835
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Only problem at the moment is that `git.TreeEntry` does not store thefull path of the entry, only the actual filename without directory.
delvh commentedJan 17, 2024
Trivia: If we merge this, we are even ahead of GitHub in terms of behavior as GitHub still shows the |
KN4CK3R commentedJan 19, 2024
Could you add a test for |
delvh commentedJan 19, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
And the test promptly caught a bug.
However, I have no idea how to implement |
delvh commentedJan 20, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
As expected, it doesn't 😒 |
wxiaoguang commentedMar 2, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
After reading the code, I have some new ideas, maybe more simple to do: backend does nothing, but let frontend navigate. For example:
Otherwise, if we really would like to resolve the link in backend, I guess it needs some big refactoring to make things clear. |
delvh commentedMar 2, 2024
@wxiaoguang the problem with the frontend approach is that the frontend cannot recursively resolve links ( |
wxiaoguang commentedMar 2, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
For me, I would like to see the direct link target on the UI, instead of recursively resolving the links ahead. For example: suppose there is a link If an end user would like to follow, the frontend approach could also work: use a href like |
delvh commentedMar 2, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
But what is it you want to achieve when you click on a (symlinked) file? |
wxiaoguang commentedMar 2, 2024
I updated the previous comment, a "/bar?follow_symlink=1" trick could work IMO. |
wxiaoguang commentedMar 16, 2024
Are you working on this at the moment? |
# Conflicts:#templates/repo/view_list.tmpl
wxiaoguang commentedJun 28, 2025
@delvh is there still anything to improve? |
delvh commentedJun 28, 2025
A quick skim over your changes looked good. |
delvh commentedJun 30, 2025
So, I tested it out now and pushed a small fix.
|
GiteaBot commentedJun 30, 2025
@delvh please fix the merge conflicts. 🍵 |
8dbf13b intogo-gitea:mainUh oh!
There was an error while loading.Please reload this page.
* giteaofficial/main: Fix modal + form abuse (go-gitea#34921) [skip ci] Updated translations via Crowdin Follow file symlinks in the UI to their target (go-gitea#28835) Fix issue filter (go-gitea#34914) Fix: RPM package download routing & missing package version count (go-gitea#34909) Add support for 3D/CAD file formats preview (go-gitea#34794)
…h/gitea into feature/enhanced-workflow-runs-api* 'feature/enhanced-workflow-runs-api' of github.com:bdruth/gitea: [skip ci] Updated translations via Crowdin Follow file symlinks in the UI to their target (go-gitea#28835) Fix issue filter (go-gitea#34914) Fix: RPM package download routing & missing package version count (go-gitea#34909) Add support for 3D/CAD file formats preview (go-gitea#34794) Add a `login`/`login-name`/`username` disambiguation to affected endpoint parameters and response/request models (go-gitea#34901) Improve tags list page (go-gitea#34898) [skip ci] Updated translations via Crowdin docs: fix typo in pull request merge warning message text (go-gitea#34899) Refactor container package (go-gitea#34877) [skip ci] Updated translations via Crowdin
Uh oh!
There was an error while loading.Please reload this page.
Description
Previously, when you clicked on a symlink, a document was opened that only displayed
<target>.While this follows git's behavior of implementing symlinks, it is not user-friendly for users using the web UI to access a file.
Now, symlinks are resolved when you click on a link next to them, either until a file has been found or until we know that the link is dead.
When the link cannot be accessed, we fall back to the current behavior of showing the document containing the target.
Before
Screenshots
After