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: renames model variable name from props for update forms #950

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

Jshhhh
Copy link
Contributor

@Jshhhh Jshhhh commented Mar 20, 2023

Problem

Same Model name and field name causes colliding variable name in render.

Solution

Rename destructured model prop name

Links

Ticket

GitHub issue

Verification

Manual tests

Create a model with a field with same name. Render update form.

Automated tests

  • Unit tests added/updated
  • E2E tests added/updated
  • [ ]
    By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

hein-j
hein-j previously approved these changes Mar 20, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2023

Codecov Report

Merging #950 (8540078) into main (fa0daaf) will increase coverage by 0.00%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #950   +/-   ##
=======================================
  Coverage   92.98%   92.99%           
=======================================
  Files         120      120           
  Lines        5248     5250    +2     
  Branches     1552     1552           
=======================================
+ Hits         4880     4882    +2     
  Misses        347      347           
  Partials       21       21           
Impacted Files Coverage Δ
...-react/lib/forms/form-renderer-helper/all-props.ts 100.00% <100.00%> (ø)
...-react/lib/forms/form-renderer-helper/cta-props.ts 100.00% <100.00%> (ø)
.../forms/form-renderer-helper/event-handler-props.ts 99.00% <100.00%> (ø)
.../codegen-ui-react/lib/forms/react-form-renderer.ts 96.46% <100.00%> (ø)
packages/codegen-ui-react/lib/helpers/index.ts 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

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

@Jshhhh Jshhhh force-pushed the update-form-model-prop-name branch from c4c71f2 to cdd24d3 Compare March 20, 2023 19:40
hein-j
hein-j previously approved these changes Mar 20, 2023
Copy link
Contributor

@letsbelopez letsbelopez left a comment

Choose a reason for hiding this comment

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

lgtm

@Jshhhh Jshhhh marked this pull request as ready for review March 20, 2023 21:19
@Jshhhh Jshhhh requested a review from a team as a code owner March 20, 2023 21:19
@Jshhhh Jshhhh merged commit 3c64288 into main Mar 20, 2023
@Jshhhh Jshhhh deleted the update-form-model-prop-name branch March 20, 2023 21:37
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.

None yet

5 participants