Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive
Back to changelog

Enhanced Portable Text editing, faster syncing, better Android support

Installation and upgrading

Fresh install

To install and initiate a new Sanity Studio without installing the Sanity CLI globally, run the following command in the terminal:

npm create sanity@latest

Upgrade

To upgrade an existing instance to Sanity Studio v3, run the following commands in the terminal:

# Go to the root folder of the installed Sanity Studio instance
cd /sanity-studio/root-folder

# Upgrade Studio to v3
npm install sanity@latest

✨ Highlights

This release: 3.16.0

In a nutshell:

  • Enhanced Portable Text editing experience.
  • Faster syncing.
  • Full support for Portable Text on Android devices.
  • Offline detection.

Improved Unicode support

Sanity Studio uses the diff-match-patch algorithm to match and patch document changes. In previous versions of the Sanity Studio, the underlying library wouldn't work correctly when parsing some Unicode characters. We addressed those issues in this release.

If you experienced issues when using characters such as emojis, Kanji, or other non-Latin characters, this release resolves these issues.

Enhanced Portable Text editing

Besides improved Unicode support, the Portable Text Input and the underlying text editor feature several improvements to provide a smoother editing experience.

Faster synchronization

Previously, prolonged fast typing in the editor would trigger debouncing: the Portable Text Input would temporarily suspend committing edits until you decreased your typing speed below a specified threshold.
This behavior could produce bigger discrepancies between your local value and the corresponding actual value stored on the server side.

Now your changes are committed in a throttled way: the editor commits the changes as you type, without compromising performance.

Improved undo and redo

Undo and redo features have been improved considerably, especially when working with many editors on the same document.

Better Android support

The Portable Text Input is now fully supported on Android. Previously, typing in the editor using an Android on-screen keyboard would cause some issues.

Offline detection

The Portable Text Editor automatically enters read-only mode if it detects that the network is offline.
This behavior helps keep your local document in sync with the corresponding copy on the server when there is no online access, and it prevents losing changes due to not committing them.

Other features

  • The sanity module is now marked as free of side effects, which can produce smaller bundle sizes (thanks @mckelveygreg! 🙏)
  • Improved UX when deleting a document.

🐛 Notable bugfixes

  • Fixed a bug where changing text styles in the Portable Text Editor would cause the editor to lose focus.
  • Fixed a problem that would occur when repeatedly applying and removing text decorators while typing in the Portable Text Input.
  • Fixed the odd placement of the “Empty” placeholder in the Portable Text Editor on WebKit browsers.
  • Fixed a media visibility issue in Safari occurring in list previews with custom SVG elements.
  • Fixed the alignment of action items in pane headers on mobile devices.
  • Fixed a padding inconsistency in reference fields.
  • Fixed a visibility issue affecting tooltips in the navigation bar, and causing them to be displayed behind open menus.
  • Fixed an issue impacting cross-dataset reference fields displayed as nested fields, inconsistent with regular reference fields.
  • Fixed a bug that caused specifying apiVersion on documentList() and documentTypeList() to not work in the desk structure.
  • Fixed the initial flashes of validation errors for valid content on document load.

Published September 18, 2023