Sanity Studio v3.50.0: Introduction of Copy-Paste for Fields, Array Tree Editing, Auto-Updating Studio Deployments, and Improved Large Dataset Exports in Sanity Studio

Copy-and-paste for fields and documents

This version of Sanity Studio introduces a powerful new way to work with structured content within Sanity Studio: Copy-paste support for fields and documents. Use the familiar copy-and-paste hotkeys (cmd/ctrl+c and cmd/ctrl+v) and the field and document actions menus to copy content across different fields and types seamlessly.

Copy between different document types: You can seamlessly copy fields from one document and paste them into a different document type while maintaining the content structure.

Copy deeply nested structures: Easily copy entire blocks of Portable Text and arrays with complex nested structures between documents.

Copy full documents: Effortlessly copy full documents and integrate them into existing documents of the same or similar types.

Unknown block type "muxVideo", specify a component for it in the `components.types` option

Beta: Array Tree Editing

Sanity offers powerful content models that let you define lists of object types and even nest these, if necessary. This enables developers to work with intuitive and convenient data structures in the API, but it has sometimes led to a cumbersome editorial experience with a lot of navigation between layers of modals.

That's why we're thrilled to introduce an improved experience for editing arrays of objects. With this new view, you can see and edit arrays in one place, making working with nested content much simpler and faster.

To enable the new tree editor, add the following to your SanityStudio configuration:

export default defineConfig({
// ...
beta: {
treeArrayEditing: {
enabled: true,
},
},
});

Gotcha

While in beta, the array tree editor has limited support for references. References to other documents do not appear in the array tree editor and will open in a new modal. Additionally, Portable Text fields are not fully supported.

Beta: Auto-updating Studio deployments

We're shipping improvents and fixes to Sanity Studio on a weekly basis. To make it easier to get these improvements to Sanity Studio users without requiring developer involvement, we have shipped a way to build the studio for auto-updates.

You can try this out with the new --auto-updates flag to the sanity build and sanity deploy. This enables your Sanity Studio to automatically update to the latest minor and patch versions of Sanity Studio without having to rebuild and redeploy new bundles.

Learn more about the new auto update flag in docs.

Improved support for large datasets exports

To improve the export experience for users with large datasets, we have introduced a new cursor export mode in the Sanity CLI:

sanity dataset export --mode cursor

In this mode, the CLI will use cursors under the hood when exporting, which can significantly speed up the export process for larger datasets.

Gotcha

Unlike the traditional export mode, the cursor mode does not create a dataset snapshot. Instead, it pulls data as it exports, which may result in inconsistencies if documents in the dataset are modified during the export process.

🐛 Notable bugfixes

Fixes an issue when trying to extract schemas/deploy GraphQL APIs when a sub-dependency tries to call document.execCommand at import time.

Fixes a warning being printed about using useClient() without specifying an API version.

Install or upgrade Sanity Studio

To initiate a new Sanity Studio project or upgrade an existing one, please refer to our comprehensive guide on Installing and Upgrading Sanity Studio.

If you are updating from a version earlier than 3.37.0, you should also check out this article to ensure your dependencies are up to date.