Description of problem:
User goes to yaml editor for one resource. Move mouse hovering on one line and open the helper message panel, click the doc link. YAML page directs to Dashboard instead of staying on the current Yaml editor page.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. User goes to yaml editor for one resource such as Pod, DC etc.
2. Move mouse hovering one line and open the helper message panel, click the doc link from the hovering panel.
2. New tab window open for the doc link. Current page of openshift console direct to Dashboard.
2. Openshift console should stay on Yaml editor page.
it looks like the hover contents from the language server gets converted from markdown to html when being displayed. During this conversion it turns a link such as:
<a href="#" data-href="https://git.k8s.io/community/contributors/devel/api-conventions.md#resources" title="https://git.k8s.io/community/contributors/devel/api-conventions.md#resources">https://git.k8s.io/community/contributors/devel/api-conventions.md#resources</a></p>
Which is where this issue comes into play. Due to the fact that the href has "#" when its clicked its trying to bring the current page back to the dashboard while also bringing a new tab to the url.
It seems to me like there's a few ways to fix this:
1. We can strip links from the hover request so that they aren't shown anymore.
Pros: All the links I tested were dead links anyways so it doesn't seem like it causes a lack of functionality.
Cons: It might be hard to cover all cases with links (though I'm not entirely sure). In all cases I've seen with the json schema it seems to follow the format of "more info: http://my_link"
2. We can surround the hover contents in a markdown code block so that when its converted into html the link doesn't appear as a link
Pros: It disables the link
Cons: The link is still there, but its pointless if its a dead link anyways. I tried this but we would need to re-style the hover panel because the css shows up too dark to read
Pros: You can make it so that clicking the link doesn't have the issue anymore
My ears are all open.
Now the hover messages are all removed, this issue is definitely not seen.
Verified on 4.2.0-0.nightly-2019-08-27-105356
Plz ignore Comment 4, my Firefox has some issue. Now it'll perfectly show the message without console directing to any page.
Tested on Chrome against 4.2.0-0.nightly-2019-08-28-152644
It looks very good. Verified.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.