Repository navigation
refactor(erd): decompose ErdView (part of #1362) - #1393
Merged
Merged
Conversation
Move the table card widget and the relation painter (with roundedPath) into lib/features/erd/widgets. erd_view.dart re-exports erdCardBuilds and roundedPath so existing importers keep working. No behaviour change.
…youtEngine - move erd_layout, erd_router and erd_geometry (pure Dart, no widgets) from features/erd to core/erd and update imports - add ErdLayoutEngine with the pure visible-schema, saved-position merge, neighbour/junction map, focus and search logic that lived in the view state, so it can be unit tested without a widget tree
- add super.key to ErdTableCard now that it is public - drop imports already provided by shadcn_flutter and flutter_test
…widgets - ErdExportData: SVG header fills, notes, group frames and theme colours as functions of their arguments instead of view state - ErdViewsMenu, ErdSearchPanel, ErdEdgeTipLabel and ErdGroupFrame widgets under features/erd/widgets; the view state only passes data and callbacks
- ErdExportMenu and the public ErdExportAction enum - ErdTableMenu.items for a card's context menu - ErdStatusBody for the error, all-hidden, no-tables and no-relations bodies
Grouping, ungrouping, numbering and adding tables are now pure list functions with unit tests; the view state only applies the result.
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.
Part of #1362 (first step; the issue stays open until
erd_view.dartis a thin coordinator).What this PR does
ErdTableCard(+ErdCardFocus,erdCardBuilds) tolib/features/erd/widgets/erd_table_card.dart.ErdRelationPainterandroundedPathtolib/features/erd/widgets/erd_relation_painter.dart.erd_layout,erd_router,erd_geometryfromfeatures/erdtocore/erd.ErdLayoutEngine(lib/core/erd/erd_layout_engine.dart): visible-schema, saved-position merge, neighbour/junction maps, focus and search, previously private methods of the view state.test/core/erd/erd_layout_engine_test.dart: pure unit tests, no widget tester.erd_view.dartre-exportserdCardBuildsandroundedPathso existing importers keep working. No behaviour change intended.Not done yet (stays on #1362)
erd_view.dartis still ~2400 lines (acceptance: < 300).ErdViewController(selection/focus/search), and export flows are still in the view state.erd_view.darttoday, so there is nothing to extract.Not run locally; CI is the check.