-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
PR comment link on viewed files not scrolling #23466
Comments
I don't see the file marked as viewed in your screenshots. Can you reproduce this bug even with a wider width? |
I think this can be improved to have the same behavior as github: scroll to the comment with the viewed file automatically expand when the hash from url hits the comment. |
I did't login. So there was no |
That's my point. This issue exists only for logged in users. I'm not sure what you meant with the window width because in all your Screenshots the comment is visible. |
…and if file is folded, and on refreshing) (#23513) Close #23466 Right now on pull request "files Changed" tab, if a file is viewed, when the comments' links are visited, the comment will not be shown as the file is folded after viewed. This PR is to improve the behavior, to make the comment seen even the related file is folded, like on github. And right now scroll position will be remembered and hence it won’t scroll to hashed comment after refreshing, this PR also adjust the scroll position remembering behavior: When there is hash comment in url, do not remember the scroll position. Before: https://user-images.githubusercontent.com/17645053/225512079-6cf79581-9346-44cf-95d6-06919642e6a8.mov After: https://user-images.githubusercontent.com/17645053/225523753-3f6728f2-977b-4ed0-a65c-63dcef2ace80.mov Update - long comment's behavior after using `scrollTop ` (Comment div scroll to the position which is 30px below the diff header, or 30px below top on conversation tab): https://user-images.githubusercontent.com/17645053/225614460-0602c1a6-229c-41f4-84d2-334e78251486.mov
…and if file is folded, and on refreshing) (go-gitea#23513) Close go-gitea#23466 Right now on pull request "files Changed" tab, if a file is viewed, when the comments' links are visited, the comment will not be shown as the file is folded after viewed. This PR is to improve the behavior, to make the comment seen even the related file is folded, like on github. And right now scroll position will be remembered and hence it won’t scroll to hashed comment after refreshing, this PR also adjust the scroll position remembering behavior: When there is hash comment in url, do not remember the scroll position. Before: https://user-images.githubusercontent.com/17645053/225512079-6cf79581-9346-44cf-95d6-06919642e6a8.mov After: https://user-images.githubusercontent.com/17645053/225523753-3f6728f2-977b-4ed0-a65c-63dcef2ace80.mov Update - long comment's behavior after using `scrollTop ` (Comment div scroll to the position which is 30px below the diff header, or 30px below top on conversation tab): https://user-images.githubusercontent.com/17645053/225614460-0602c1a6-229c-41f4-84d2-334e78251486.mov
…and if file is folded, and on refreshing) (#23513) (#23540) Backport #23513 by @HesterG Close #23466 Right now on pull request "files Changed" tab, if a file is viewed, when the comments' links are visited, the comment will not be shown as the file is folded after viewed. This PR is to improve the behavior, to make the comment seen even the related file is folded, like on github. And right now scroll position will be remembered and hence it won’t scroll to hashed comment after refreshing, this PR also adjust the scroll position remembering behavior: When there is hash comment in url, do not remember the scroll position. Before: https://user-images.githubusercontent.com/17645053/225512079-6cf79581-9346-44cf-95d6-06919642e6a8.mov After: https://user-images.githubusercontent.com/17645053/225523753-3f6728f2-977b-4ed0-a65c-63dcef2ace80.mov Update - long comment's behavior after using `scrollTop ` (Comment div scroll to the position which is 30px below the diff header, or 30px below top on conversation tab): https://user-images.githubusercontent.com/17645053/225614460-0602c1a6-229c-41f4-84d2-334e78251486.mov Co-authored-by: Hester Gong <[email protected]>
Description
When reviewing a file it is very common for the reviewer to mark these files as "viewed"
When you now get a link to a comment in a file you already viewed you can't properly open that link because the anchor tag is missing.
Steps to reproduce:
You will land at the top of the PR instead of at the comment.
My example:
https://try.gitea.io/gempir/gempbot/pulls/1/files#issuecomment-163257
First time you will land on the comment
When you now mark that file as viewed you will not land on that comment anymore when you are opening the link above.
(See first screenshot)
Also minor nitpick: The Anchor lands directly on the text of the comment, not a little above, so it's very "cramped". (See second screenshot)
Gitea Version
1.20.0+dev-163-gd56bb7420
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Git Version
No response
Operating System
No response
How are you running Gitea?
https://try.gitea.io/
Database
None
The text was updated successfully, but these errors were encountered: