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

copyable line numbers #13353

Closed
wants to merge 1 commit into from
Closed

Conversation

0xC4N1
Copy link

@0xC4N1 0xC4N1 commented Oct 29, 2020

Improves shareability of direct links to line numbers in file view.
Just right click the line number and copy link location.

Improves shareability of direct links to line numbers. 
Just right click the line number and copy link location.
@silverwind
Copy link
Member

silverwind commented Oct 29, 2020

Is it really necessary? When a line number is clicked, the URL hash updates and it also works nicely with shift-click on a second line for a multi-line selection. The link added here could interfere with that functionality.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 29, 2020
@0xC4N1
Copy link
Author

0xC4N1 commented Oct 30, 2020

Oh thank you for pointing this out. I didn't know about the multi select feature with shift-click for line numbers. You're right. Default behavior for anchors is open in new window. That behavior should be prevented first. I'm not sure right now where would be the best place to add JavaScript to implement it. I am testing this feature currently by using a custom template in CUSTOM_PATH.

I think just updating the URL isn't really convenient. Especially since browser developers start to hide the URLs and just show part of the domain until you select the address bar. On mobile devices this is the default behavior already.

@stale
Copy link

stale bot commented Dec 29, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions.

@stale stale bot added the issue/stale label Dec 29, 2020
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Dec 29, 2020
@stale stale bot removed the issue/stale label Dec 29, 2020
@wxiaoguang
Copy link
Contributor

Thank you for contribution. Since we have:

I think this PR can be closed.

@wxiaoguang wxiaoguang closed this Nov 19, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants