amplify-codegen-ui icon indicating copy to clipboard operation
amplify-codegen-ui copied to clipboard

feat: prioritize override values in initialValues

Open roryscot opened this issue 1 year ago • 2 comments

  • feat: prioritize override values in initialValues
  • chore(release): v3.0.0

Problem

Generated forms currently require manual editing to incorporate override values, which makes them less scalable and limits their out-of-the-box usability.

Solution

Implement a mechanism to pass override properties as default values for the form's modelFields or initialValues. This approach will enable most custom logic to be handled externally, enhancing the versatility and out-of-the-box usability of the generated forms.

Additional Notes

Links

Ticket

GitHub issue:

https://github.com/aws-amplify/amplify-codegen-ui/issues/1165

Verification

Manual tests

Automated tests

  • [x] Unit tests added/updated
  • [ ] E2E tests added/updated
  • [ ] N/A - (provide a reason)
  • [ ] deferred - (provide GitHub issue for tracking)

Housekeeping

  • [x] No non-essential console logs
  • [x] All new files contain license notice

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

roryscot avatar Jul 26 '24 19:07 roryscot

Closes #1165

roryscot avatar Jul 26 '24 19:07 roryscot

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.87%. Comparing base (8d8ecbe) to head (9d5d309).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1166   +/-   ##
=======================================
  Coverage   93.86%   93.87%           
=======================================
  Files         150      150           
  Lines        6114     6118    +4     
  Branches     1838     1841    +3     
=======================================
+ Hits         5739     5743    +4     
  Misses        357      357           
  Partials       18       18           
Files Coverage Δ
...react/lib/forms/form-renderer-helper/form-state.ts 98.96% <100.00%> (+0.02%) :arrow_up:

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 8d8ecbe...9d5d309. Read the comment docs.

codecov-commenter avatar Jul 26 '24 19:07 codecov-commenter