Squarespace
Block Duplication Backend
↑ These are all →
← Blocks ↓
↑ They can be →
← duplicated ↓
I enabled them to be deep copied when
FRONTEND CALLS BACKEND
Deep Copying A Block
Changing the code to duplicate a block is easy on the front end. But allowing these blocks to be saved — with new ids attached to a completely new reference in the database — takes a more intentional approach. The drop-down on my right is a summary of my journey. Below is the beta product, to be released this year.
-
Product and designers presented a brief and engineers asked clarifying questions.
-
What is being passed into the endpoint? Although a brief was presented, there were many possibilities on what we could pass in to achieve the same result.
-
Recursively copying fields by locating and calling existing methods, or writing new ones.
-
While most copying bugs can be caught via Postman’s request and return of the API endpoint, some were more insidious, requiring QA tests to verify that uploaded media would copy.
The Final Product





