Allow safe removal of in-use media from the Media Bin - #158
Open
gorio wants to merge 2 commits into
Open
Conversation
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.
Summary
This PR improves media removal from the Media Bin when the selected media is still referenced by timeline clips.
Previously, Drift blocked removal whenever an asset was in use. This change keeps the safe behavior by default, but adds an explicit destructive path after user confirmation.
Changes
removeAssets()API unchanged.removeAssetsAndClips()operation for confirmed destructive removal.UX
When an in-use media item is removed, Drift now explains the consequence before continuing.
Example:
The user can cancel or explicitly confirm the destructive action.
Safety
The existing
removeAssets()behavior remains strict and refuses to remove referenced assets.The new cascade removal is exposed through a separate API and is only used after the destructive confirmation flow.
Source files are never deleted from disk.
Keyboard behavior
When the Media Bin owns keyboard focus:
Deleteremoves the selected media.Backspaceis also supported for macOS keyboards.When focus returns to the timeline, Delete continues to operate on timeline clips instead of media assets.
Undo
Removing:
is stored as one project edit.
A single Undo restores the complete operation.
Testing