Sanity Studio v3.70.0: Improved Visual Editing for Astro, new beta EditPortal component + improvements and bugfixes

✨ Highlights

Improvements to Visual Editing

This release includes several changes across the @sanity/astro and @sanity/visual-editing packages, resulting in a more stable Visual Editing experience with Astro and a smoother initial setup:

A React 19 peer dependency issue was fixed in @sanity/astro version 3.1.9 that caused errors in new projects setup using Astro’s CLI tool.

Added support for libraries publishing pre-compiled code with the React Compiler to the Astro codebase.

Previously, Visual Editing overlays would lose their titles/preview information after a change had been made when working with an Astro project. This is now fixed.

Other features

The sanity package now exports an experimental EditPortal component, which allows users to create Dialog or Popover components that include Presence and scroll virtualization out of the box, like so:

import React, {useRef, useState} from 'react'
+import {EditPortal} from 'sanity'

export const CustomFormDialog: React.FC<Props> = ({parentProps, paths, onClose}) => {
return (
-
+ <EditPortal header="Edit Link" id="edit-link" animate width={600} onClose={onClose} zOffset={1000}>
...rest
-
+ </EditPortal>

🐛 Notable bugfixes

Fixes a case where the commands schema extract, manifest extract, graphql deploy, documents validate or schema validate would never complete.

Fixes an issue in Vision where the cursor would sometimes jump to the beginning of the editor.

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.