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

Commentary: permalinks: use the anchor (id=) to scroll to position #2908

Open
3 tasks done
grahamperrin opened this issue Jan 16, 2025 · 8 comments
Open
3 tasks done
Assignees
Labels
enhancement New feature or request

Comments

@grahamperrin
Copy link

Requirements

  • This is a feature request and not a bug report. Otherwise, please create a new bug report instead.
  • Please check to see if this request (or a similar one) already exists.
  • It's a single feature. Please don't request multiple features in one issue.

Describe the feature you'd like

Steps to reproduce:

  1. click the link icon for a comment

Expected:

  1. scroll to position

Actual result:

  1. the top of the page – and depending upon the length/height of the opening post, the required comment may be out of sight.

Example

Compare:

Use case

Increase the likelihood of readers seeing what's intended when links are shared.

Context

This enhancement may be complementary to:

@grahamperrin grahamperrin added the enhancement New feature or request label Jan 16, 2025
@grahamperrin
Copy link
Author

Workarounds

Browser extensions such as Display #Anchors can display clickable anchors.

An example:

image

https://github.com/Rob--W/display-anchors

@dessalines
Copy link
Member

dessalines commented Jan 16, 2025

I'm not sure how this could work, because as you pointed out, there's a chance the comment might not be in the first page of results, or it might be a deeply nested comment.

This is why our post comment links use this: https://lemmy.ml/post/24821043/16114056 , (a context view) which already works.

@grahamperrin
Copy link
Author

… comment links … this: lemmy.ml/post/24821043/16114056 , (a context view) which already works.

I see the opening post, not a comment:

Image

@dessalines
Copy link
Member

That's because its a long post body, scroll down to the first comment, its the one you linked.

@grahamperrin
Copy link
Author

Expected:

2. scroll to position

@dessalines
Copy link
Member

Sounds like you can handle this then, I'll assign it to you.

@grahamperrin
Copy link
Author

Thanks, can someone point me to relevant files?

(I'm neither a coder, nor a developer, the codebase here is completely unfamiliar to me.)

@dessalines
Copy link
Member

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

No branches or pull requests

2 participants