Repository navigation
feat: add "Create a copy" to block developer tools - #2784
Merged
zspriggs merged 3 commits intoNov 25, 2026
Merged
Conversation
mikeharv
reviewed
Nov 24, 2026
mikeharv
approved these changes
Nov 25, 2026
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.
The basics
The details
Resolves
Fixes #2553
Proposed Changes
Adds a "Create a copy" button to the block factory.
Reason for Changes
The linked issue (#2553) requests a "save" button so that the requester can make similar blocks without starting from scratch. The block factory already auto-saves and it would be confusing to add a manual save option that behaves differently. However, another way to fulfill the requested use case is to allow users to create copy of an existing block and iterate on it. Now, clicking the "Create a copy" button will create a new block that's a copy of the current block.
Note that instead of using
getNewUnusedName, I created a new function to add '_copy' to the end of the old block name, so it's clearer to the user what's happening when they create a copy.Test Coverage
Tested manually, creating a copy properly creates a copy, name collisions are handled by adding subsequent '_copy's to the end of the block name.
Documentation
None
Additional Information