-
-
Notifications
You must be signed in to change notification settings - Fork 305
fix: resolve reported data grid, editor, and filter UX issues #1773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6ed9dc8
73bd384
111e2bf
5043f1e
24a3e2e
93e772a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -421,9 +421,29 @@ struct MainEditorContentView: View { | |
|
|
||
| // MARK: - Results Section | ||
|
|
||
| @ViewBuilder | ||
| private func executionErrorBanner(tab: QueryTab) -> some View { | ||
| if let error = tab.display.activeResultSet?.errorMessage ?? tab.execution.errorMessage { | ||
| InlineErrorBanner( | ||
| message: error, | ||
| onFixWithAI: AppSettingsManager.shared.ai.enabled && tab.tabType == .query | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a table-tab filter/raw-filter query fails, the tab rendering this banner has Useful? React with 👍 / 👎. |
||
| ? { coordinator.fixErrorWithAI(query: tab.content.query, error: error) } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Fresh evidence in this revision is that the new banner callback passes the whole editor buffer, while Useful? React with 👍 / 👎. |
||
| : nil, | ||
| onDismiss: { | ||
| tabManager.mutate(tabId: tab.id) { | ||
| $0.display.activeResultSet?.errorMessage = nil | ||
| $0.execution.errorMessage = nil | ||
| } | ||
| } | ||
| ) | ||
| Divider() | ||
| } | ||
| } | ||
|
|
||
| @ViewBuilder | ||
| private func resultsSection(tab: QueryTab) -> some View { | ||
| VStack(spacing: 0) { | ||
| executionErrorBanner(tab: tab) | ||
| switch tab.display.resultsViewMode { | ||
| case .structure: | ||
| if let tableName = tab.tableContext.tableName { | ||
|
|
@@ -452,14 +472,6 @@ struct MainEditorContentView: View { | |
| Divider() | ||
| } | ||
|
|
||
| if let error = tab.display.activeResultSet?.errorMessage { | ||
| InlineErrorBanner( | ||
| message: error, | ||
| onDismiss: { tab.display.activeResultSet?.errorMessage = nil } | ||
| ) | ||
| Divider() | ||
| } | ||
|
|
||
| let resolvedRows = resolvedTableRows(for: tab) | ||
| if let rs = tab.display.activeResultSet, rs.resultColumns.isEmpty, | ||
| rs.errorMessage == nil, tab.execution.lastExecutedAt != nil, !tab.execution.isExecuting | ||
|
|
@@ -679,7 +691,9 @@ struct MainEditorContentView: View { | |
| set: { newValue in | ||
| coordinator.isUpdatingColumnLayout = true | ||
| if let index = tabManager.selectedTabIndex { | ||
| tabManager.mutate(at: index) { $0.columnLayout = newValue } | ||
| tabManager.mutate(at: index) { tab in | ||
| tab.columnLayout.applyGeometry(from: newValue) | ||
| } | ||
| } | ||
| Task { @MainActor in | ||
| coordinator.isUpdatingColumnLayout = false | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raw SQL filter fields are multiline (
allowsMultiLine: true), but this check only usesCharacterSet.whitespaces, which does not contain\n. When the cursor is at the start of a new/blank line, the function returns true and still asks the SQL-token provider for completions with an empty token, so the popup can appear on empty space despite this fix; use.whitespacesAndNewlines(or include.newlines) before offering token completion.Useful? React with 👍 / 👎.