Dashboard Help Icon Produces Unwanted Network Requests
Description
Environment
Attachments
is caused by
Activity

Heng Sin Low July 27, 2023 at 12:55 AM
As I’ve posted earlier, you can use client side event listener instead of pure css for this.
https://www.zkoss.org/wiki/ZK_Client-side_Reference/General_Control/Event_Listening
Peter Takacs July 26, 2023 at 11:52 AM
Hi ,
I’d like to ask if you have any idea, how to properly replace the Popup.java → open method with client side event. I’ve tried it with pure CSS, but there I have a serious limitation. I tried to fix the issue (which I posted below in the older comment) with changing position: fixed; in .dashboard-content-help-icon:hover ~ .dashboard-content-help-popup
CSS class to e.g. position: absolute, but then the popup can not get wider than the paren widget:
Looks like pure CSS is not enough to fix this issue. With Igor we thought that the popup Div should be appended directly to the <body></body>, then on hover, a javascript method should find it through an assigned id, and specified the position, where it should be displayed (it works similarly with the Popup.java class).
I’m not sure how could it be implemented, or is it the right approach, can you share your thoughts on this?
Regards,
Peter
Peter Takacs July 21, 2023 at 8:53 AMEdited
Found a bug with the CSS while testing:
Providing a fix soon…
The dashboard help icon appears every time you hover over a dashboard widget with your cursor (also, the corresponding dashboard content must have a description, that is different from its name). Since this behaviour was implemented with java events, it produces network requests every time the visibility of the icon or the text popup changes. This is an issue especially considering that most of the time the users cursor only flies through the dashboard widget header, not even wanting to view the help.
Solution:
As suggested by Heng Sin in this mattermost thread, the events should be handled on the client side.
Video of the bug: