Commit c61f48d
committed
feat: replace blocking error dialogs with native macOS inline error banners
## Summary
Replaced blocking alert dialogs for query errors with native macOS-style inline error banners that follow Apple Human Interface Guidelines.
## Changes
### Error Display (UX Improvement)
- **Before**: Query errors showed as blocking alert dialogs that interrupted workflow
- **After**: Errors display as inline banners at top of results area (non-blocking)
### UI Components
- Added native macOS error banner in `MainEditorContentView`
- Added native macOS error banner in `TableTabContentView`
- Removed alert dialog from `MainContentAlerts`
### Native macOS Design
- Uses `exclamationmark.circle.fill` icon with multicolor rendering
- System background color (`controlBackgroundColor`) for dark/light mode support
- 6px rounded corners (macOS standard)
- Subtle shadow and hairline border (0.5px)
- Compact 12pt text in primary color (not red)
- Small dismiss button with hover effect
### Coordinator Updates
- Removed `showErrorAlert` and `errorAlertMessage` properties
- All error flows now set `tab.errorMessage` directly
- Error banner appears automatically when `errorMessage` is set
### Files Modified
- `TablePro/Views/Main/Child/MainEditorContentView.swift` - Added error banner function
- `TablePro/Views/Main/Child/TableTabContentView.swift` - Added error banner display
- `TablePro/Views/Main/MainContentCoordinator.swift` - Removed alert properties, cleaned up error handling
- `TablePro/Views/MainContentView.swift` - Removed error change handler
- `TablePro/Views/Main/Child/MainContentAlerts.swift` - Removed error alert dialog
## Benefits
✅ Non-blocking workflow - users can continue working while error is visible
✅ Native macOS appearance - matches system design language
✅ Better accessibility - selectable error text, proper contrast
✅ Dark mode support - uses system colors
✅ Professional look - subtle, refined, not distracting
## Testing
Tested with various error scenarios:
- Table not found
- SQL syntax errors
- Connection errors
- Permission errors
All display correctly in both table tabs and query tabs.1 parent e91b3cc commit c61f48d
33 files changed
Lines changed: 8005 additions & 114 deletions
File tree
- TablePro
- Core
- ChangeTracking
- Services
- Storage
- Models
- Theme
- Views
- Components
- Editor
- Main
- Child
- Sidebar
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
514 | | - | |
515 | | - | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
516 | 516 | | |
517 | | - | |
518 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
519 | 520 | | |
520 | | - | |
| 521 | + | |
521 | 522 | | |
522 | 523 | | |
523 | 524 | | |
| |||
Lines changed: 78 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
61 | 62 | | |
62 | | - | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | | - | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
| 74 | + | |
69 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
70 | 83 | | |
71 | 84 | | |
72 | 85 | | |
| |||
277 | 290 | | |
278 | 291 | | |
279 | 292 | | |
280 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
281 | 299 | | |
282 | 300 | | |
283 | 301 | | |
| |||
286 | 304 | | |
287 | 305 | | |
288 | 306 | | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
293 | 343 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
299 | 355 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | 356 | | |
304 | | - | |
| 357 | + | |
305 | 358 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
310 | 366 | | |
311 | 367 | | |
312 | 368 | | |
| |||
0 commit comments