Skip to content

Commit ab8e269

Browse files
authored
Merge pull request #599 from TableProApp/refactor/nsundo-manager-migration
refactor: migrate undo system from custom stacks to NSUndoManager
2 parents 66fb64b + cd81f16 commit ab8e269

File tree

11 files changed

+602
-1091
lines changed

11 files changed

+602
-1091
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
- Use sheet presentation for all file open/save panels instead of free-floating dialogs
2424
- Replace event monitor with native SwiftUI .onKeyPress() in connection switcher
2525
- Extract reusable SearchFieldView component from 4 custom search field implementations
26-
- Replace custom resize handle with native NSSplitView for inspector panel
26+
27+
### Changed
28+
29+
- Migrate undo system from custom stacks to NSUndoManager — Edit menu now shows "Undo Edit Cell", "Undo Delete Row", etc.
2730

2831
### Added
2932

TablePro/ContentView.swift

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,7 @@ struct ContentView: View {
226226
} detail: {
227227
// MARK: - Detail (Main workspace with optional right sidebar)
228228
if let currentSession = currentSession, let rightPanelState, let sessionState {
229-
HorizontalSplitView(
230-
isTrailingCollapsed: !rightPanelState.isPresented,
231-
trailingWidth: Bindable(rightPanelState).panelWidth,
232-
minTrailingWidth: RightPanelState.minWidth,
233-
maxTrailingWidth: RightPanelState.maxWidth,
234-
autosaveName: "InspectorSplit"
235-
) {
229+
HStack(spacing: 0) {
236230
MainContentView(
237231
connection: currentSession.connection,
238232
payload: payload,
@@ -250,15 +244,23 @@ struct ContentView: View {
250244
toolbarState: sessionState.toolbarState,
251245
coordinator: sessionState.coordinator
252246
)
253-
} trailing: {
254-
UnifiedRightPanelView(
255-
state: rightPanelState,
256-
inspectorContext: inspectorContext,
257-
connection: currentSession.connection,
258-
tables: currentSession.tables
259-
)
260-
.background(Color(nsColor: .windowBackgroundColor))
247+
.frame(maxWidth: .infinity)
248+
249+
if rightPanelState.isPresented {
250+
PanelResizeHandle(panelWidth: Bindable(rightPanelState).panelWidth)
251+
Divider()
252+
UnifiedRightPanelView(
253+
state: rightPanelState,
254+
inspectorContext: inspectorContext,
255+
connection: currentSession.connection,
256+
tables: currentSession.tables
257+
)
258+
.frame(width: rightPanelState.panelWidth)
259+
.background(Color(nsColor: .windowBackgroundColor))
260+
.transition(.move(edge: .trailing))
261+
}
261262
}
263+
.animation(.easeInOut(duration: 0.2), value: rightPanelState.isPresented)
262264
} else {
263265
VStack(spacing: 16) {
264266
ProgressView()

0 commit comments

Comments
 (0)