feat(google-docs): Selec entries to create [INTEG-3894]#10966
Conversation
# Conflicts: # apps/google-docs/src/locations/Page/components/overview/OverviewSection.tsx # apps/google-docs/src/locations/Page/components/review/ReviewPage.tsx # apps/google-docs/src/services/agents-api.ts
JuliRossi
left a comment
There was a problem hiding this comment.
LGTM! Left a few comments
| <Checkbox | ||
| aria-label={`Create entry ${row.contentTypeName || 'Untitled'}${ | ||
| row.entryTitle ? ` (${truncateLabel(row.entryTitle, 150)})` : '' | ||
| }`} | ||
| isChecked={isEntrySelectedForCreation} | ||
| isDisabled={areEntrySelectionsDisabled} | ||
| onChange={(event) => onToggleEntrySelection(row.id, event.target.checked)} | ||
| /> |
There was a problem hiding this comment.
🤔 There seem to be an issue with the checkbox (saw this on the video). Instead of showing the hand pointer (default from forma) is showing the arrow pointer. Perhaps it has to do with the missing props in Card component that were setting up the cursor
There was a problem hiding this comment.
It's weird, but that only happens when I record the video, when I use the app without recording, it shows the hand pointer. I cannot prove it as taking a screenshot also removes the cursor, but I checked and it works as expected
|
|
||
| const { resumeWorkflow } = useWorkflowAgent({ sdk, documentId: '', oauthToken: '' }); | ||
|
|
||
| const handleToggleEntrySelection = useCallback((entryKey: string, isSelected: boolean) => { |
There was a problem hiding this comment.
⛏️ Does this need to be a callback?
There was a problem hiding this comment.
Hmm probably not, I'll remove it
Mitch Goudy (mgoudy91)
left a comment
There was a problem hiding this comment.
A few issues worth addressing before merge — two correctness/behavioral risks and one quick perf fix, plus one UX suggestion.
- Issue 1:
getEntrySelectionKeyindex fallback can silently map keys to wrong entries if entries are reordered, and risks collision with numerictempIdvalues. - Issue 2:
filterEntryBlockGraphBySelectiondoesn't prune thereferenceGraph— stale edges to deselected entries may cause backend errors depending on whether the server rebuilds it. - Issue 3:
handleToggleEntrySelectionis missinguseCallback, causing unnecessary re-renders of the full entry tree on every selection change. - Issue 5 (suggestion): The removed UX hint about clicking entry rows to preview content left users with no affordance for that interaction.
Issue 1: I addressed the key collision risk by namespacing selection keys. Regarding reordering, I don’t think entries can be reordered in the current UI, so it shouldn’t be a problem unless I’m missing something. Issue 2: The existing Issue 3: I think adding Issue 5: That’s how it is in the designs, and I checked with Erin. |
Mitch Goudy (mgoudy91)
left a comment
There was a problem hiding this comment.
Thanks for thinking through that, lgtm
Summary
Adds per-entry selection to the Google Docs import review flow, so users can choose which previewed entries are created.
Changes
Create selected entries.entryBlockGraph.Testing
Screen.Recording.2026-05-07.at.15.59.29.mov