feat: Native macOS inline error banners (replace blocking dialogs)#12
Merged
feat: Native macOS inline error banners (replace blocking dialogs)#12
Conversation
…anners ## 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.
There was a problem hiding this comment.
Pull request overview
This PR replaces blocking alert dialogs for query errors with native macOS-style inline error banners that follow Apple Human Interface Guidelines. The change improves user experience by making errors non-blocking and more visually integrated with the macOS design language.
Key Changes:
- Removed blocking error alert dialogs in favor of inline banners
- Implemented native macOS error banner styling with system colors and icons
- Enhanced pagination support with server-side controls
- Added create table UI functionality with comprehensive template support
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
session-ses_4a1b.md |
Session log documenting UI/UX redesign work |
UI_UX_COMPLETE_GUIDE.md |
Complete user guide for the new Create Table interface |
MainContentView.swift |
Removed error alert handler, added pagination callbacks |
MainContentCoordinator.swift |
Removed error alert properties, added pagination and table creation methods |
TableTabContentView.swift |
Added error banner display and pagination support |
QueryTabContentView.swift |
Added pagination callback parameters |
MainStatusBarView.swift |
Enhanced with pagination controls display |
MainEditorContentView.swift |
Added error banner, create table tab support, pagination callbacks |
MainContentAlerts.swift |
Removed blocking error alert dialog |
| Multiple Editor Views | New table creation UI components (TemplateSheets, DataTypePicker, CreateTableView, etc.) |
DesignConstants.swift |
Added colors, animation durations, corner radius, and column width constants |
TableProApp.swift |
Added "New Table" menu item with keyboard shortcut |
TableCreationModels.swift |
Models for table creation functionality |
QueryTab.swift |
Enhanced pagination state with navigation methods |
TableTemplateStorage.swift |
Storage system for table templates |
TableQueryBuilder.swift |
Added pagination offset support |
DDLParser.swift |
Parser for importing CREATE TABLE statements |
CreateTableService.swift |
Service for generating CREATE TABLE SQL |
SQLStatementGenerator.swift |
Enhanced UPDATE/DELETE safety with LIMIT 1 |
DataChangeManager.swift |
Improved error handling for updates without primary keys |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Create Views/Shared/InlineErrorBanner.swift with reusable error banner - Remove duplicated errorBanner code from MainEditorContentView (~50 lines) - Remove duplicated errorBanner code from TableTabContentView (~42 lines) - Add smooth dismiss animation (.easeInOut 0.2s) - Fix misplaced dismissError() in DiscardAction enum that broke build
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 35 out of 35 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Overview
Replaces blocking alert dialogs for query errors with native macOS-style inline error banners that follow Apple Human Interface Guidelines.
🔄 Changes
Before ❌
After ✅
🎨 Native macOS Design
The error banner now follows Apple's design language:
exclamationmark.circle.fillwith multicolor rendering (native macOS style)controlBackgroundColor(adapts to light/dark mode)separatorColor.primarycolor (not red - better readability)xmarkbutton with hover effect📸 Screenshot
🔧 Technical Details
Files Modified
TablePro/Views/Main/Child/MainEditorContentView.swift- Added native error bannerTablePro/Views/Main/Child/TableTabContentView.swift- Added error displayTablePro/Views/Main/MainContentCoordinator.swift- Removed alert propertiesTablePro/Views/MainContentView.swift- Removed alert handlerTablePro/Views/Main/Child/MainContentAlerts.swift- Removed error alertImplementation
✅ Benefits
🧪 Testing
Tested with various error scenarios:
SELECT * FROM nonexistent_tableSELECT invalid syntax📝 Notes
This PR also includes previous session work on:
All features have been tested and are working correctly.
🔗 Related
Addresses user feedback about disruptive error dialogs breaking workflow.