Skip to content

feat: shift replace block while dropping - #205

Open
ruchamahabal wants to merge 1 commit into
frappe:developfrom
ruchamahabal:shift-replace
Open

feat: shift replace block while dropping#205
ruchamahabal wants to merge 1 commit into
frappe:developfrom
ruchamahabal:shift-replace

Conversation

@ruchamahabal

Copy link
Copy Markdown
Member

No description provided.

Comment on lines +76 to +79
newBlock.parentSlotName = blockToReplace.parentSlotName
}
parentComponent.replaceChild(blockToReplace, newBlock)
return parentComponent

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Slot clone drops fragment edits

When Shift-replacing a slot block with a fragment-editable component, slot insertion clones newBlock, but the save callback targets the original instance, causing the edited content not to be applied.

Context Used: Guidelines for reviewing Frappe Framework applicat... (source)

@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 3/5

Fix slot replacement for fragment-editable components before merging, because saved edits can be silently discarded.

Slot insertion clones the replacement block, but the save callback targets the original object and therefore cannot update the inserted slot content.

Files Needing Attention: frontend/src/utils/useCanvasDropZone.ts

Reviews (1): Last reviewed commit: "feat: shift replace block while dropping" | Re-trigger Greptile

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.

1 participant