Skip to content

feat: schema panel tooltips, redesigned tooltip, minimap configuration option

Dennis Collaris requested to merge feat/schema-tooltips into main

Successor to !196 (closed)

I took over Marco's work on the schema tooltips, and made a few changes (see per-commit):

  • simplified code to not pass viewport to each node, but instead calculate the correct position (with useMemo) in SchemaEntityPill / SchemaRelationPill
  • simplified code to close the tooltip when clicking outside. No need for mouseClickThreshold, reactFlow already nicely distinguishes between mode and click events.
  • removed redundant tooltips that did not add much (the same text as the text hovered over). We can always reintroduce if more useful information is shown.
  • fixed an issue where the tooltips were not correctly positioned when zooming
  • fixed issue where node count stats would not be shown (and removed default value of "NoDefined", not a very user friendly message.

I think with these fixes these newly styled tooltips and schema tooltips can be considered for merging.

What is missing (and I don't have time for):

  • Currently tooltips still open on top of each other. This is not consistent with the node-link, were in normal usage only one tooltip can be open at the time. Only when you use shift you can open multiple, but shift is already used for dragging pills instead. My suggestion is to map dragging pills to alt+click and use shift+click for multiple tooltips. Can be a separate PR.
  • Alen requested being able to copy long values from the tooltip. These are truncated so not possible at the moment. My suggestion: double click a value to copy, and show a tooltip ("Copied!") to show the user. Can be a separate PR.
Edited by Dennis Collaris

Merge request reports

Loading