feat(drive-integration): add entry wizard for new entry design updates [INTEG-4136]#11027
Merged
Franco Banfi (FBanfi) merged 33 commits intoJun 19, 2026
Merged
Conversation
…G-4136] Wires up the "Add entry" button in the EditModal with a 4-step semi-wizard: select content type → is-reference → select reference entry → select fields. On save, appends a new EntryBlockGraphEntry and applies field assignments. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… [INTEG-4136] Remove wizard-internal buttons. Wizard step state is lifted into EditModal so Modal.Controls drives Back/Next/Save, and the X button cancels as usual. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… [INTEG-4136] Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… fidelity [INTEG-4136] referenceGraph now lives in useState in ReviewPage (same pattern as entryBlockGraph). handleAddEntry appends a reference edge when the wizard's isReference + referenceEntryId are set, so the graph reflects the new relationship immediately without a full workflow re-run. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…on [INTEG-4136] Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…to fieldFormatting [INTEG-4136] Removes duplicated field-option mapping logic shared between getNewLocationForEntry and buildNewLocationForContentType. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n add [INTEG-4136]
Auto-picks the first Link/Entry or Array/Entry field on the content type
and writes { __ref: referenceEntryId } into newEntry.fields so entryService
pass 2 resolves it to a real Contentful link on create.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, selected entry is parent
Parent entry now holds { __ref: newTempId } in its first Link/Entry field.
Reference graph edge is from parent → new child, matching Contentful's data model.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…is child, selected entry is parent" This reverts commit baf8b1f.
…try wizard New step 4 (SelectReferenceField) appears between SelectReference and SelectFields when the chosen content type has more than one Link/Entry or Array/Entry field. Auto-skipped for content types with a single reference field — falls back to auto-picking the first one. User-selected field id is passed through to handleAddEntry. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…to fieldFormatting Replaces inline Link/Entry + Array/Entry checks in MappingView and EditModal with a named predicate, consistent with the existing isAssetFieldForImageAssign pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolve the field object once instead of storing the id and re-scanning fields to check its type. Removes the redundant inner refFieldId check. 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>
…mage targets in handleAddEntry - Pass live `referenceGraph` state as a prop to MappingView so appended edges are read from current state rather than the original payload snapshot, preventing edge loss when adding multiple reference entries in one session - Remove duplicate assetTargets/rtTargets variables in the image content branch — reuse the already-computed richTextTargets/nonRichTextTargets Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
JuliRossi
reviewed
Jun 18, 2026
| contentType: WorkflowContentType | undefined | ||
| ): EditModalFieldOption[] { | ||
| return (contentType?.fields ?? []).filter(isWorkflowContentTypeFieldWithId).map((field) => { | ||
| const fieldType = typeof field.type === 'string' ? field.type : 'Text'; |
Collaborator
There was a problem hiding this comment.
⛏️ I think we should not need to check this
Collaborator
Author
There was a problem hiding this comment.
Good point! A field without a type is malformed and shouldn't be processed. Instead of falling back to Text, we now skip it entirely. Added a hasFieldType guard in fieldFormatting.ts and reused it in the two spots in MappingView.tsx as well.
Collaborator
There was a problem hiding this comment.
💡 I think this file is too large. We should probably refactor it a bit
Collaborator
Author
There was a problem hiding this comment.
Leaving this for another PR
JuliRossi
reviewed
Jun 18, 2026
… and nonRichText targets" This reverts commit 5ca0fd9.
…edReference guard
…g to Text Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… resolution Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…_STEPS descriptor map Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… EditModal Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
JuliRossi
approved these changes
Jun 19, 2026
0eb3b06
into
drive-integration-v1.1
11 checks passed
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.
Purpose
Implements the "Add entry" wizard in the edit content modal as part of the new entry design updates. Users can now create a new entry directly from the mapping review screen, optionally wiring it as a reference to an existing entry.
Approach
A 4-step (up to 5-step) semi-wizard is rendered inside the existing
EditModalusing the existingModal.Controlsbuttons for navigation — no new internal buttons:Link/EntryorArray/Entryfield; auto-skipped otherwiseFieldSelectionDropdown)Key implementation details:
WizardStepis an enum;handleWizardNext/BackuseswitchstatementsreferenceGraphis lifted intouseStateinReviewPage(same pattern asentryBlockGraph) so new reference edges can be appended client-side{ __ref: childTempId }is written into the new entry's reference field — the backend mergesmappingEntry.fieldsverbatim in step 10, andentryService.tsresolves__refvalues in pass 2isEntryReferenceFieldandbuildFieldOptionsForContentTypeextracted tofieldFormatting.tsto avoid duplicationTesting steps
Automated tests added for the wizzard.
Grabacion.de.pantalla.2026-06-17.a.la.s.12.13.13.p.m.mov
Breaking Changes
No.
Dependencies and/or References
Link to INTEG-4136
🤖 Co-authored with Claude Code