👋 Next.js Conf 2024: Come build, party, run, and connect with us! See all events
Back to changelog

Sanity Studio Update: Save Vision Query Results, Custom Components with Intent Handling, and bugfixes

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.

✨ Highlights

Save Vision Query Results

You can now conveniently save the results of your Sanity Vision queries as JSON or CSV files. Simply run your query and click on the new "save result as" buttons in the bottom right corner.

Custom Components with Intent Handling in Structure Builder

Custom components included in the Structure Builder (like S.component(MyCustomComponent)) can now handle intents. This is especially useful for routing to custom components from global search results or other links. You can achieve this by using the canHandleIntent parameter.

S.listItem()
  .id('translate')
  .title('Translate Test')
  .child(S.component(TranslateExample).id('example')
    .canHandleIntent((intent, params, context) =>  {
      console.log(intent, params, context)
      return true
    }
  ))

🐛 Notable Bugfixes

  • Fixes an issue where Boolean inputs were not always clearly indicated as read-only and disabled.
  • Makes the search/filter in the document "Inspect" dialog case-insensitive.
  • Prevents inputs within the Portable Text Editor from calling element.onFocus() on any opened block or inline-object, thus avoiding unintended modal closures.
  • Prevents extra work on preview prepare functions, ensuring better performance.
  • Fixes miscellaneous bugs and performance issues with Portable Text Editor's block extras and highlight rendering. For example, pointer events are now correctly disabled to avoid unnecessary cursor changes or rendering thrashes.
  • Fixes an issue where the document history panel would appear to load indefinitely

Documentation affected by this release

Published May 14, 2024