fix(editor): shelf deletion plays item-delete SFX; refresh delete sounds#379
Merged
Conversation
Shelves are furniture-like placeable objects, so deleting one should use the lighter item-delete cue instead of the structure-delete one. Add a shared emitDeleteSFX(nodeType) helper that maps item-like node types (item, shelf) to item-delete and everything else to structure-delete, and route the three delete sites (sledgehammer, floating action menu, keyboard) through it. Also refresh the item_delete/structure_delete audio assets and reduce their pan jitter for a steadier delete cue. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
emitDeleteSFX(nodeType)helper insfx-bus.tsthat maps item-like node types (item,shelf) tosfx:item-deleteand everything else tosfx:structure-delete. The three delete sites that previously inlined thetype === 'item'branch now route through it:selection-manager.tsxfloating-action-menu.tsxuse-keyboard.tsitem_delete/structure_deleteaudio assets and lowers their pan jitter (0.15→0.05/0.08) for a steadier delete cue.Why
Adding a new item-like type to the item-delete cue used to mean touching three call sites; the helper makes that a one-line change and fixes the shelf case in all delete paths at once.
Testing
tsc --noEmitpasses for@pascal-app/editor.🤖 Generated with Claude Code