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

Enhanced Global Search, Improved PTE Functionality ++

Installation and upgrading

Install

To initiate a new Studio without installing the CLI globally:

npm create sanity@latest

Upgrade

In most cases upgrading your studio is as straight-forward as installing the latest version:

npm install sanity@latest

For more information, visit the article on upgrading Sanity Studio in the docs.

If you are upgrading from a version earlier than 3.37.0, you also need to upgrade styled-components and @sanity/ui. To learn more, visit this help article on keeping dependencies up to date.

✨ Highlights

  • Improved global search with better performance and new features.
  • Custom styles are now displayed in the Portable Text Editor (PTE) style selector.

Enhanced Global Search

We've optimized the search functionality in the Studio for increased performance, especially in workspaces with large schemas. This improvement includes support for wildcard (*) and negation (-) tokens in search queries, allowing for more flexible and powerful search options. This enhanced search feature uses an internal API that is not yet documented for public use.

If you need to revert to the previous search behavior for any reason, you can disable the new search functionality by setting search.enableLegacySearch to true in your configuration.

Other features

  • Fixes tooltip text for the publish button to correctly display "yesterday" without the "ago" suffix when appropriate.

🐛 Notable bugfixes

  • Fixes a crash in the image hotspot and cropping tool within Next.js embedded Studios.
  • Improves focus handling in PTE and the document pane.
  • Fixes an edge case where PTE threw exceptions after resizing the validation panel.
  • Fixes issue where annotations in PTE would incorrectly retain markup if all fields were null.
  • Resolves an issue where custom sort orders, or sort orders in lists that are not documentTypeLists, would send invalid requests to the persistent user settings backend.
  • Fixes regression that hid tool buttons when Sanity Studio was embedded in Next.js applications.
  • Fixes a bug where the caret was not visible on code-formatted text within the PTE when using the dark scheme.
  • Fixes an issue where the component for custom PTE styles was not being rendered in the style selector.
  • Fixes an issue where copying strikethrough text from a google doc would remove the strikethrough once pasted in the PTE.

Documentation affected by this release

Published April 16, 2024