-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Issue comment edit-diff is wrong #17393
Comments
ping @wxiaoguang |
You just triggered an unrelated bug which prevent the JS executing 😂 I fixed that bug and I think we should apply the patch first to continue. #17398 Otherwise I can not see the content history menu. |
Just a guess, have you edited the issue more than 20 times? If yes, it is a feature (required by some reviewers) that we only keep 20 history revisions at most, the shortest interval history revision are deleted if the count is greater than 20. |
No, this is a single edit, see the link above. (ah right, you can't see the edit menu on try.gitea.io as a different user right..? edit: I added you as collaborator on that repo for you to see the edit history :) I discovered another issue with the edit history listing: I edited a comment of another user (I have write access to issue unit in that repo), and it shows up that the original poster made the edit.. |
Still can not see the history menu. By design, this menu will be shown for all users with read access (including guest users). I think maybe the JS error prevent the menu from showing. So maybe we should apply the context popup fix first. |
About another problem: "I discovered another issue with the edit history listing: I edited a comment of another user (I have write access to issue unit in that repo), and it shows up that the original poster made the edit.." I found the problem. I use |
@noerw I just tried https://try.gitea.io/noerw/hochwasser/issues/4 , can not find the dialog matching the strange screenshot. Can you provide more information? Or is it browser related? ps: some known problems have been fixed in the related PR, including the dialog UI (height problem), the wrong editor problem for the main issue. |
Nice! |
I managed to reproduce some similar diffs .... maybe the problem is caused by the diff module (maybe my usage is incorrect), triggered by some special texts. I need more time to test. |
I find a small reproducible example:
then remove the last |
Gitea Version
58cd55d
Git Version
? idk, saw it on gitea.com
Operating System
linux
How are you running Gitea?
gitea.com
Database
MySQL
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Description
Edits of more complex comments get quite strange diffs. I got diffs that didn't touch the single line that was edited, but show two other lines as changed (I'll try to come up with a more minimal reproducer later)
An edit like the following worked fine though.
It seems this feature needs more testing with longer comments / more complex edits.
Screenshots
I don't know what the actual edit was, but certainly not this:
The text was updated successfully, but these errors were encountered: