Skip to content

feat(QueryEditor): add error highlighting#1833

Merged
Raubzeug merged 5 commits intomainfrom
highlight-errors-1796
Jan 20, 2025
Merged

feat(QueryEditor): add error highlighting#1833
Raubzeug merged 5 commits intomainfrom
highlight-errors-1796

Conversation

@Raubzeug
Copy link
Copy Markdown
Contributor

@Raubzeug Raubzeug commented Jan 16, 2025

closes #1796
Stand

CI Results

Test Status: ❌ FAILED

📊 Full Report

Total Passed Failed Flaky Skipped
262 260 1 1 0

😟 No changes in tests. 😕

Bundle Size: 🔺

Current: 80.05 MB | Main: 79.96 MB
Diff: +0.09 MB (0.11%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@astandrik astandrik requested a review from Copilot January 17, 2025 11:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comment thread src/utils/monaco/highlightErrors.ts Outdated
Comment thread src/utils/monaco/highlightErrors.ts Outdated
Comment thread src/utils/monaco/highlightErrors.ts Outdated
Comment thread src/utils/monaco/highlightErrors.ts Outdated
disableErrorsHighlighting();

clearTimeout(errorsHighlightingTimeoutId);
errorsHighlightingTimeoutId = setTimeout(() => highlightErrors(), 500);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will it highlight incorrect errors if I change editor within 500 ms?

@Raubzeug Raubzeug force-pushed the highlight-errors-1796 branch from 2caf2d8 to 3f22c2f Compare January 17, 2025 12:49
@Raubzeug Raubzeug requested a review from astandrik January 17, 2025 12:49
Comment thread src/utils/monaco/highlightErrors.ts Outdated
@Raubzeug Raubzeug requested a review from astandrik January 17, 2025 13:23
Comment thread src/utils/monaco/highlightErrors.ts Outdated

const owner = 'ydb';

export function useUpdateErrorsHighlighting() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets try debounce approach - if its appliable here

@Raubzeug Raubzeug force-pushed the highlight-errors-1796 branch from 33c068b to 525357c Compare January 20, 2025 11:26
@Raubzeug Raubzeug requested a review from astandrik January 20, 2025 11:26

const owner = 'ydb';

const debouncedHighlightErrors = debounce(highlightErrors, 500);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should cancel it on useEffect return

astandrik
astandrik previously approved these changes Jan 20, 2025
@Raubzeug Raubzeug added this pull request to the merge queue Jan 20, 2025
Merged via the queue into main with commit b89d084 Jan 20, 2025
@Raubzeug Raubzeug deleted the highlight-errors-1796 branch January 20, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Highlight errors in query text in query editor

3 participants