Repository navigation
fix(erd): clean PNG capture, SVG export in the theme's colours like the screen (#1153) - #1200
Merged
Merged
Conversation
…he screen (#1153) The PNG captured the current interaction: a picked table faded the other cards, and the hover highlight and edge label were in the picture. The capture now clears them for one frame and restores the pick. A failed render (too big for the GPU) shows an error that points to SVG instead of failing silently. The SVG used fixed light colours, so in a dark theme it no longer matched the PNG or the screen. It now takes the theme's colours, a card radius of 8 px as on screen, monospace types, the column count in the header, and one key slot per card so the column names line up. Edges and their end markers carry classes, so a test checks that every relation is drawn with its markers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1153
What was wrong
RepaintBoundaryholds the whole canvas, so a picked table (other cards at 35 % opacity), the hover highlight and the edge tooltip ended up in the image._exportPng()was not awaited and had no error handling; a canvas too big for the GPU failed without a message.<title>, not markers for every relation, and only long types were checked for fitting, not table or column names.Changes
ErdSvgColors(light defaults); the diagram view passes the current theme's colours. Card radius 8, header tint and column count, one key slot per card, monospace types.erd-edge/erd-endsclasses.