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

Revert "Show View at this point in history for every commit (#29122)" #30295

Closed
wants to merge 1 commit into from

Conversation

wxiaoguang
Copy link
Contributor

Fix #30098

@wxiaoguang wxiaoguang added the backport/v1.22 This PR should be backported to Gitea 1.22 label Apr 5, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 5, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 5, 2024
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Apr 5, 2024
@zokkis
Copy link
Contributor

zokkis commented Apr 5, 2024

Why should this be reverted and not fixed?

I think its better to check if its a commit, then use src/commit and if its wiki use wiki/commit
like https://github.com/go-gitea/gitea/blob/db73904e7062d9442ddad577be09965dad2e2826/templates/repo/commits_list.tmpl#L45C8-L55C12

@wxiaoguang
Copy link
Contributor Author

wxiaoguang commented Apr 5, 2024

Why should this be reverted and not fixed?

Quote my comment from #29122 :

Actually I have a question for this change: if there is no FileName, why it should show a link to the commit? The commit link is already shown in the second column. If I understand correctly, View at this point in history is only for viewing a "file", but not a "commit". I think the change 29122 is not right.

At the moment, a complete fix for "wiki" needs more time, and "wiki" doesn't support such "file view at history point". So even if you could check it is a wiki, no link could be used.

To make it easier to backport for 1.22, this is a quick fix IMO

@zokkis
Copy link
Contributor

zokkis commented Apr 5, 2024

Why should this be reverted and not fixed?

Quote my comment from #29122 :

Actually I have a question for this change: if there is no FileName, why it should show a link to the commit? The commit link is already shown in the second column. If I understand correctly, View at this point in history is only for viewing a "file", but not a "commit". I think the change 29122 is not right.

At the moment, a complete fix for "wiki" needs more time, and "wiki" doesn't support such "file view at history point". So even if you could check it is a wiki, no link could be used.

To make it easier to backport for 1.22, this is a quick fix IMO

The button does a similar thing as a click on "sha1" column
image

On the sha1 click you see the commit but with View at this point in history you see the repo at this commit

So the absolute best and also a easy fix is to check for wiki and then dont show the link
So the feature is not reverted and the bug is fixed

@wxiaoguang

This comment was marked as resolved.

@wxiaoguang
Copy link
Contributor Author

Hmm, sorry, I think I can see the point now. Will propose a new one.

@wxiaoguang wxiaoguang closed this Apr 5, 2024
@wxiaoguang
Copy link
Contributor Author

Sorry for my misundestanding and sorry for bothering, the new PR: -> https://github.com/go-gitea/gitea/pull/30297/files?diff=split&w=1

@wxiaoguang wxiaoguang removed the backport/v1.22 This PR should be backported to Gitea 1.22 label Jun 20, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/templates This PR modifies the template files size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

View at this point in history is 404 in wiki revisions page
3 participants