typedb / typedb-studio

TypeDB Studio (IDE)
https://typedb.com
Mozilla Public License 2.0
191 stars 44 forks source link

Graph Visualiser Hover Misalignment #580

Closed jamesreprise closed 2 years ago

jamesreprise commented 2 years ago

Description

When hovering over a vertex, the y-axis for the area that defines a vertex is misaligned with the vertex itself. This is true for entities, relationships and attributes.

Environment

  1. Studio version: 2.10.0
  2. OS of Studio: MacOS

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Load any query that has a graph visualiser output.
  2. Attempt to hover over a thing.

Expected Output

Hover area is aligned with actual vertex.

Actual Output

Misaligned by a few pixels.

Additional information

Screenshot 2022-06-17 at 12 02 01 Screenshot 2022-06-17 at 12 01 35
alexjpwalker commented 2 years ago

This issue only affects Macs and is caused by the MacOS default cursor being a bit "off" - i.e. its hit point is not the top left corner of the visual pointer tip.

Having said that, maybe we should change the icon to a hand when hovered over a vertex?

jamesreprise commented 2 years ago

That would be a nice quality of life change. I guess the problem remains that it won't be changed to a hand (and possibly be more accurate) if it is hovering over the very bottom of the vertex. Different issue?

jamesreprise commented 2 years ago

Another thought - we could try a different (custom?) cursor and see if there are any changes in accuracy.

jamesreprise commented 2 years ago

This may well change in the future, it's also heavily platform dependent so I'll close this for now.