Sanity Studio v3.71.0: Migration of @sanity/presentation codebase into main sanity package, new array action affordances, bugfixes and improvements

✨ Highlights

The @sanity/presentation codebase has been migrated into the sanity codebase

The @sanity/presentation codebase has been migrated into the sanity codebase. We've always recommended using Presentation Tool by importing it from sanity/presentation, like so:

import {defineConfig} from 'sanity'
import {presentationTool} from 'sanity/presentation'
import {structureTool} from 'sanity/structure'

export default defineConfig({
plugins: [presentationTool(), structureTool()]
})

If you've been following this pattern then this change won't impact you in any way.

If you've been installing @sanity/presentation and are using it directly (we've sometimes suggested this to let folks try out bugfixes before they ship in the next release of sanity):

import {defineConfig} from 'sanity'
import {presentationTool} from '@sanity/presentation'
import {structureTool} from 'sanity/structure'

export default defineConfig({
plugins: [presentationTool(), structureTool()]
})

Then you need to search/replace all from '@sanity/presentation' statements in your codebase with from 'sanity/presentation', and uninstall @sanity/presentation, as it'll no longer receive updates.

Other features

Adds disableActions option to array fields for disabling various array input capabilities. Read more in the docs.

🐛 Notable bugfixes

Fixes an issue preventing keyboard navigation to edit buttons for annotation and inline objects in the Portable Text Input.

Fixes an issue allowing custom form inputs to incorrectly patch a readOnly document by calling onChange.

The Presentation Tool's "Documents in use" pane now includes draft and unpublished documents, meaning it actually shows all documents in use, rather than just some of them.

No longer warns about duplicate keys when using Presentation on sanity dev with React Strict Mode, or embedded studios on Next.js App Router.