Skip to content

Commit 0990dbb

Browse files
committed
style(datagrid): drop doc comments per no-comments rule
1 parent 08d977a commit 0990dbb

2 files changed

Lines changed: 0 additions & 20 deletions

File tree

TablePro/Views/Results/DataGridCoordinator.swift

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
//
2-
// DataGridCoordinator.swift
3-
// TablePro
4-
//
5-
// Coordinator handling NSTableView delegate and data source for DataGridView.
6-
//
7-
81
import AppKit
92
import SwiftUI
103

114
// MARK: - Coordinator
125

13-
/// Coordinator handling NSTableView delegate and data source
146
@MainActor
157
final class TableViewCoordinator: NSObject, NSTableViewDelegate, NSTableViewDataSource,
168
NSControlTextEditingDelegate, NSTextFieldDelegate, NSMenuDelegate
@@ -32,14 +24,9 @@ final class TableViewCoordinator: NSObject, NSTableViewDelegate, NSTableViewData
3224
var databaseType: DatabaseType?
3325
var tableName: String?
3426
var primaryKeyColumns: [String] = []
35-
/// First PK column, for copy-as-SQL and single-column contexts
3627
var primaryKeyColumn: String? { primaryKeyColumns.first }
3728
var tabType: TabType?
3829

39-
/// Capture current column widths and order from the live NSTableView
40-
/// and persist directly to ColumnLayoutStorage. Called from dismantleNSView
41-
/// to guarantee layout is saved even when the view is torn down without
42-
/// a SwiftUI render cycle (e.g., closing a tab).
4330
func persistColumnLayoutToStorage() {
4431
guard tabType == .table else { return }
4532
guard let tableView, let connectionId, let tableName, !tableName.isEmpty else { return }
@@ -171,7 +158,6 @@ final class TableViewCoordinator: NSObject, NSTableViewDelegate, NSTableViewData
171158
}
172159
}
173160

174-
/// Subscribe to coordinator teardown to release NSTableView cell views.
175161
func observeTeardown(connectionId: UUID) {
176162
teardownObserver = NotificationCenter.default.addObserver(
177163
forName: MainContentCoordinator.teardownNotification,
@@ -184,8 +170,6 @@ final class TableViewCoordinator: NSObject, NSTableViewDelegate, NSTableViewData
184170
}
185171
}
186172

187-
/// Release all data and cell views from the NSTableView.
188-
/// Called during coordinator teardown to free memory while SwiftUI holds the view.
189173
private func releaseData() {
190174
overlayEditor?.dismiss(commit: false)
191175
cachedTableRows = TableRows()

TablePro/Views/Results/DataGridView.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@
99
import AppKit
1010
import SwiftUI
1111

12-
/// Position of a cell in the grid (row, column)
1312
struct CellPosition: Hashable {
1413
let row: Int
1514
let column: Int
1615
}
1716

18-
/// Cached visual state for a row - avoids repeated changeManager lookups
1917
struct RowVisualState {
2018
let isDeleted: Bool
2119
let isInserted: Bool
@@ -24,7 +22,6 @@ struct RowVisualState {
2422
static let empty = RowVisualState(isDeleted: false, isInserted: false, modifiedColumns: [])
2523
}
2624

27-
/// Identity snapshot used to skip redundant updateNSView work when nothing has changed
2825
struct DataGridIdentity: Equatable {
2926
let reloadVersion: Int
3027
let schemaVersion: Int
@@ -54,7 +51,6 @@ struct DataGridIdentity: Equatable {
5451
}
5552
}
5653

57-
/// High-performance table view using AppKit NSTableView
5854
struct DataGridView: NSViewRepresentable {
5955
var tableRowsProvider: @MainActor () -> TableRows = { TableRows() }
6056
var tableRowsMutator: @MainActor (@MainActor (inout TableRows) -> Void) -> Void = { _ in }

0 commit comments

Comments
 (0)