Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

fix(vscode): Routes gets reset upon opening in vscode. #2034

Merged
merged 1 commit into from
Jun 23, 2023
Merged

fix(vscode): Routes gets reset upon opening in vscode. #2034

merged 1 commit into from
Jun 23, 2023

Conversation

lordrip
Copy link
Member

@lordrip lordrip commented Jun 23, 2023

Context

Currently, there are two effects taking care of the syncing process between the VS Code file and KaotoUI (and source code) in the KogitoEditorIntegrationProvider.tsx file. Said effects react when one of the several dependencies changes, like flows or settings.

This causes a recursive call since the same effects are updating the setting object from which they depend.

Changes

The fix is for the effect to rely only on the intended property.

This is still colliding with the Sourcecode sync that it's happening in the Visualization.tsx component. A follow-up will be needed to consolidate both scenarios.

fixes: KaotoIO/vscode-kaoto#285

@lordrip lordrip requested a review from a team June 23, 2023 11:55
Currently, there are two effects taking care of the syncing process
between the VS Code file and KaotoUI (and source code) in the
KogitoEditorIntegrationProvider.tsx file. Said effects reacts when
one of the several dependencies changes, like flows or settings.

This causes a recursive call since the same effects are updating the
setting object from which they depends.

The fix is for the effect to rely only in the intended property.

This is still colliding with the Sourcecode sync that it's happening
in the Visualization.tsx component. A follow up will be needed to
consolidate both scenarios.

fixes: KaotoIO/vscode-kaoto#285
@sonarcloud
Copy link

sonarcloud bot commented Jun 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Merging #2034 (f079a93) into main (3f973f4) will increase coverage by 0.28%.
The diff coverage is 54.71%.

@@            Coverage Diff             @@
##             main    #2034      +/-   ##
==========================================
+ Coverage   64.78%   65.07%   +0.28%     
==========================================
  Files          87       87              
  Lines        2837     2849      +12     
  Branches      652      656       +4     
==========================================
+ Hits         1838     1854      +16     
+ Misses        953      948       -5     
- Partials       46       47       +1     
Impacted Files Coverage Δ
...to-integration/KogitoEditorIntegrationProvider.tsx 0.00% <0.00%> (ø)
src/components/metadata/MetadataToolbarItems.tsx 97.05% <92.85%> (+0.90%) ⬆️
src/components/KaotoToolbar.tsx 54.95% <100.00%> (ø)
src/components/Visualization.tsx 74.52% <100.00%> (ø)
src/components/metadata/MetadataEditorModal.tsx 86.95% <100.00%> (+1.71%) ⬆️

@apupier
Copy link
Member

apupier commented Jun 23, 2023

Tested locally in VS Code and I do not reproduce anymore the initial issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Routes are reset to empty when opening them with the Kaoto Editor (main branch of kaoto UI)
2 participants