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

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

Merged
merged 1 commit into from
Oct 22, 2022

Conversation

hein-j
Copy link
Contributor

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

Description of changes:

  • Add props to the instantiation of ArrayField wrapping the Autogen component
  • Handle new props in the ArrayField component

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 21, 2022 22:33
@codecov-commenter
Copy link

Codecov Report

Merging #724 (e1e0aae) into tagged-release/cms-support (deed693) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                      Coverage Diff                       @@
##           tagged-release/cms-support     #724      +/-   ##
==============================================================
+ Coverage                       91.89%   91.96%   +0.06%     
==============================================================
  Files                             111      113       +2     
  Lines                            4083     4130      +47     
  Branches                         1126     1137      +11     
==============================================================
+ Hits                             3752     3798      +46     
- Misses                            310      311       +1     
  Partials                           21       21              
Impacted Files Coverage Δ
...react/lib/forms/form-renderer-helper/form-state.ts 98.57% <100.00%> (-0.70%) ⬇️
...n-ui-react/lib/forms/form-renderer-helper/index.ts 100.00% <100.00%> (ø)
...s/form-renderer-helper/invalid-variable-helpers.ts 100.00% <100.00%> (ø)
...b/forms/form-renderer-helper/render-array-field.ts 100.00% <100.00%> (ø)
.../codegen-ui-react/lib/forms/react-form-renderer.ts 83.01% <100.00%> (+0.32%) ⬆️
...s/codegen-ui-react/lib/react-component-renderer.ts 100.00% <100.00%> (ø)
...-ui-react/lib/utils/forms/array-field-component.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 deed693...e1e0aae. Read the comment docs.

Copy link
Contributor

@SwaySway SwaySway left a comment

Choose a reason for hiding this comment

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

🚀

@hein-j hein-j merged commit 114540d into tagged-release/cms-support Oct 22, 2022
@hein-j hein-j deleted the hasOne/array branch October 22, 2022 00:41
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