Change8

v3.71.0

Breaking Changes
📦 sanityView on GitHub →
2 breaking5 features🐛 8 fixes🔧 5 symbols

Summary

This release migrates the `@sanity/presentation` codebase into the main `sanity` package, requiring import path updates for users relying on the standalone package. It also introduces new configuration options for array fields and resolves several bugs related to keyboard navigation and document patching in read-only states.

⚠️ Breaking Changes

  • If you were directly installing and importing `@sanity/presentation` (e.g., `import {presentationTool} from '@sanity/presentation'`), you must now change all imports to use `from 'sanity/presentation'` and uninstall the `@sanity/presentation` package, as it is now fully merged into the main `sanity` package.
  • The internal dependency `@sanity/block-tools` has been replaced with `@portabletext/block-tools`.

Migration Steps

  1. If you were importing from `@sanity/presentation`, search/replace all `from '@sanity/presentation'` statements with `from 'sanity/presentation'`.
  2. Uninstall the `@sanity/presentation` package if it was installed separately.
  3. If updating from a version earlier than 3.37.0, check the guide at https://www.sanity.io/help/upgrade-packages to ensure dependencies are up to date.

✨ New Features

  • The `@sanity/presentation` codebase has been migrated into the main `sanity` codebase, accessible via `sanity/presentation`.
  • Adds `disableActions` option to array fields for disabling various array input capabilities.
  • Adds experimental support for observing full documents in the preview functionality.
  • Adds experimental support for live document ID sets in the preview functionality.
  • Adds remote template bootstrapper to support write token in the CLI.

🐛 Bug Fixes

  • 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.
  • No longer warns about duplicate keys when using Presentation on `sanity dev` with React Strict Mode, or embedded studios on Next.js App Router.
  • Fixes an issue where patching a readOnly document was not being blocked correctly.
  • Fixes an issue where the readOnly pane was overriding patches.
  • Fixes an issue where `ObjectSchemaType['__experimental_search']` was not optional in types.
  • Fixes a PTE copy/paste test case.

🔧 Affected Symbols

@sanity/presentation@sanity/block-tools@portabletext/block-toolsObjectSchemaTypepresentationTool