Skip to content

Conversation

@divanshu-go
Copy link

Adds support for commenting on unchanged lines (Expanded lines)

/claim #32257
Closes #32257

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 28, 2024
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Oct 28, 2024
Signed-off-by: Divanshu Grover <[email protected]>
@pull-request-size pull-request-size bot added size/M and removed size/S labels Oct 28, 2024
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Oct 28, 2024
@divanshu-go
Copy link
Author

image
image
image

@lunny
Copy link
Member

lunny commented Oct 28, 2024

You still need to consider those lines that async loading.

@divanshu-go
Copy link
Author

@lunny can you please help because I'm having hard time understanding the codebase.
#32354 (comment) (I didn't get your point)

@lunny
Copy link
Member

lunny commented Oct 28, 2024

@lunny can you please help because I'm having hard time understanding the codebase. #32354 (comment) (I didn't get your point)

Some code lines are hidden before you click the icon like below
图片

So for these lines, maybe we want to add comments on these lines.
And after some comments are added to these lines, once the page reloads, we need to know there are comments on these lines.

This is the hardest part of this issue.

@divanshu-go
Copy link
Author

@lunny after the user adds the comments , the comments get stored in database , but when the page reloads the template is regenerated and we are not able to see those comments but when we again do add comments on those lines , we always see those coments which ware previosly added by the user

@lunny
Copy link
Member

lunny commented Oct 28, 2024

@lunny after the user adds the comments , the comments get stored in database , but when the page reloads the template is regenerated and we are not able to see those comments but when we again do add comments on those lines , we always see those coments which ware previosly added by the user

That's the problem. If one adds comments on hidden lines, others don't know there are comments there except he click the expand icons. I think we have two options. One is to expand those lines which have comments but this is very complicated. Another is to add some icons or indications that there are comments on these hidden code lines.

@divanshu-go
Copy link
Author

divanshu-go commented Oct 28, 2024

we can show this icon ,
octicon-comment-discussion

however my concern is about retrieving those comments did on expanded lines or hidden lines.
because currently I'm not able to think of a way to do this
can you please suggest any approach or point out any file or code

@lunny
Copy link
Member

lunny commented Oct 28, 2024

If you search FetchCodeCommentsByLine in the whole project, you can find some clues.

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jun 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

🙋 Bounty claim lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Commenting unchanged lines

3 participants