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

Blame table changing L# in URL to "undefined" rather than highlighting desired line #12836

Closed
2 of 7 tasks
richmahn opened this issue Sep 14, 2020 · 8 comments · Fixed by #12857
Closed
2 of 7 tasks

Blame table changing L# in URL to "undefined" rather than highlighting desired line #12836

richmahn opened this issue Sep 14, 2020 · 8 comments · Fixed by #12857
Labels

Comments

@richmahn
Copy link
Contributor

richmahn commented Sep 14, 2020

Description

When viewing a file in the blame page via a URL that has the desired line # to highlight, it goes to that line number but then after the file load (large file) it changes the URL argument to "undefined" and never highlights the desired line.

https://try.gitea.io/richmahn/hbo_uhb/blame/branch/master/16-NEH.usfm#L875

results in

https://try.gitea.io/richmahn/hbo_uhb/blame/branch/master/16-NEH.usfm#undefined

and then after a few seconds, it goes back to the top of the list, losing its place at line 875.

Actually going to a file with no Line # in the URL and then clicking on a line # also results in "undefined" in the URL rather than the line #:

Example:
https://try.gitea.io/richmahn/hbo_uhb/blame/branch/master/manifest.yaml
click on a line number

In a version of Gitea running v1.12.4 (our production version), it works, yet the CSS styling of the lines don't match up, so we were looking at v1.13.x development branch:

https://git.door43.org/unfoldingword/hbo_uhb/blame/branch/master/16-NEH.usfm#L875

Screenshots

Screen Shot 2020-09-14 at 2 01 33 PM

@6543 6543 added the type/bug label Sep 14, 2020
@6543
Copy link
Member

6543 commented Sep 14, 2020

did it ever worked on blame view?

@richmahn
Copy link
Contributor Author

richmahn commented Sep 14, 2020

@6543 yes, see link to my production copy of v1.12.4 of Gitea: https://git.door43.org/unfoldingword/hbo_uhb/blame/branch/master/16-NEH.usfm#L875

Maybe bad example, as that links to a large file. Try this:
https://git.door43.org/unfoldingword/hbo_uhb/blame/branch/master/manifest.yaml#L10

@richmahn
Copy link
Contributor Author

@6543 I noticed in v1.12.4 that the line numbers didn't line up with the text (My link goes to line 875 which it properly highlights, but the numbers are all out of wack), so I tried on development branch of Gitea and the line numbers are lined up but now doesn't highlight. I'll see if I can look at this if others can't.

@richmahn
Copy link
Contributor Author

@6543 Probably due to this huge change of removing the highlight.js script: #12047

@richmahn
Copy link
Contributor Author

@mrsdizzie Do you know if this has to do with your PR in June? Are we still allowing lines to be highlighted? So useful in showing others a problem in code.

@richmahn
Copy link
Contributor Author

I could be wrong. Looks like it goes back to this PR which did some work to fix the problem I was noticing in 1.12.4: #11885

@mrsdizzie
Copy link
Member

I'll take a look when I can but was not intentional to break or remove this feature -- could be just some is that need to be updated in template to match a js change.

mrsdizzie added a commit to mrsdizzie/gitea that referenced this issue Sep 15, 2020
Blame and regular code view have diverge slightly so line highlighting wasn't working properly anymore. Make work again in lieu of a larger refactor of blame HTML to move it outside of source and into templates to match code view.

Fixes go-gitea#12836
@mrsdizzie
Copy link
Member

Should be fixed in linked PR -- thanks for catching!

techknowlogick added a commit that referenced this issue Sep 15, 2020
Blame and regular code view have diverge slightly so line highlighting wasn't working properly anymore. Make work again in lieu of a larger refactor of blame HTML to move it outside of source and into templates to match code view.

Fixes #12836

Co-authored-by: techknowlogick <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants