To initiate a new Studio without installing the CLI globally:
npm create sanity@latest
To upgrade a v3 Studio, run this command in its folder:
npm install sanity@latest
Legacy themes for Sanity Studio will now handle custom colors without losing the scaffolding provided by the default studio theme. This improvement means that the custom colors you define will no longer revert to default values, but instead integrate seamlessly with Sanity Studio.
A new flag __experimental_formPreviewTitle
has been introduced, allowing you to hide the large preview title displayed in the document pane form. This grants more control to users with custom implementations that do not benefit from this title being displayed.
import {defineType} from 'sanity'
export const playlistType = defineType({
name: 'playlist',
type: 'document',
// 👇👇👇
__experimental_formPreviewTitle: false,
// 👆👆👆
// ...
})
The comments feature within Sanity Studio is now enabled by default, embracing collaboration and social interactions on your documents right out of the box.
The import path for the structure tool has been updated. Developers should now import from sanity/structure
instead of sanity/desk
. A helpful codemod is available to facilitate the migration of any existing code. Existing imports to sanity/desk
will still work but those imports have been marked as deprecated and will be removed in a later major version.
A codemod is available to migrate any code that may be using it:
npx @sanity/cli codemod deskRename
Be sure to check in any local changes to version control before running the codemod in case it should fail.
A new opt-in cache, --with-union-cache
, improves GraphQL schema generation speed by up to 95% for schemas with numerous self-referencing documents. This optimization is essential for larger projects and significantly improves the deploy experience.
- Fixes a regression where custom document action modal dialogs were not rendering footer content correctly.
- Resolves issues related to incorrect default locale strings, ensuring the restoration process of document revisions is accompanied by proper messaging.
- Fixes problems with the strike-through formatting when pasting content from Google Docs.
- Corrects font weight rendering issues on iOS16, ensuring consistent visual experience across platforms.
- Fixes the improper alignment of button text in the Portable Text Editor to match standard UI practices.
- Ensures annotation toolbar popover in PTE follows the correct element on scroll, enhancing usability.
- Fixes fieldset border issues in forms for a cleaner UI presentation.
- Resolves console warnings stemming from passing non-DOM properties to styled-components.
- Updates navbar button positions for better user discoverability and accessibility by adding aria labels to expand buttons in PTE.