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

feat: init form support for has-one relationship #718

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

hein-j
Copy link
Contributor

@hein-j hein-j commented Oct 18, 2022

Description of changes:

  • Allow forms with required relationships to be mapped
  • Map relationship fields to form definition element and form metaData as Autocomplete
  • Generate default valueMappings from related model info for HAS_ONE model-type relationships

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 requested a review from a team as a code owner October 18, 2022 17:26
@codecov-commenter
Copy link

Codecov Report

Merging #718 (584a15c) into tagged-release/cms-support (40f5b94) will increase coverage by 0.05%.
The diff coverage is 91.80%.

Impacted file tree graph

@@                      Coverage Diff                       @@
##           tagged-release/cms-support     #718      +/-   ##
==============================================================
+ Coverage                       91.50%   91.56%   +0.05%     
==============================================================
  Files                             101      101              
  Lines                            3895     3922      +27     
  Branches                         1078     1092      +14     
==============================================================
+ Hits                             3564     3591      +27     
  Misses                            310      310              
  Partials                           21       21              
Impacted Files Coverage Δ
packages/codegen-ui/lib/check-support.ts 100.00% <ø> (ø)
...generate-form-definition/helpers/field-type-map.ts 100.00% <ø> (ø)
packages/codegen-ui/lib/types/form/index.ts 100.00% <ø> (ø)
...es/codegen-ui/lib/utils/form-component-metadata.ts 85.36% <72.22%> (-0.69%) ⬇️
...lib/generate-form-definition/helpers/form-field.ts 100.00% <100.00%> (ø)
...te-form-definition/helpers/model-fields-configs.ts 100.00% <100.00%> (ø)

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 40f5b94...584a15c. Read the comment docs.

@hein-j hein-j merged commit ad46b59 into tagged-release/cms-support Oct 18, 2022
@hein-j hein-j deleted the feat/hasOne branch October 18, 2022 18:30
hein-j added a commit that referenced this pull request Oct 18, 2022
Co-authored-by: Hein Jeong <heinje@amazon.com>
zchenwei added a commit that referenced this pull request Nov 17, 2022
* feat: init form support for has-one relationship (#718)

Co-authored-by: Hein Jeong <heinje@amazon.com>

* chore: wrap relationship fields in ArrayField (#719)

Co-authored-by: Hein Jeong <heinje@amazon.com>

* chore: split up form-renderer-helper (#720)

Co-authored-by: Hein Jeong <heinje@amazon.com>

* chore: map props on relationship-based Autocomplete (#721)

Co-authored-by: Hein Jeong <heinje@amazon.com>

* feat: add relationship suggestion query to forms (#722)

* feat: add relationship suggestion query

* chore: map props on relationship-based Autocomplete (#721)

Co-authored-by: Hein Jeong <heinje@amazon.com>

* feat: add relationship suggestion query

* fix: remove extra declarations

Co-authored-by: Scott Young <scoyou@amazon.com>
Co-authored-by: Hein Jeong <73264629+hein-j@users.noreply.github.com>
Co-authored-by: Hein Jeong <heinje@amazon.com>

* fix: hide cancel button by default (#696)

* chore: modify ArrayField to support has-one relationships (#724)

Co-authored-by: Hein Jeong <heinje@amazon.com>

* chore: support not-model HAS_ONE relationships (#726)

Co-authored-by: Hein Jeong <heinje@amazon.com>

* chore: map type file for model fields (#727)

Co-authored-by: Hein Jeong <heinje@amazon.com>

* feat: add handling for excluded sectional elements

* fix: cli test fix

* fix: handle association breaking changes for new schema

* Add support for "belongsTo" relationships for create forms (#755)

* feat: wip belongs to support

* feat: belongsTo working for create form

* chore: add golden file for belongsTo create form

* fix: arrayfield/autocomplete bugs

* chore: update snapshots

* chore: handle review comments

* chore: add tests and update snapshots

* feat: adding many to many support for form creation

* test: fix tests

* test: fix test

* feat: adding many-to-many relationship create form golden file

* chore: update create file

* test: fix test

* test: fix unit tests

* test: fix tests

* fix: fix merge conflicts

* test: fix timestamp type

* chore: add tag update form golden file with manyToMany relationship

Co-authored-by: Hein Jeong <73264629+hein-j@users.noreply.github.com>
Co-authored-by: Hein Jeong <heinje@amazon.com>
Co-authored-by: Scott Young <snyoung@gmail.com>
Co-authored-by: Scott Young <scoyou@amazon.com>
Co-authored-by: Josue Ruiz <7465495+SwaySway@users.noreply.github.com>
Co-authored-by: Roshane Pascual <rotp@amazon.com>
Co-authored-by: Brandon Lyons <lyonsbp@amazon.com>
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