Skip to content

feat(google-docs): add cell-level mapping review to document outline [INTEG-3572]#10861

Open
Harika Kondur (harikakondur) wants to merge 16 commits intogoogle-docs-document-outlinefrom
feat/cell-level-mappings
Open

feat(google-docs): add cell-level mapping review to document outline [INTEG-3572]#10861
Harika Kondur (harikakondur) wants to merge 16 commits intogoogle-docs-document-outlinefrom
feat/cell-level-mappings

Conversation

@harikakondur
Copy link
Copy Markdown
Contributor

@harikakondur Harika Kondur (harikakondur) commented Apr 10, 2026

Summary

Adds a better Google Docs review screen so we can see mappings at the cell level and make it easier to understand what content maps to which field.

Changes

  • Adds a new document outline view for mapping review.
  • Shows mappings for document blocks, tables, table cells, and images.
  • Adds side cards that show which field each section maps to.
  • Keeps the side cards lined up with the right part of the document.
  • Highlights the document content when you hover a mapping card.
  • Highlights the mapping card when you hover the matching text or image.
  • Adds entry filter cards so reviewers can focus on one entry at a time.
  • Supports tabs, lists, links, images, and nested table content in the review UI.
  • Cleans up the page flow so mapping review has its own screen.
  • Updates fixtures and tests to cover the new review experience.

Files Changed

File(s) What changed
apps/google-docs/src/locations/Page/components/review/DocumentOutline.tsx Adds the new review UI for document blocks, tables, images, and entry filtering.
apps/google-docs/src/locations/Page/components/review/MappingCard.tsx
apps/google-docs/src/locations/Page/components/review/mappingCardPositioning.ts
apps/google-docs/src/locations/Page/components/review/buildDocument.ts
Adds the mapping cards and the logic that places them next to the right content.
apps/google-docs/src/locations/Page/Page.tsx
apps/google-docs/src/locations/Page/components/mainpage/MainPageView.tsx
apps/google-docs/src/locations/Page/components/mainpage/MappingReviewPage.tsx
apps/google-docs/src/locations/Page/components/mainpage/ModalOrchestrator.tsx
apps/google-docs/src/locations/Page/components/mainpage/PreviewPageView.tsx
Updates the page flow to use the new mapping review screen.
apps/google-docs/src/types/entryBlockGraph.ts
apps/google-docs/src/types/normalizedDocument.ts
apps/google-docs/src/types/workflow.ts
apps/google-docs/src/types/index.ts
Expands the data types to support table cells, images, and richer mapping data.
apps/google-docs/src/fixtures/googleDocsReview/* Updates fixture data for the new review format.
apps/google-docs/test/locations/Page/Page.spec.tsx
apps/google-docs/test/locations/Page/components/mainpage/ModalOrchestrator.spec.tsx
apps/google-docs/test/locations/Page/components/mainpage/PreviewPageView.spec.tsx
apps/google-docs/test/locations/Page/components/review/DocumentOutline.spec.tsx
apps/google-docs/test/locations/Page/components/review/mappingCardPositioning.spec.ts
Adds test coverage for the new review flow and hover/positioning behavior.
apps/google-docs/package.json
apps/google-docs/package-lock.json
apps/google-docs/tsconfig.json
Adds UI/test support needed for the new screen.

Screenshots

Screenshot 2026-04-12 at 11 41 13 PM

Tab Name is visible (Draft)
Screenshot 2026-04-12 at 11 41 22 PM

Partial highlight within cell highlight
Screenshot 2026-04-12 at 11 41 47 PM

Multiple partial highlights from a single cell
Screenshot 2026-04-12 at 11 42 04 PM

Hover interaction

Screen.Recording.2026-04-13.at.12.07.39.AM.mov

Temporary Overview Section with mapping info. (click entry card -> relevant highlights appear)

Uploading Screen Recording 2026-04-13 at 12.09.09 AM.mov…

@wiz-inc-38d59fb8d7
Copy link
Copy Markdown

wiz-inc-38d59fb8d7 bot commented Apr 10, 2026

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 1 Medium
Software Management Finding Software Management Findings -
Total 1 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

@harikakondur Harika Kondur (harikakondur) changed the title wip: cell level mappings feat(google-docs): add cell-level mapping review to document outline [INTEG-3572] Apr 13, 2026
Copy link
Copy Markdown
Collaborator

@FBanfi Franco Banfi (FBanfi) left a comment

Choose a reason for hiding this comment

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

Nice update! 🙌 Paired the PR review with JuliRossi and left some comments!
The was reviewed to the best of our abilities given the length of the PR.
The most important part for us, is that there are some places in which the fieldType and fieldName are being fetch incorrectly, also check entry name.

const [isConfirmCancelModalOpen, setIsConfirmCancelModalOpen] = useState(false);

const isMappingReview = isMappingReviewSuspendPayload(payload);
const documentTitle = payload.documentTitle || 'Selected document';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The document title comes from the normalized document that's in the payload.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we are also getting the title directly from the mapping review suspend payload

Image

Comment on lines +24 to +27
type SortableItem =
| { kind: 'block'; position: number; block: NormalizedDocumentContentBlock }
| { kind: 'table'; position: number; table: NormalizedDocumentTable }
| { kind: 'tab'; position: number; tab: NormalizedDocumentTabBlock };
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We could use the existent types from above here. Also, we could extract this type outside the method

Comment on lines +55 to +58
if (!currentTab) {
currentTab = { id: normalizedDocument.documentId, name: '', segments: [] };
tabs.push(currentTab);
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do we need this?

};

measureOffsets();
window.addEventListener('resize', measureOffsets);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do we need a resize and an event here?

blockId: string;
};

export type TableImageSourceRef = ImageSourceRefBase & {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We could create a type for this and reuse it in line 22

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Check if we are duplicating types that already exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants