fix(drive-integration): link new Add Entry as child of selected parent [INTEG-4524] - #11111
Merged
JuliRossi merged 6 commits intoJul 30, 2026
Merged
Conversation
Franco Banfi (FBanfi)
left a comment
Collaborator
There was a problem hiding this comment.
Looks great! Left a comment that I don't think would end up happing in practice but that may be worth addressing just in case!
… path + rename fmIdx Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ds, fieldMappings, and edges consistent Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… double Object.keys call Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…zedField, drop unnecessary casts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
JuliRossi
requested review from
Franco Banfi (FBanfi) and
david-shibley-contentful
July 24, 2026 15:29
JuliRossi
force-pushed
the
INTEG-4524-child-reference-logic
branch
from
July 24, 2026 18:17
366ff43 to
17d6ca7
Compare
Merged
7 tasks
JuliRossi
added a commit
that referenced
this pull request
Jul 30, 2026
…form [INTEG-4524] (#11110) * refactor: replace AddEntryWizard with AddEntryForm in EditModal This update refactors the EditModal component to utilize the new AddEntryForm for adding entries, simplifying the entry addition process. The AddEntryWizard has been removed, and the related state management has been adjusted accordingly. The AddEntryForm now handles the entry creation logic, including content type selection and field mapping, enhancing the user experience. Additionally, the AddEntryForm is integrated with the existing modal controls for better navigation and state management. * fix(drive-integration): disable Yes radio and block save when content type has no reference fields Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(drive-integration): add integration test for Save wire in AddEntryForm Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(drive-integration): rename Back to Cancel in AddEntryForm — it is a cancel action, not step navigation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(drive-integration): link new Add Entry as child of selected parent [INTEG-4524] (#11111) * updating logic * refactor(AddEntryForm): improve child reference handling and UI logic * test(drive-integration): add coverage for new-entry fieldMapping push path + rename fmIdx Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(drive-integration): guard against parentId undefined to keep fields, fieldMappings, and edges consistent Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor(drive-integration): remove dead ?? 'Link' fallback and avoid double Object.keys call Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor(drive-integration): tighten ParentRefField types, use LocalizedField, drop unnecessary casts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
__ref/sourceEntryIdsare written on the parent; edge isfrom=parent → to=child.New reference logic
flowchart TD A[Select content type for new entry] --> B{Any existing parent<br/>has Entry reference fields?} B -->|No| C[Yes disabled — only No allowed] B -->|Yes| D{Should this new entry be a<br/>reference of an existing entry?} D -->|No| E[Map fields on new entry only] D -->|Yes| F[Select parent entry] F --> G{Parent has how many<br/>Entry reference fields?} G -->|0| H[Save disabled] G -->|1| I[Auto-pick that field] G -->|2+| J[Select parent field] I --> K[Save] J --> K K --> L[Create new child entry] L --> M{Parent field type} M -->|Link| N[Replace parent field value,<br/>sourceEntryIds, and edges] M -->|Array| O[Append child to parent field,<br/>sourceEntryIds, and edges] N --> P["Edge: from=parent → to=child"] O --> PBefore vs after
__reffrom=new → to=existingfrom=parent → to=childTest plan
Made with Cursor