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

fix: relation name persisting on screen while hovering graph edges #1066 #1124

Merged
merged 5 commits into from
Oct 25, 2023

Conversation

faisal7008
Copy link
Contributor

@faisal7008 faisal7008 commented Oct 21, 2023

Problem

In the current implementation of the Cytoscape graph, we have two issues. First, when users zoom out while hovering over a node relation, the tooltip persists on the screen even after moving the mouse. This behavior can stack and lead to multiple tooltips staying on the screen. Second, when users hover over the tooltip, they are unable to zoom out.

fixes #1066

Solution

To solve these issues, I’ve added checks in the zoom event handler to remove any tooltips when zooming crosses its threshold i.e. zoomLevelBreakpoint. I’ve also disabled pointer events on the tooltip to allow zoom events to pass through.

Changes Made

  • Added a check in the zoom event handler to remove tooltips when zooming crosses breakpoint.
  • Disabled pointer events on tooltips to allow zoom events to pass through.
  • Commented the extra CytoScapeComponent which was overlapping the current Component

How to Test

  1. Zoom on the resources explorer.
  2. Hover over a relation between two nodes — the name of the relation appears.
  3. Zoom out, keeping the mouse still.
  4. The relation caption stays on the screen and disappears as soon as the zooming threshold for the resource names to be hidden is reached.

Screenshots

Screenshot 2023-10-22 at 12 59 25 AM Screenshot 2023-10-22 at 12 59 32 AM

Notes

[Any additional notes or information that you would like to share with the reviewers.]

Checklist

  • Code follows the contributing guidelines
  • Changes have been thoroughly tested
  • Documentation has been updated, if necessary
  • Any dependencies have been added to the project, if necessary

Reviewers

@AllieMendes

@mlabouardy mlabouardy added this to the v3.1.3 milestone Oct 23, 2023
@mlabouardy mlabouardy added the ui label Oct 23, 2023
Copy link
Contributor

@Kolawole99 Kolawole99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@Traxmaxx Traxmaxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too

@mlabouardy mlabouardy merged commit e45972b into tailwarden:develop Oct 25, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relation name persisting on screen
4 participants