Skip to content

feat(drive-integration): adding remove button redesign [INTEG-4135]#11023

Open
Franco Banfi (FBanfi) wants to merge 6 commits into
drive-integration-v1.1from
integ-4135-remove-redesign
Open

feat(drive-integration): adding remove button redesign [INTEG-4135]#11023
Franco Banfi (FBanfi) wants to merge 6 commits into
drive-integration-v1.1from
integ-4135-remove-redesign

Conversation

@FBanfi

@FBanfi Franco Banfi (FBanfi) commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Purpose

Adds a Remove action to the mapping review selection menu in the drive-integration app, with a confirmation modal before content is unmapped from entry fields.

Approach

  • Selection menu redesign — EditMappingButton is now a split pill bar: "Edit content mapping" on the left, a divider, and a "Remove" action on the right (styles extracted to EditMappingButton.styles.ts via Emotion css).
  • Remove confirmation modal — New RemoveContentModal asks "Are you sure you'd like to remove this content from the entry?" with Cancel / Remove actions.
  • Remove flow in MappingView — Selecting mapped text shows Remove only when the selection overlaps mapped content. On confirm, the selected text/images are removed from every mapped field via existing applyTextExclusionToEntryBlockGraph / applyImageExclusionToEntryBlockGraph helpers.
  • Multi-field edge case — If the same text is mapped to multiple fields on one entry (e.g. body and summary), removal clears it from all affected fields in one action.
  • It handles tables, images and embedded images.

Testing steps

Automated tests for the Remove modal and the Mapping view added.

Grabacion.de.pantalla.2026-06-11.a.la.s.3.44.46.p.m.mov
Grabacion.de.pantalla.2026-06-11.a.la.s.4.09.47.p.m.mov

Breaking Changes

No.

Dependencies and/or References

INTEG-4135

Deployment

No.

…11021)

* feat(drive-integration): adding remove button redesign [INTEG-4135]

* refactor(drive-integration): image removal through three dots button

* refactor(drive-integration): adding ability to remove images through selection [INTEG-4135]
@FBanfi

Copy link
Copy Markdown
Collaborator Author

The original PR was this one: #11021.
I merged it by mistake, so I reverted it and created this new one with the same changes.

Franco Banfi (FBanfi) and others added 2 commits June 11, 2026 16:38
…ations [INTEG-4135]

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
<Modal.Header title="Remove content from entry" onClose={onCancel} />
<Modal.Content>
<Paragraph>
Are you sure you&apos;d like to remove this content from the entry?

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.

⛏️ I think it would be nice for it to say the entry you are removing it from, but it is a nitpick I would check with Erin

const mappingKeys = new Set<string>();
const selectedMappedSegments = root.querySelectorAll<HTMLElement>(
'[data-review-text-segment="true"][data-is-mapped="true"]'
'[data-review-text-segment="true"][data-is-mapped="true"], [data-review-image-segment="true"][data-is-mapped="true"]'

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 already have [data-is-mapped="true"] and [data-review-text-segment="true"] . Images have their own menu for removal. I would check this with Erin.

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.

2 participants