Repository navigation
refactor(erd): export flows move out of ErdView into ErdExporter - #1472
Merged
Merged
Conversation
ErdExporter holds Mermaid, DBML, SVG, PNG and PDF export and the export palette setting; ErdView implements ErdExportSource to give it its data, colours and the canvas boundary. erd_view.dart: 1784 -> ~1590 lines. Refs #1362
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.
First slice of #1362 (the issue stays open:
erd_view.dartis still ~1690 lines against a 300 line goal).The export flows leave the view state:
lib/features/erd/erd_exporter.dart:ErdExporterholds Mermaid, DBML, SVG, PNG and PDF export, the clipboard copies and the light-palette / current-theme setting. It talks to the view through the smallErdExportSourceinterface (data, colours, canvas boundary,withCleanCanvas)._ErdViewStateimplementsErdExportSource; the screen-only state that has to be hidden for a PNG capture (pick, picked relation, group marks, hover) stays in the view aswithCleanCanvas, with the same restore-after rules as before.erd_exporter_test.dart: Mermaid and DBML file names and content, groups outside the shown tables left out).Next slices (separate PRs): the saved layout and views (
_readSaved,_current,_showState,_switchView), the notes and group operations, then the canvas and search state.