refactor(erd): extract ErdViewController and ErdCanvas from _ErdViewState
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 45/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
Start with erd_view.dart and the existing operations in core/erd, including erd_group_ops, erd_note_ops and erd_saved_layout; first map how _ErdViewState shares its state across handlers. Split the controller and canvas into separate small PRs, then verify erd_view.dart is about 900 lines or less and build is readable. Add unit tests for selection, focus, saved views, groups and notes, and run the existing widget tests under test/features/erd unchanged.
索引モデルが issue の本文から書いたものです。
説明
Follow-up to #1362, which took erd_view.dart from 2,895 to 1,705 lines (layout engine, router and geometry in core/erd, ErdTableCard, ErdRelationPainter, ErdExporter, note and group widgets, search / views / export menus). What is left is one class, _ErdViewState: about 1,580 lines, ~135 members, ~31 state fields, and a 305-line build.
What is still in _ErdViewState
- Canvas: scale, pan, fit (
_setScale,_zoomBy,_fit), tap and hover (_tapCanvas,_hoverCanvas), theInteractiveViewerinbuild. - Selection and focus:
_selectTable,_clearSelection,_syncFocus,_cardFocusFor, search picking. - Saved views:
_applyState,_showState,_switchView,_newView,_renameView,_deleteView,_scheduleSave,_saveNow,_current. - Groups and notes: create, edit, gather, drag, resize.
- Card dragging and re-routing:
_dragStart/_dragMove/_dragEnd,_scheduleRoutes.
Change
ErdViewController(aChangeNotifier, no widget imports) owns selection, focus, search state, saved views, groups and notes. The pure operations that already live incore/erd(erd_group_ops,erd_note_ops,erd_saved_layout) stay there and are called from it.ErdCanvaswidget owns theInteractiveViewer, scale / fit / tap / hover and the drag of cards._ErdViewStatecomposes the two with the toolbar, menus and dialogs.
Acceptance
-
erd_view.dartis at most ~900 lines, andbuildis split into parts of a readable size. - Selection, focus, saved-view switching, groups and notes are covered by unit tests that need no
WidgetTester. - The existing 52 widget tests under
test/features/erdpass unchanged (no loosened expectations). - No change in behaviour or look; hover and drag rebuild only what they rebuilt before (#1169, #1168).
Not in scope
- The minimap from #1362: there is no minimap in the product.
- The "under 300 lines" target of #1362: it no longer describes how the view is built.
Notes
Medium risk (31 fields shared by most handlers); do it as a few small PRs: controller first, canvas second. Low priority unless ERD work is planned.
- 主要言語
- Dart
- スター
- 23
- フォーク
- 1
- 平均マージ
- 31分
- マージ済み PR(30日)
- 570
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
QueryaHub/Querya-Desktop のほかの issue
-
enhancement ui
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
QueryaHub/Querya-Desktop#1689 ·
メンテナーはふだん 1 日以内に返信
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflowオープンbug frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
QueryaHub/Querya-Desktop#1642 ·
メンテナーはふだん 1 日以内に返信
-
bug error-handling settings
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
QueryaHub/Querya-Desktop#1637 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
QueryaHub/Querya-Desktop#1636 ·
メンテナーはふだん 1 日以内に返信
-
enhancement marketplace
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
QueryaHub/Querya-Desktop#1635 ·
メンテナーはふだん 1 日以内に返信
QueryaHub/Querya-Desktop の issue をすべて見る
似ている issue
-
bug to check
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Not all highlighting kinds have examples in DartColorsAndFontsPage対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンgood-first-issue P3
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
flutter/dart-intellij-third-party#758 ·
メンテナーはふだん 1 日以内に返信
-
Bug: Incorrect location coordinates on logged Sound Meter data対応中かも @Jashan32 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信