Skip to content

Conversation

@zealot-zew
Copy link

@zealot-zew zealot-zew commented Nov 7, 2025

Summary

This fixes an issue where dragging a Name block out of a Pitch block and then dragging it back in caused a redundant Name block to appear, instead of the original block snapping back without duplication.

What’s fixed

Prevented addDefaultBlock() from recreating Name sub-blocks while snapping back.
Name blocks now behave like Octave blocks— detach cleanly and snap back into place.

How to test

Create a Pitch Block
Drag the Name block out- a default duplicate must appear
Drop the Name block back - it should reattach without creating any redundant Name block

Screen.Recording.2025-11-08.at.12.32.54.AM.mov

Fixes #4794
Tested on macOS (Chrome) and verified consistent behavior with Name block logic.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

✅ All Jest tests passed! This PR is ready to merge.

@omsuneri omsuneri self-requested a review November 7, 2025 18:38
@zealot-zew
Copy link
Author

zealot-zew commented Nov 7, 2025

apologies for the messy PR with removing spaces for no reason (my VS code extensions would have do that)

@harshrajsoni
Copy link

harshrajsoni commented Nov 11, 2025

The Key changes is this:
if (this.blockList[parentblk].name !== "pitch") {
this.addDefaultBlock(parentblk, thisBlock, actionCheck);
}

Screen.Recording.2025-11-11.160030.mp4

I have tested the code and sorry to say that the code doen't resolve the issue... The issue still persists
@pikurasa Please look into it.
Thank You

@zealot-zew
Copy link
Author

@harshrajsoni
The duplicate octave or name block is intended feature of Pitch block, the bug i fixed was when name block is snapped back it creates a redundant name block
please check with the reference to the issue #4794

@harshrajsoni
Copy link

but the PR is created for different issue i think
Please check that
Thank You

@zealot-zew
Copy link
Author

@harshrajsoni
yeah youre right, i edited the wordings in my PR
check now

@walterbender
Copy link
Member

Could you please separate your linting changes from your bug fix into two separate commits? (They can remain in the same PR.)

@walterbender
Copy link
Member

@pikurasa do you agree with this UX change?

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.

unexpected_behaviour(copyTriggred)

3 participants