Bug 1733091 - Yaml page directs to Dashboard when user click a doc link from mouse hovering message
Summary: Yaml page directs to Dashboard when user click a doc link from mouse hovering...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.2.0
Assignee: Josh Pinkney
QA Contact: Yadan Pei
Depends On:
TreeView+ depends on / blocked
Reported: 2019-07-25 07:59 UTC by XiaochuanWang
Modified: 2019-10-16 06:33 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-10-16 06:33:28 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift console pull 2423 0 None None None 2019-08-20 17:53:24 UTC
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:33:43 UTC

Description XiaochuanWang 2019-07-25 07:59:52 UTC
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):

How reproducible:

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.

Actual results:
2. New tab window open for the doc link. Current page of openshift console direct to Dashboard.

Expected results:
2. Openshift console should stay on Yaml editor page.

Additional info:

Comment 1 Josh Pinkney 2019-08-13 19:31:11 UTC

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

3. We find some way to do some hacky javascript that removes the href
	Pros: You can make it so that clicking the link doesn't have the issue anymore
	Cons: We have to write some hacky javascript

Comment 2 XiaochuanWang 2019-08-15 05:42:18 UTC
Only IMO, I vote for the priority: 3, 2, 1. So it depends on the hacky javascript. 
My ears are all open.

Comment 4 XiaochuanWang 2019-08-28 02:53:28 UTC
Now the hover messages are all removed, this issue is definitely not seen.
Verified on 4.2.0-0.nightly-2019-08-27-105356

Comment 5 XiaochuanWang 2019-08-29 08:37:13 UTC
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.

Comment 6 errata-xmlrpc 2019-10-16 06:33:28 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.