Skip to content

PR comment link on viewed files not scrolling #23466

Closed
@gempir

Description

@gempir

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:

  1. Make a PR
  2. Add a comment
  3. Copy link of the comment (via the 3 dots menu)
  4. Mark the file as viewed
  5. Open the link

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

Some comment on a file that is already marked as "viewed" for the user opening the link Previous Next

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

image

image

Git Version

No response

Operating System

No response

How are you running Gitea?

https://try.gitea.io/

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/uiChange the appearance of the Gitea UItype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions