feat: schema panel tooltips, redesigned tooltip, minimap configuration option
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
Activity
mentioned in merge request !196 (closed)
added 1 commit
- 14c1b124 - fix: reshuffle z-index and rely on natural order instead of forced z-indexes
assigned to @marcos
added 13 commits
-
f0e3571b - 1 commit from branch
main
- f0e3571b...982d7e7c - 2 earlier commits
- 0e8fc758 - feat: restyle tooltips and use for schema
- faec32bb - refactor: remove superfluous tooltips within tooltip
- 5dd854e8 - refactor: simply code by obtaining viewport using useViewport
- 88e6f2b9 - refactor: simplify closing tooltips clicking outside pills
- 325ad006 - fix: ensure schema tooltips are shown in the correct location while zooming
- e8d76cd3 - fix: silence missing key warning from react
- e14f4669 - refactor: do not show number of nodes if no stats received (instead of showing "nodefined")
- 1e6b8024 - refactor: move graph stats into pills to ensure they are loaded
- ac2951dd - fix: reshuffle z-index and rely on natural order instead of forced z-indexes
- cd48cb65 - Merge branch 'feat/schema-tooltips' of...
Toggle commit list-
f0e3571b - 1 commit from branch
This MR is included in version 1.83.0The release is available on GitLab release.
Your semantic-release bot
Please register or sign in to reply