Skip to content
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

fix(canvas): Refresh canvas after error #715

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

lordrip
Copy link
Member

@lordrip lordrip commented Jan 24, 2024

Context

Currently, if there's an error during a flow parsing, an error message is shown to the user to explain what happens and suggest checking the source code. In the VSCode extension, the canvas doesn't refresh after an error, causing the editor to be stuck until the user closes the extension and reopens it again or switches to another tab.

This commit addresses this issue by assigning a key property to the error boundary component, so it gets refreshed after an entity update that happens only after editing the source code.

fix: #714

Currently, if there's an error during a flow parsing, an error message is shown to the user to explain what happens and suggest checking the source code. In the VSCode extension, the canvas doesn't refresh after an error, causing the editor to be stuck until the user closes the extension and reopens it again or switches to another tab.

This commit addresses this issue by assigning a `key` property to the error boundary component, so it gets refreshed after an entity update that happens only after editing the source code.

fix: KaotoIO#714
@lordrip lordrip changed the title fix(canvas): Refersh canvas after error fix(canvas): Refresh canvas after error Jan 24, 2024
@lordrip lordrip requested a review from apupier January 24, 2024 10:58
@apupier
Copy link
Member

apupier commented Jan 24, 2024

Why are they 26 changes in the UI Review Chromatic job?

@lordrip
Copy link
Member Author

lordrip commented Jan 24, 2024

Why are they 26 changes in the UI Review Chromatic job?

I don't know, seems a bit strange as checking the "changes" don't show anything different at glance

Copy link
Member

@apupier apupier left a comment

Choose a reason for hiding this comment

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

if the changes mentione din UI Review Chromatic job are not too much suspicious, i'm fine with it.

I tested locally and it is working as expected.

I reported a task to have a non-regression test KaotoIO/vscode-kaoto#457

@igarashitm
Copy link
Contributor

It looks like all the stories are considered new one in chromatic. It suggests for some reason chromatic lost the track with current main branch and take the diff. Hoping that's a temporary issue at their side.

@lordrip lordrip merged commit 67bae3c into KaotoIO:main Jan 24, 2024
10 checks passed
@lordrip lordrip deleted the fix/refresh-canvas-after-error branch January 24, 2024 15:45
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.

Canvas stuck after a parsing error
3 participants