npm sanity 3.24.1
v3.24.1

latest releases: 3.44.1-canary.30, 3.44.1-canary.21, 3.44.1-canary.11...
4 months ago

Installation and upgrading

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

✨ Highlights

Updated legacy theme customization

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.

Experimental document pane title opt-out

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,
  // 👆👆👆
  // ...
})

Comments feature now enabled by default

The comments feature within Sanity Studio is now enabled by default, embracing collaboration and social interactions on your documents right out of the box.

Importing Structure as structureTool

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.

GraphQL deployment optimization

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.

🐛 Notable bugfixes

  • 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.

📓 Full changelog

Author Message Commit
Binoy Patel chore(e2e): update docs and make missing env more clear (#5421) a63a20a
renovate[bot] chore(deps): update babel monorepo to ^7.23.7 (#5430) 232aab8
renovate[bot] chore(deps): update dependency turbo to ^1.11.2 (#5436) cee0e15
Pedro Bonamin fix(legacy-theme): update buildLegacyTheme to support custom colors (#5437) b4fb5b6
Fred Carlsen feat: conditionally set maximum search depth in studio search (#5440) 261b05e
renovate[bot] chore(deps): update dependency @sanity/ui to v2.0.0-beta.14 (#5445) ac1e465
renovate[bot] chore(lockfile): update dependency framer-motion to v10.17.4 (#5450) e462d96
renovate[bot] chore(deps): update dependency styled-components to ^6.1.6 (#5446) 5cc319d
Robin Pyon fix: opt-out of internal studio ui-components for user facing custom document action dialogs (#5444) 5a9d1f8
Robin Pyon fix(i18n): use correct locale string for document restore confirmation (#5453) 2d817cb
Jørn Knutsen fix(vision): use untranslated value for "other" api version (#5433) f3181ba
Espen Hovlandsdal refactor(structure): desk => structure file rename 7c484f7
Espen Hovlandsdal refactor(structure): rename references to desk/Desk e3ea119
Espen Hovlandsdal fix(structure): fix typo in renamed structure tool context 00496ab
Espen Hovlandsdal feat(cli): add desk rename codemod 749444d
Espen Hovlandsdal chore: run desk rename codemod e6a2b3a
Espen Hovlandsdal fix(cli): bootstrap new studios with structure import 7516d0f
Espen Hovlandsdal refactor(desk): explicitly import/export for improved deprecation handling 47c5e4b
Espen Hovlandsdal fix(core): correct typesVersions path for structure export b018193
ecospark[bot] chore(prettier): fix unformatted files 🤖 ✨ (#5454) c446609
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.4.2 7972ff4
ecospark[bot] chore(deps): dedupe yarn.lock (#5455) 01d5238
Fred Carlsen fix(block-tools): keep strike-through formatting when pasting from gdocs (#5443) 779a114
Nina Andal Aarvik fix(core): remove variable fonts in global styles (#5456) 47d84a2
Tommy Petty fix(cli): uniquify temp directory used during dataset import (#5400) a84cfeb
Cody Olsen chore(deps): update dependency @sanity/ui to v2.0.0-beta.15 d916bd7
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.4.3 5479069
Nina Andal Aarvik fix(desk): utranslate when form title is missing (#5439) 8c52faa
Robin Pyon fix: add custom resize handle icon (#5462) 38f951c
Herman Wikner fix(core): form fieldset border (#5468) 8ff0308
Pedro Bonamin feat(desk): add __experimental_formPreviewTitle to documents (#5452) 90c24c8
Nina Andal Aarvik fix(core): left align button text in PTE (#5422) a21656e
Nina Andal Aarvik fix(core): add scroll event listener for AnnotationToolbarPopover referenceBoundary (#5410) 5719a09
Nina Andal Aarvik fix(core): add useClickOutside function to filter buttons afdb3f9
Herman Wikner feat(comments): enable by default (#5467) c09a26d
Pedro Bonamin chore(dependencies): update @sanity/ui to 2.0.0-beta.16 (#5474) 49e1a7e
Sindre Gulseth refactor(graphql): use Set to speedup guard check 31b7559
Sindre Gulseth refactor(graphql): optimize multiple loops into two for loops ab1459a
Sindre Gulseth chore(graphql): remove unncessary type cast and optimize readability 330c621
Sindre Gulseth feat(graphql): add experimental mode to optimize/cache schema union definitions 52e4369
Espen Hovlandsdal fix(i18n): pass Code component to document list pane error (#5434) 30f9bef
Rico Kahler fix(cli): update esbuild options for better compat (#5461) fc45930
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.5.0 75b052c
Robin Pyon fix: update reverse trial button styles, add tooltips to nav button and localize (#5478) 8e8c474
Cody Olsen fix: prevent props that are unknown html attributes from passing through (#5481) ddf605f
Robin Pyon fix: position search button in the LHS navbar (#5479) 8b3aa07
Nina Andal Aarvik fix(core): add aria-label to expand PTE button (#5459) d709112
Robin Pyon chore: add codeowners for search, theming and visual components (#5480) f59774b
Pedro Bonamin fix(theme): update studio theming, support only color and fonts customisation. (#5442) 078574b
Rico Kahler feat(validation): validateDocument (#5465) 3c5421e

Don't miss a new sanity release

NewReleases is sending notifications on new releases.