-
Previous Value Current Value Pull Request UI code diff: Java literal strings are treated as code resulting in many spans with mouseover handler being created
Pull Request UI code diff: A code row is split into many useless spans each with mouseover handler attached
-
Updated the title because not just string literals are affected. Also code expressions are affected, e.g. variable names or type names. For example I have seen
booleanbeing split into multiple spans witholeanbeing rendered bold because it is marked as keyword. Or variable names being split and having spans withcm-stringwhich renders some letters blue.I feel like some kind of text index is broken?
-
Again can you demonstrate this issue with an example repo? Tried to reproduce but it works fine at my side.
-
No. However we did nothing special. Just normal PR workflows. Someone has updated the pull request in my installation and now everything seems to look okay again.
No idea if that might be the cause but the pull request exists in 8.0.10 and I noticed the issue a few days after upgrading to 8.0.15 while reviewing the PR. However now it is gone in 8.0.15 after PR has been updated again. From a language perspective the PR contains a mixture of English and German. Other "old" PRs do not have that issue.
However in the PR in question I now notice that I have a
<span class="cm-string">long error message in german</span>with a mouseover handler attached and when I hover that line the popup shows CSS rules as possible declarations:
The above content originates from a minified css file (1 long line of css classes + rules). A little weird that OneDev's full text index somehow thinks this might be related.
-
Hmm... This looks odd. For this css rule matching issue, is it reproducible with a demo repo?
-
Previous Value Current Value Open
Closed
-
This should have been fixed in 8.1.0 now
-
Oh really? And what was the issue?
-
This fix as part of addressing issue #1333:
Please upgrade to 8.1.0 to see if the issue still exist.
-
@robin Just updated and will keep an eye on the
spanissue which I could not reproduce since someone updated the pull request.However the popup with the weird possible declarations still exist in 8.1.0. Just now I noticed that
.nseem to look bold so I guess that is what has matched? The string literal in the pull request that causes the above popup actually contains"this is some text.\n\n". So I guess it matches the.\nin java string literal with the.ncss class in a css file. -
This is a bug and will be fixed in next patch release.
| Type |
Bug
|
| Priority |
Normal
|
| Assignee | |
| Affected Versions |
8.0.15
|
I just noticed in a pull request that some letters in a java literal string were rendered as bold text. I checked the HTML source and it seems as if OneDev thinks that java literal strings contain code because a lot of
spanelements have been created withmouseoverevent handler attached (which would show occurrences popup). One of thespanelements had css class for keywords assigned which is why some letters were rendered bold. The letters in question wereest.For example if you have something like
OneDev generates HTML like (just an example):
However I would more likely expect something like