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

fix(code-editor): Update schema upon syncing the code #1971

Merged
merged 1 commit into from
Jun 16, 2023
Merged

fix(code-editor): Update schema upon syncing the code #1971

merged 1 commit into from
Jun 16, 2023

Conversation

lordrip
Copy link
Collaborator

@lordrip lordrip commented Jun 15, 2023

Context

Currently, the validation schema is set whenever the code editor is mounted and in case of the user updates the DSL then the schema no longer applies, showing a yellow squiggle.

The fix is to listen to the dsl property and set the appropriate schema when changes.

Before

Screencast.from.2023-06-15.21-53-06.webm

After

Screencast.from.2023-06-15.21-49-38.webm

fixes: #1166

Currently, the validation schema is set whenever the code editor
is mounted and in case of the user updates the DSL then the
schema no longer applies, showing a yellow squiggle.

The fix is to listen to the dsl property and set the appropriate
schema when changes.

fixes: #1166
@lordrip lordrip requested a review from a team June 15, 2023 19:56
@sonarqubecloud
Copy link

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 15, 2023

Codecov Report

Merging #1971 (7efae15) into main (0c1d880) will increase coverage by 0.33%.
The diff coverage is 78.57%.

@@            Coverage Diff             @@
##             main    #1971      +/-   ##
==========================================
+ Coverage   60.72%   61.05%   +0.33%     
==========================================
  Files          78       78              
  Lines        2546     2550       +4     
  Branches      576      576              
==========================================
+ Hits         1546     1557      +11     
+ Misses        956      948       -8     
- Partials       44       45       +1     
Impacted Files Coverage Δ
src/api/requestService.ts 86.20% <75.00%> (+23.24%) ⬆️
src/components/SourceCodeEditor.tsx 57.81% <80.00%> (+2.97%) ⬆️

@lordrip lordrip merged commit c23625c into kaoto-archive:main Jun 16, 2023
@lordrip lordrip deleted the fix/update-schema-upon-update branch July 10, 2023 11:26
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.

Editor: update validation schema without closing the editor
2 participants