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

Review comment links don't work for files that exceed max_git_diff limits #17765

Open
jpraet opened this issue Nov 22, 2021 · 3 comments
Open

Comments

@jpraet
Copy link
Member

jpraet commented Nov 22, 2021

Gitea Version

1.16.0+dev-581-gbaed01f24

Git Version

No response

Operating System

No response

How are you running Gitea?

try.gitea.io

Database

No response

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Description

With #16829 and #17739 we can now display files beyond MAX_GIT_DIFF_FILES and MAX_GIT_DIFF_LINES, and add review comments on them.

But the files view initially only loads the first page of files, and only those files that don't exceed the max lines.
So direct links (e.g. when navigating from the conversation view) to comments that are added on such files do not work.

Example:

Screenshots

No response

@zeripath
Copy link
Contributor

I don't think we can fix this very easily.

@wxiaoguang
Copy link
Contributor

It depends on our frontend refactoring to provide a better frontend component mechanism.

@Gusted
Copy link
Contributor

Gusted commented Nov 24, 2021

It depends on our frontend refactoring to provide a better frontend component mechanism.

So, the front-end can detect that isssuecomment-xxx is specified in the URL, and it can very easily check if it's in the DOM.

When the code knows that it's the DOM, do nothing, but if it sees that isssuecomment-xxx isn't in the dom, and it sees that the show more files button is present(and code will make a guess that this comment is in those files), then it could show a popup:

"It seems like that a specific comment should be shown, but the comment could not be found in the loaded files. Would you like to load the additional files of this PR and see if it's present in those" (something along those lines).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants