Skip to content

Commit d05be6d

Browse files
authored
Merge branch 'main' into feat/import-datagrip
Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
2 parents 4020989 + a6e115d commit d05be6d

6 files changed

Lines changed: 103 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- Import connections and passwords from DataGrip, including SSH tunnels and SSL settings. The source app doesn't need to be running. (#1374)
1313

14+
## [0.43.3] - 2026-05-22
15+
16+
### Fixed
17+
18+
- Fixed a crash when adding a row while a cell editor or value viewer was open (#1378)
19+
1420
## [0.43.2] - 2026-05-22
1521

1622
### Changed
@@ -1947,7 +1953,8 @@ TablePro is a native macOS database client built with SwiftUI and AppKit, design
19471953
- Custom SQL query templates
19481954
- Performance optimized for large datasets
19491955

1950-
[Unreleased]: https://github.com/TableProApp/TablePro/compare/v0.43.2...HEAD
1956+
[Unreleased]: https://github.com/TableProApp/TablePro/compare/v0.43.3...HEAD
1957+
[0.43.3]: https://github.com/TableProApp/TablePro/compare/v0.43.2...v0.43.3
19511958
[0.43.2]: https://github.com/TableProApp/TablePro/compare/v0.43.1...v0.43.2
19521959
[0.43.1]: https://github.com/TableProApp/TablePro/compare/v0.43.0...v0.43.1
19531960
[0.43.0]: https://github.com/TableProApp/TablePro/compare/v0.42.0...v0.43.0

TablePro.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,7 +2361,7 @@
23612361
CODE_SIGN_IDENTITY = "Apple Development";
23622362
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
23632363
CODE_SIGN_STYLE = Automatic;
2364-
CURRENT_PROJECT_VERSION = 88;
2364+
CURRENT_PROJECT_VERSION = 89;
23652365
DEAD_CODE_STRIPPING = YES;
23662366
DEVELOPMENT_TEAM = D7HJ5TFYCU;
23672367
ENABLE_APP_SANDBOX = NO;
@@ -2393,7 +2393,7 @@
23932393
);
23942394
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/Libs/dylibs";
23952395
MACOSX_DEPLOYMENT_TARGET = 14.0;
2396-
MARKETING_VERSION = 0.43.2;
2396+
MARKETING_VERSION = 0.43.3;
23972397
OTHER_LDFLAGS = (
23982398
"-Wl,-w",
23992399
"-force_load",
@@ -2438,7 +2438,7 @@
24382438
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
24392439
CODE_SIGN_STYLE = Automatic;
24402440
COPY_PHASE_STRIP = YES;
2441-
CURRENT_PROJECT_VERSION = 88;
2441+
CURRENT_PROJECT_VERSION = 89;
24422442
DEAD_CODE_STRIPPING = YES;
24432443
DEPLOYMENT_POSTPROCESSING = YES;
24442444
DEVELOPMENT_TEAM = D7HJ5TFYCU;
@@ -2471,7 +2471,7 @@
24712471
);
24722472
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/Libs/dylibs";
24732473
MACOSX_DEPLOYMENT_TARGET = 14.0;
2474-
MARKETING_VERSION = 0.43.2;
2474+
MARKETING_VERSION = 0.43.3;
24752475
OTHER_LDFLAGS = (
24762476
"-Wl,-w",
24772477
"-force_load",

TablePro/Views/Results/KeyHandlingTableView.swift

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,29 @@ import AppKit
33
final class KeyHandlingTableView: NSTableView {
44
weak var coordinator: TableViewCoordinator?
55

6-
private var isRaisingOverlayEditor = false
7-
private var isRaisingOverlayViewer = false
6+
private var isRaisingOverlay = false
87

98
override var acceptsFirstResponder: Bool {
109
true
1110
}
1211

1312
override func didAddSubview(_ subview: NSView) {
1413
super.didAddSubview(subview)
15-
raiseOverlayIfNeeded(coordinator?.overlayEditor, subview: subview, flag: &isRaisingOverlayEditor)
16-
raiseOverlayIfNeeded(coordinator?.overlayViewer, subview: subview, flag: &isRaisingOverlayViewer)
14+
guard !isRaisingOverlay else { return }
15+
isRaisingOverlay = true
16+
defer { isRaisingOverlay = false }
17+
raiseOverlayIfNeeded(coordinator?.overlayEditor, subview: subview)
18+
raiseOverlayIfNeeded(coordinator?.overlayViewer, subview: subview)
1719
}
1820

19-
private func raiseOverlayIfNeeded(_ overlay: CellOverlayBase?, subview: NSView, flag: inout Bool) {
20-
guard !flag else { return }
21+
private func raiseOverlayIfNeeded(_ overlay: CellOverlayBase?, subview: NSView) {
2122
guard let overlay,
2223
overlay.isActive,
2324
let container = overlay.containerView,
2425
container !== subview,
2526
container.superview === self,
2627
subviews.last !== container else { return }
27-
flag = true
2828
overlay.raiseToFront()
29-
flag = false
3029
}
3130

3231
var selection = TableSelection() {
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
//
2+
// KeyHandlingTableViewOverlayTests.swift
3+
// TableProTests
4+
//
5+
6+
import AppKit
7+
import Foundation
8+
import SwiftUI
9+
import TableProPluginKit
10+
import Testing
11+
12+
@testable import TablePro
13+
14+
@MainActor
15+
private final class StubColumnLayoutPersister: ColumnLayoutPersisting {
16+
func load(for tableName: String, connectionId: UUID) -> ColumnLayoutState? { nil }
17+
func save(_ layout: ColumnLayoutState, for tableName: String, connectionId: UUID) {}
18+
func clear(for tableName: String, connectionId: UUID) {}
19+
}
20+
21+
@Suite("KeyHandlingTableView overlay raise")
22+
@MainActor
23+
struct KeyHandlingTableViewOverlayTests {
24+
private func makeCoordinator() -> TableViewCoordinator {
25+
TableViewCoordinator(
26+
changeManager: AnyChangeManager(DataChangeManager()),
27+
isEditable: true,
28+
selectedRowIndices: .constant([]),
29+
delegate: nil,
30+
layoutPersister: StubColumnLayoutPersister()
31+
)
32+
}
33+
34+
@Test("adding a subview while an overlay is active raises it to front without trapping")
35+
func addingSubviewRaisesActiveOverlay() {
36+
let tableView = KeyHandlingTableView()
37+
let coordinator = makeCoordinator()
38+
tableView.coordinator = coordinator
39+
40+
let editor = CellOverlayEditor()
41+
coordinator.overlayEditor = editor
42+
let container = CellOverlayContainerView(frame: NSRect(x: 0, y: 0, width: 80, height: 24))
43+
editor.install(in: tableView, row: 0, column: 0, columnIndex: 0, container: container)
44+
45+
tableView.addSubview(NSView(frame: NSRect(x: 0, y: 0, width: 10, height: 10)))
46+
47+
#expect(tableView.subviews.last === container)
48+
49+
editor.removeOverlay()
50+
}
51+
}

appcast.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22
<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
33
<channel>
44
<title>TablePro</title>
5+
<item>
6+
<title>0.43.3</title>
7+
<pubDate>Fri, 22 May 2026 08:28:56 +0000</pubDate>
8+
<sparkle:version>89</sparkle:version>
9+
<sparkle:shortVersionString>0.43.3</sparkle:shortVersionString>
10+
<sparkle:minimumSystemVersion>14.0</sparkle:minimumSystemVersion>
11+
<sparkle:hardwareRequirements>arm64</sparkle:hardwareRequirements>
12+
<description><![CDATA[<h3>Fixed</h3>
13+
<ul>
14+
<li>Fixed a crash when adding a row while a cell editor or value viewer was open (#1378)</li>
15+
</ul>
16+
]]></description>
17+
<enclosure url="https://github.com/TableProApp/TablePro/releases/download/v0.43.3/TablePro-0.43.3-arm64.zip" length="18067071" type="application/octet-stream" sparkle:edSignature="IUr2nMUqpRT2yaifFxRaQQfe1owlHUzbUiE0W88EG5God8FFK9wnJEEVRPHJnentpDUHQZhPZBqmiT7tDJRRBA=="/>
18+
</item>
19+
<item>
20+
<title>0.43.3</title>
21+
<pubDate>Fri, 22 May 2026 08:28:56 +0000</pubDate>
22+
<sparkle:version>89</sparkle:version>
23+
<sparkle:shortVersionString>0.43.3</sparkle:shortVersionString>
24+
<sparkle:minimumSystemVersion>14.0</sparkle:minimumSystemVersion>
25+
<description><![CDATA[<h3>Fixed</h3>
26+
<ul>
27+
<li>Fixed a crash when adding a row while a cell editor or value viewer was open (#1378)</li>
28+
</ul>
29+
]]></description>
30+
<enclosure url="https://github.com/TableProApp/TablePro/releases/download/v0.43.3/TablePro-0.43.3-x86_64.zip" length="19044179" type="application/octet-stream" sparkle:edSignature="g3Y6MKhJ/nZBj+Gb1tK1OKqOZhpAdiTfEh/adS4m+q6deSdqtDTLLhFxTpHNNt54+B0XjrpKgNKi54ruAQLsDg=="/>
31+
</item>
532
<item>
633
<title>0.43.2</title>
734
<pubDate>Fri, 22 May 2026 03:54:07 +0000</pubDate>

docs/changelog.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ description: "Product updates and announcements for TablePro"
44
rss: true
55
---
66

7+
<Update label="May 22, 2026" description="v0.43.3">
8+
### Bug Fixes
9+
10+
- **Add Row Crash**: Adding a row no longer crashes when a cell editor or value viewer is open (#1378)
11+
</Update>
12+
713
<Update label="May 22, 2026" description="v0.43.2">
814
### Improvements
915

0 commit comments

Comments
 (0)