refactor(erd): extract ErdViewController and ErdCanvas from _ErdViewState
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Refactorización
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- desktop, developer-experience
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Dart
- Estrellas
- 23
- Forks
- 1
- Merge medio
- 31 min
- PR fusionados (30 d)
- 570
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de QueryaHub/Querya-Desktop
-
enhancement ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
QueryaHub/Querya-Desktop#1689 ·
Los mantenedores suelen responder en 1 día
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflowAbiertobug frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
QueryaHub/Querya-Desktop#1642 ·
Los mantenedores suelen responder en 1 día
-
bug error-handling settings
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
QueryaHub/Querya-Desktop#1637 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
QueryaHub/Querya-Desktop#1636 ·
Los mantenedores suelen responder en 1 día
-
enhancement marketplace
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
QueryaHub/Querya-Desktop#1635 ·
Los mantenedores suelen responder en 1 día
Todos los issues de QueryaHub/Querya-Desktop
Issues similares
-
good-first-issue P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
flutter/dart-intellij-third-party#758 ·
Los mantenedores suelen responder en 1 día
-
Bug: Incorrect location coordinates on logged Sound Meter dataPosiblemente ocupada @Jashan32 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
area/archive bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
DarkFlippers/qUnleashed#374 ·
Los mantenedores suelen responder en 1 día
-
agent:in-progress agent:ready feature P2 · 中 区域: 悬浮窗
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
ASDW51/DanmuFloat#178 ·
Los mantenedores suelen responder en 1 día
-
Missing workoutsAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
InlitX/GymMane#237 · 1 comentario ·
Los mantenedores suelen responder en 5 días