Skip to content

feat(QueryEditor): add error highlighting #1833

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

Merged
merged 5 commits into from
Jan 20, 2025
Merged

Conversation

Raubzeug
Copy link
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
Contributor

@Copilot 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.

disableErrorsHighlighting();

clearTimeout(errorsHighlightingTimeoutId);
errorsHighlightingTimeoutId = setTimeout(() => highlightErrors(), 500);
Copy link
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
@Raubzeug Raubzeug requested a review from astandrik January 17, 2025 13:23

const owner = 'ydb';

export function useUpdateErrorsHighlighting() {
Copy link
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
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
4 of 5 checks passed
@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
2 participants