You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: remember the schema visualizer's manual table layout (#1555)
Dragged node positions are now persisted in a localStorage-backed
TanStack DB collection (uiPersistentStateCollection) scoped per schema,
so a manual arrangement survives leaving the visualizer and full page
reloads. Saved positions are merged over the ELK auto-layout on mount,
so tables without a remembered position (for example newly created
ones) still fall back to auto-layout, and the existing Reset layout
header action now also clears the remembered manual layout.
Closes#1397
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Remember the schema visualizer's manual table layout. Dragged node positions are now stored in localStorage-backed UI state scoped per schema, so a manual arrangement survives leaving the visualizer and full page reloads. Tables without a remembered position (for example newly created ones) fall back to ELK auto-layout, and the `Reset layout` action clears the remembered layout.
@@ -135,6 +139,9 @@ The following are valid examples of UI state and where they belong:
135
139
- Schema visualizer node positions and layout state: `uiLocalStateCollection` via `useUiState`
136
140
- Scoped by active schema plus the current visualized table set so returning to the same schema graph restores dragged positions without leaking across schemas.
137
141
- Includes the stored ELK baseline positions and reset-layout request token used by the header action.
- Scoped by active schema name (`schema-visualizer:${schema}:manual-layout:node-positions`) with per-table entries, so manual layouts survive reloads, new tables fall back to the ELK auto-layout, and different schemas do not collide.
144
+
- The header `Reset layout` action clears this store in addition to re-applying the ELK baseline.
138
145
- Command-palette `x more...` handoff into table browsing: the same navigation table-name search `useUiState` entry, not a second command-palette-specific table-filter store
139
146
140
147
If new UI state is shared across components, it MUST be assigned to one of these stores (or a new TanStack DB collection added in Studio context).
Copy file name to clipboardExpand all lines: FEATURES.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -150,7 +150,7 @@ Cards keep a fixed width inside their own horizontal scroller, the header toggle
150
150
151
151
Studio includes a schema graph view with table nodes, column metadata, and detected foreign-key relationships labeled as 1:1 or 1:n.
152
152
The visualizer now runs ELK auto-layout with component-aware spacing so disconnected tables do not collapse into the same visual band, and orthogonal step edges leave clearer corridors between nodes.
153
-
Dragged node positions persist when you leave and return to the same schema view, and a header-level `Reset layout` action re-applies the current ELK baseline when you want to discard manual placement.
153
+
Dragged node positions are remembered in localStorage-backed UI state scoped per schema, so a manual arrangement survives leaving the visualizer, switching views, and full page reloads; tables without a remembered position (for example newly created ones) fall back to ELK auto-layout. A header-level `Reset layout` action re-applies the current ELK baseline and forgets the stored manual placement.
154
154
Users can pan/zoom, inspect key and nullable markers, and jump from a node directly to that table’s data view.
0 commit comments