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: proper use of type from ui builder backend #317

Merged

Conversation

kpranoto-aws
Copy link
Contributor

@kpranoto-aws kpranoto-aws commented Dec 21, 2021

Description of changes:
JS types specified in the type prop is in lowercase, and all of the values pulled from the backend are string literals. Updating the function to take those into account

@kpranoto-aws kpranoto-aws requested a review from a team December 21, 2021 19:13
@codecov-commenter
Copy link

Codecov Report

Merging #317 (018f0e5) into main (ce2c57c) will decrease coverage by 0.06%.
The diff coverage is 73.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #317      +/-   ##
==========================================
- Coverage   89.63%   89.56%   -0.07%     
==========================================
  Files          36       36              
  Lines        1244     1246       +2     
  Branches      278      278              
==========================================
+ Hits         1115     1116       +1     
- Misses        126      127       +1     
  Partials        3        3              
Impacted Files Coverage Δ
...egen-ui-react/lib/react-component-render-helper.ts 75.53% <73.33%> (-0.23%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce2c57c...018f0e5. Read the comment docs.

@yeung-wah
Copy link
Contributor

lgtm, but lets also get a review from @alharris-at/@dpilch on this pr as I am not too familiar with this section of the code

@yeung-wah
Copy link
Contributor

also, I think you might want to push this pr to develop instead of main. We generally push changes into develop first, and merge into main when we do the release

@kpranoto-aws kpranoto-aws changed the base branch from main to develop December 22, 2021 19:28
// object, array, and null
case 'object':
return factory.createJsxExpression(undefined, jsonToLiteral(parsedValue));
default:
Copy link
Member

Choose a reason for hiding this comment

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

Can you add test cases for these scenarios? Type mismatch case as well.

@kpranoto-aws kpranoto-aws force-pushed the proper-ui-builder-props-type branch from 018f0e5 to d134a65 Compare December 28, 2021 21:17
@kpranoto-aws kpranoto-aws force-pushed the proper-ui-builder-props-type branch from d134a65 to 179ef02 Compare December 28, 2021 21:32
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.

4 participants