Sanity Versions Save

Sanity Studio – Rapidly configure content workspaces powered by structured content

v3.30.0

2 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

Improvements to Comments in Presentation

With the recent introduction of both Presentation tool and comments, we realised that context can be crucial in understanding comments relating to visual aspects of an application.

Comments created from within the Presentation tool will now display a link allowing content editors to navigate from any tool directly to the context in which that comment was made in their application.

Other features

  • Improves error handling for a migration script that attempts to iterate over the passed document function without calling it
  • Adds new Studio API, ActiveToolLayout, which allows plugin authors to have more flexibility by wrapping the active tool
  • The selected viewport in Presentation is now persisted in the URL

🐛 Notable bugfixes

  • Improves focus handling with the Presentation tool and Portable Text Inputs
  • Fixes regression preventing import {debugSecrets} from '@sanity/preview-url-secret/sanity-plugin-debug-secrets' listing secrets
  • Fixes a bug preventing the CLI being used inside Studio project subdirectories

📓 Full changelog

Author Message Commit
Rico Kahler fix: remove no private (#5726) a3998c3847
Ash refactor(util): move concurrency limiter packages to @sanity/util (#5654) 35d368e57c
Ash fix(cli): project root resolution (#5712) e30f45f356
Bjørge Næss chore(deps): normalize vite dependencies 4c6ade2bc3
Bjørge Næss chore(docs): remove internal 'how to publish' from CONTRIBUTING.md 3e95893795
Bjørge Næss chore: install npm check-updates as dev dependency 5799aed369
Bjørge Næss chore: upgrade debug to latest 4.x 57190164c4
Bjørge Næss chore(depcheck): remove v2 detector and fix ts error a2c08eeeb1
Bjørge Næss chore(depcheck): cleanup depcheck ignores ac8fdc3eae
Bjørge Næss chore(portable-text-editor): add missing dev dependency ef47badb62
Bjørge Næss chore(groq): use relative imports to 'groq' from tests b5dc763e61
Bjørge Næss chore(sanity): add missing dev dependencies e1be6150bd
Bjørge Næss chore(cli): cleanup dependencies 3bb3d2b7a3
Bjørge Næss fix(test): remove unused files 4317541db9
Bjørge Næss chore: add @jest/globals as dev dependency in packages af6561ed03
Bjørge Næss chore(test): remove @sanity/ui jest mock 66eaec5848
Bjørge Næss chore(test): run codemod migrating from implicit imports from '@jest/globals' 23add76174
Bjørge Næss chore(test): fix various test typings after moving to @jest/globals 79f89c8f0b
Bjørge Næss chore(sanity): add workaround for typing difference between @types/jest and @jest/globals 7e3bcf261d
Bjørge Næss chore: remove @types/jest usage c81b291c94
Bjørge Næss fix(test): remove usage of jest-dom/extend-expect 8a801504a1
Bjørge Næss chore(deps): upgrade @testing-library/jest-dom to 6.x 1a323e7fd2
Binoy Patel chore(cli): update help copy for CLI commands (#5687) 12fb96b7aa
Rupert Dunk chore(comments): improve i18n resource for comment contexts (#5731) ce560b0b51
Bjørge Næss chore: switch from yarn to pnpm da9f72ef38
Bjørge Næss fix(mutator): fix type export issue c7ed0c9df8
Bjørge Næss chore(cli): replace vite typing stub with proper dependency d09db4c47c
Bjørge Næss chore(vision): fix typescript issue related to reexporting codemirror extensions 26c5f4752f
Bjørge Næss chore(deps): add 'sanity' as dependency to workspace root 564c501baf
Bjørge Næss chore(deps): upgrade @types/node to 18.x 64203bea52
Bjørge Næss chore: rename mentions of yarn => pnpm 5a65aad35d
Bjørge Næss chore(package.json): alphabetize scripts 3527a43c2a
Bjørge Næss chore: clean up package scripts c77b7baf2d
Bjørge Næss chore: cleanup depcheck scripts 6e37d03e32
Bjørge Næss fix(github): enable pnpm before installing dependencies 0b572f1751
Bjørge Næss fix(github): fix workflow file 5a215ca294
Bjørge Næss fix: run prettier e24a458ea7
Bjørge Næss fix(monorepo): add missing dev dependency b5359d3410
Bjørge Næss fix(vision): add missing type dependency 6e91aef484
Bjørge Næss fix(sanity): update test snapshots 70bcf6fb74
Bjørge Næss chore: apply suggestions from code review 1b7a1f1fac
Bjørge Næss fix(ci): fix subargs issue w/pte e2e tests f0fad4c017
Binoy Patel chore(e2e): fix e2e action failing (#5735) 4c02649f95
Bjørge Næss fix(chore): fix lint script (#5739) d1fc36da9c
Rico Kahler build: remove last rebase step (#5737) 79a587011b
Espen Hovlandsdal chore(deps): align versions, lockfile 2d1f084ab0
Espen Hovlandsdal fix(cli): minor whitespace tuning for migration error output (#5727) b20f121afe
Bjørge Næss chore(ci): fix prettier --write (#5740) 2b00589f60
Bjørge Næss chore: improve dev commands (#5747) b6199a1b2f
Pedro Bonamin feat(core): add studioActiveToolLayout and navbar rightSectionNode prop (#5749) c7086717ac
Per-Kristian Nordnes chore: add missing types packages (#5751) 656bec2395
Ash fix(core): add @types/lodash (#5753) 59f8afd952
Cody Olsen fix(structure): allow sanity.previewUrlSecret in document lists (#5733) 8fd55c4c80
Bjørge Næss chore(perf): replace references to yarn with pnpm (#5748) 2f777d8737
Binoy Patel chore(deps): upgrade husky@9 (#5744) 8f3c44c369
Binoy Patel test(e2e): fix e2e test caching issue (#5763) 6caf80314f
Bjørge Næss fix(migrate): throw if attempting to iterate over documents producer (#5758) 928f04d3ab
Bjørge Næss fix(ci): use pnpm for package releases (#5746) 4dedf3b499
Binoy Patel test(migration) add tests for normalizeMigrationDefinition (#5565) c4baaab7fb
Pedro Bonamin fix(pte): PTE modal seems to re-render on validation state change due to tooltip disabled change (#5766) c24e4d9a96
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.9.1 (#5773) b7a3f13628
renovate[bot] chore(deps): update dependency @sanity/visual-editing to v1.3.1 (#5770) ec1cc0fa43
renovate[bot] fix(deps): update dependency @sanity/client to ^6.13.3 (#5772) 79ef8c39c1
Binoy Patel chore(test): fix linting and type errors (#5775) 67ef6318f6
renovate[bot] chore(deps): update dependency @sanity/ui to ^2.0.3 (#5776) 409edb1be0
Sindre Gulseth fix: update ndjson specification url (#5780) 15b9e79bfa
Binoy Patel chore(deps): bump @sanity/tsdoc to 1.0.0-alpha.42 (#5765) 86bf2e9446
Pedro Bonamin fix(core): update featuresEnabled when switching projects (#5787) 32d79a23a6
Per-Kristian Nordnes chore: upgrade @playwright/test to latest (#5792) 84a6015b01
Binoy Patel test(migrate): update types for test to better match usage (#5781) 15c3bc1a5d
Per-Kristian Nordnes refactor(core/inputs): report focusPath on text spans ending with .text (#5786) 3941d86d23
Pedro Bonamin feat(core): rename useMentionOptions to useUserListWithPermission and move to core (#5778) 5da8891480
Per-Kristian Nordnes fix(core/inputs): fix issues with calling onPathFocus for PT-input (#5794) 0f114b1fe9
Bjørge Næss chore: use workspace protocol for internal dependencies 61eee1fca3
Bjørge Næss chore(workspace): use sanity dependency from workspace 0693a241f9
Bjørge Næss chore(deps): hoist sanity workspace package b57830c5ea
Bjørge Næss chore(test): use SanityClient type from @sanity/client bfa53c965d
Bjørge Næss fix(ci): run e2e-pte tests in the correct folder e2f26c424c
Nina Andal Aarvik fix(core): bring back subtitle in workspace list view (#5788) 2202e3c6ec
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#5798) 6d4090e24e
Espen Hovlandsdal fix(structure): intent menu item nodes not rendering (#5728) 613e1dd8c4
Ash fix(ci): setup pnpm (#5800) 83630cfb60
Ash fix(ci): remove pnpm reference from setup-node step (#5801) 19c0e86f26

v3.29.1

3 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

🐛 Notable bugfixes

  • Pins a dependency that was causing an infinite loop (Maximum call stack size exceeded)

📓 Full changelog

Author Message Commit
Espen Hovlandsdal fix: pin get-random-values-esm to 1.0.0 8b09226

v3.29.0

3 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

🐛 Notable bugfixes

  • Fixes an issue where the alert messages for published or deleted documents sometimes displayed incorrect titles
  • Fixes a comments-related error dialog from inadvertently showing up to users
  • Removes layout shift when loading document locations when the Presentation tool is used (#5702)
  • Fixes a bug that hid unpublished documents in "Documents on this page" in the Presentation tool (#5702)
  • Fixes a bug that caused the document pane to stay open in the Presentation tool (#5702)

Other features

  • Adds support for importing system documents via --allow-system-documents for dataset imports
  • Adds support for parameterized templates in the Presentation tool (#5694)

📓 Full changelog

Author Message Commit
Pedro Bonamin fix(core): update PortableTextInput doc reference (#5688) 266499065
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.8.0 (#5694) e725a3c1f
renovate[bot] chore(deps): update dependency @sanity/visual-editing to v1.2.0 (#5693) 9373ce65f
renovate[bot] chore(deps): update dependency @sanity/ui to ^2.0.2 (#5698) bb0b63129
renovate[bot] chore(lockfile): update dependency @sanity/assist to v1.2.16 (#5696) 72bc6944e
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.8.1 (#5699) d645d37c0
Espen Hovlandsdal fix(comments): catch and suppress errors from comments upsell (#5700) fbaffd221
renovate[bot] fix(deps): update dependency @sanity/client to ^6.12.4 (#5701) f85396f43
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.8.2 (#5702) c23ccb4cc
Simeon Griggs chore: rename "schemas" to the more correct plural "schemaTypes" (#5513) 2eaffd378
Fred Carlsen chore: apply auto eslint fixes with lint-staged (#5705) 40c9b4f7b
Binoy Patel chore(dev): remove react import 9aabbb02d
Bjørge Næss use jsx: 'automatic' for dev server a2f505bb3
Bjørge Næss chore(deps): upgrade eslint tooling 95890c6eb
Bjørge Næss fix(eslint): add rules to enforce consistent type imports and import sort orders 1ec2c3929
Bjørge Næss chore(eslint): set @typescript-eslint/no-explicit-any as warn instead of error e01c101a8
Bjørge Næss chore: autofix eslint errors after config change b14622ed4
Bjørge Næss fix(structure): add workaround for circular import issue causing resolveIntent tests to fail c2e60176a
Bjørge Næss chore: exclude packages with type-only imports from depcheck 8fea4a073
Bjørge Næss chore(sanity): preserve order of side-effectsy imports 08e83dd6c
Bjørge Næss chore(test-studio): reorganize comments & imports in test schema 7ca741cbf
Bjørge Næss chore: manually fix remaining non-autofixable eslint issues 5a65b7bc0
Bjørge Næss chore(eslint): extend react/jsx-runtime config 5eb87553c
Bjørge Næss chore: remove remaining react imports ff4c3bb06
renovate[bot] chore(deps): update dependency @sanity/visual-editing to v1.2.2 (#5718) 117834efb
Bjørge Næss fix(cli) let cli tests run with robot tokens (#5715) 04c30fbd5
Binoy Patel test(core): adds e2e tests for date and datetime inputs (#5681) 66949452b
radhe feat(backup): add new command dataset backup for server-side backups (#5571) f04c76eb7
radhe feat(CLI): in sanity dataset import cmd, add --allow-system-documents to explicitly permit system document import, which should be ignore otherwise (#5689) fa9f924f3
ecospark[bot] chore(deps): dedupe yarn.lock (#5720) 2518ac43a
Nina Andal Aarvik fix(structure): use useDocumentTitle hook for toast message (#5719) 51ed18d28
Rupert Dunk feat(comments): add optional intent link to comments (#5576) 27bf5f98d
Espen Hovlandsdal refactor(comments): use journey endpoint for comments upsell (#5721) b999da053
Drew Lyton feat(telemetry): add telemetry for Trial Dialogs (#5643) ad971f8ae
Rico Kahler build: release automation (#5722) d024b09d3

v3.28.0

3 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

Dry run content migrations from a local dataset file

You can now dry run content migration jobs against a local dataset export file (for example, a production.tar.gz file that you have exported):

sanity migration run my-content-migration --from-file=production.tar.gz

Note: The --from-file flag only works with dry runs, in other words, you won't be able to use is with the --no-dry-run flag.

Learn more about Schema Change Management in our documentation.

Other features

  • Timestamps in comments display in the format of the current Sanity Studio locale.
  • Improvements to migration reporting and refinements to messaging and text during migration commands.
  • Unattended mode in CLI will respect plans and coupons, and defaults to plans.
  • Document titles now display with balanced line breaks (text-wrap: pretty).
  • Comments feature is now discoverable for all users on a non-paid plan, with UI to make plan upgrade easier.

🐛 Notable bugfixes

  • Fixes an issue where the Vision tool might crash when pasting a query URL.
  • Styling fixes for labels and columnar objects in the studio.
  • Icon display defaults in S.documentTypeList() now match those in other document lists.

📓 Full changelog

Author Message Commit
ecospark[bot] chore(deps): dedupe yarn.lock (#5615) 1527a9dbb8
renovate[bot] fix(deps): update dependency @sanity/client to ^6.12.3 (#5623) 5116ee003e
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.7.3 (#5622) c04afbc055
renovate[bot] chore(lockfile): update dependency sanity-plugin-mux-input to v2.2.4 (#5624) 569784746d
renovate[bot] chore(deps): update dependency express to ^4.18.2 (#5629) 005042596b
Cody Olsen fix: remove __unstable_focusRing unknown forwarded prop warning (#5621) 6c87bea0c9
renovate[bot] chore(deps): update thollander/actions-comment-pull-request digest to 1d3973d (#5632) 56bf76ed94
renovate[bot] chore(deps): update tiryoh/gha-jobid-action action to v1 (#5633) 359b4cbf2c
Robin Pyon fix: only fully collapse PTE toolbars in 'root' FormBuilder instances (#5547) e219e2a689
Knut Melvær docs(create-sanity): update README.md 6fa1750edc
renovate[bot] chore(deps): update dependency turbo to ^1.12.2 (#5635) f948e7dbcc
Rune Botten chore: remove outdated beta docs URLs (#5636) 4d06ae843d
renovate[bot] chore(deps): update dependency is-hotkey to ^0.2.0 (#5634) 5a49de6e91
Rune Botten fix(cli): update migration run usage text (#5637) 0bae465a44
Binoy Patel fix(migration): shows better error message when running migration list (#5625) 9c2db955f8
Simeon Griggs feat: apply text balance to document titles (#5641) 4e2507b078
renovate[bot] chore(deps): update dependency framer-motion to v11 (#5649) e573c511e9
renovate[bot] chore(deps): update dessant/lock-threads action to v5 (#5650) 0e05e77cbd
renovate[bot] chore(deps): update peter-evans/create-pull-request action to v6 (#5651) 5b1d51cf7e
Indrek Kärner feat(cli): prompt to use default plan when wrong coupon or plan 8e202c74be
Binoy Patel chore(deps): update dependency depcheck to ^1.4.7 (#5631) 03c65f635d
Ash feat(cli): improve reporting when dry running from export (#5609) b8eefc6c68
ecospark[bot] chore(deps): dedupe yarn.lock (#5658) 93a05b1b6b
Cody Olsen fix: regression caused by #5440 (#5657) 0af205cbc3
Espen Hovlandsdal refactor(cli): clean up esbuild on completed migration list operation d17269eaed
Espen Hovlandsdal refactor(migration): sort imports cc9e473294
Espen Hovlandsdal fix(migration): make sanity migration list also include file-only migrations c6745ab292
Espen Hovlandsdal refactor(migration): use chalk from context instead of importing it 471e491cfc
Espen Hovlandsdal refactor(migration): reuse resolve migration logic in run command 063f8ebaeb
Espen Hovlandsdal refactor(migration): move migration resolve functions to util folder a9606b8e60
Ash fix(form): preserve intrinsic block size of field labels (#5639) 08f669449c
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.7.4 (#5671) 55a54b5420
Nina Andal Aarvik fix(src): add document title to publosh/unpublish success message in toast (#5605) 0cf377270e
Nina Andal Aarvik fix(core): fix aligning of columnar objects/fieldsets (#5627) 851b62d0ab
Binoy Patel fix(perf): fixes build and deploy issues with perf studio (#5646) d17f722fd9
Binoy Patel chore(migration): fixes help copy on migration create command (#5663) bb3fb8f969
Robin Pyon docs(core): update components.logo deprecation note to correctly point to workspace.icons (#5677) bfa8e54c7b
Bjørge Næss feat(migration): (re)introduce --from-export (#5672) 7332a9f859
Bjørge Næss fix(migrate): submit mutations with visibility=async (#5675) 0eda4a7e56
Binoy Patel fix(migration): fixes an issue where migration command would error sometimes (#5678) 805745f9e1
cngonzalez fix: add icon display as default to documentTypeList (#5644) 40b3d5035a
ecospark[bot] chore(deps): dedupe yarn.lock (#5674) b0a8248744
Nina Andal Aarvik fix(core): adding accessibility labels to pte objects (#5652) 3d6ed071a0
Ash fix(cli): respect unattended mode (#5659) 0e0fd1fab6
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.7.6 (#5682) 8f0e9114ec
Rostislav Melkumyan fix(studio): center studio nav (#5608) d1aecb5683
Espen Hovlandsdal refactor(comments): unprefix namespaced i18n comment resources 767ef22dc0
Espen Hovlandsdal refactor(comments): clarify what "feedback" refers to in i18n comments f0ad7392c2
Espen Hovlandsdal fix(comments): use correct apostroph in onboarding popover 07e03172e2
Espen Hovlandsdal refactor(comments): simplify usage 2f8bbe17f6
Espen Hovlandsdal refactor(comments): allow specifying location of "you" in reactions story 3c48b0d32a
Espen Hovlandsdal refactor(comments): allow for more users in reactions workshop 60b54c2be1
Espen Hovlandsdal refactor(comments): use list formatter, group reactions resources 8068c11c5c
Espen Hovlandsdal refactor(comments): avoid using internal document inspector name 01e499841f
Espen Hovlandsdal refactor(comments): align prop name for field title c914385789
Espen Hovlandsdal refactor(comments): simplify "add comment to field" resources 765130fa07
Espen Hovlandsdal refactor(comments): replace useTimeAgo with useRelativeTime hook a86235dbc6
Espen Hovlandsdal refactor(comments): sort imports 016342f6c0
Espen Hovlandsdal fix(comments): use locale-aware date formatting d7fbcd8912
Espen Hovlandsdal refactor(comments): clarify field button resources, remove unused resource e73b32ccec
Espen Hovlandsdal refactor(comments): group comment input resources under compose cc31d216bf
Espen Hovlandsdal refactor(comments): sort imports 12d355ed6a
Espen Hovlandsdal fix(comments): translate input placeholder e93633c17b
Espen Hovlandsdal refactor(comments): group + clarify purpose of mention resources 67f35732f6
Espen Hovlandsdal refactor(comments): colocate more compose resources 7492d72f63
Espen Hovlandsdal refactor(comments): group status filter resources 09877bf5a7
Espen Hovlandsdal refactor(comments): colocate "go to.." buttons under list item 904ad29708
Espen Hovlandsdal refactor(comments): rename resources a909949bef
Espen Hovlandsdal refactor(comments): sort imports 1302bc426f
Espen Hovlandsdal fix(comments): remove stray t prop in cloning causing warnings a89f5d327d
Espen Hovlandsdal fix(comments): improve text wrapping logic inside of user list 6317b49d23
Bjørge Næss feat(migrate): use autoGenerateKeys=true when submitting mutations (#5685) 5ec6a22726
Binoy Patel chore(cli): add schema command to help list (#5676) 3d0f7ee26c
Espen Hovlandsdal refactor(vision): sort imports 3191018600
Espen Hovlandsdal fix(vision): explicitly allow v1 as valid API version 175ece0d0c
Espen Hovlandsdal fix(vision): ensure query/params from localStorage are strings d1dd5379fd
Espen Hovlandsdal fix(vision): persist raw (string) value of params to localStorage c13868a007
Espen Hovlandsdal refactor(vision): sort state attributes alphabetically cb38c6401f
Espen Hovlandsdal fix(vision): provide error boundary with cache clear on error 3a8a987b0b
Cody Olsen chore: add presentation test studio (#5683) 082805101f
Pedro Bonamin feat(comments): adds read-only state to comments. (#5570) fab7cecedb

v3.27.1

3 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

🐛 Notable bugfixes

  • Fixes a bug with sanity migrate that caused a patch to be applied twice.

📓 Full changelog

Author Message Commit
Binoy Patel fix(migration): fixes issues where patch would happen twice (#5638) 343765d7c9

v3.27.0

3 months ago

Installation and upgrading

To initiate a new Sanity Studio without installing the CLI globally:

npm create sanity@latest

To upgrade a Sanity Studio, run this command in its folder:

npm install sanity@latest

✨ Highlights

New CLI command sanity migration create|list|run

You can now create, list, and run content migrations from the Sanity CLI. The new tooling lets you scaffold content migrations as code and run them in dry and production mode. It also introduces a new API for defining content migration with helper functions (defineMigration()).

We're still working out the documentation for schema and content migrations; early adopters can learn more by running the following CLI commands in a Sanity Studio project folder:

sanity migration --help

You can run sanity migration create to explore our new content migration templates.

New CLI command: sanity schema validate

You can now validate a Sanity Studio schema with the CLI command sanity schema validate. Among other things, it will identify problems with your schema type definitions. This tooling can be useful for running in CI/CD pipelines or debugging your schema configuration.

Learn more by running:

sanity schema validate ---help

Other features

  • Adds Studio UI localization support to the comments plugin
  • Adds support for validating dataset import and export files with sanity documents validate
  • Adds intentUrl in json and ndjson formats for sanity documents validate

🐛 Notable bugfixes

  • Fixes a type issue where Rule.min and Rule.max did not allow strings
  • Fixes an issue where large documents would not duplicate correctly
  • Fixes an issue with date validation when using custom format for dates
  • Fixes typo in asset source string (thanks @kkupcin)
  • Fixes an where valid documents would be reported in sanity documents validate --format json
  • Fixes a bug that caused uses of Vite-like environment variables import.meta.env to break the mock browser environment used in the CLI.

📓 Full changelog

Author Message Commit
Rico Kahler fix(validation): update min and max to include string for dates (#5555) 881a9910d2
Rico Kahler fix(core): wait for duplicate success before navigating (#5556) 088830d2e6
Cody Olsen refactor: move babel config to jest config (#5562) fa3bf841ed
Tommy Petty bug(core): fix issue with date formatting in validation message (#5551) ab0dbe1b29
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.6.1 68e6b072cd
ecospark[bot] chore(deps): dedupe yarn.lock (#5581) 974b601f27
Nina Andal Aarvik fix(comments): localize all strings (#5578) a7086f2a62
Rico Kahler feat(cli): support --file in sanity documents validate (#5580) 5cb4ea63cc
ecospark[bot] chore(deps): dedupe yarn.lock (#5588) ff3d625bec
Fred Carlsen chore(core): include user agent and screen density in telemetry calls (#5568) 8a166bd3e6
Kornelija Kupcinskiene fix(i18n): spelling mistake in asset source string (#5575) 3a81d6b181
Binoy Patel chore(cli): remove beta copy from documents validate command (#5589) c328dca33f
Nina Andal Aarvik fix(src): add textskeleton to loading state of mentions (#5587) 26cbae78ea
Binoy Patel fix(validation): filter system documents when running validation (#5590) d8c4a3f2d9
Rico Kahler feat(cli): add new sanity schema validate command (#5583) 09cdb5fc54
renovate[bot] fix(deps): update dependency @sanity/client to ^6.12.3 (#5593) e6cad2e0dc
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.7.2 (#5596) 3650fb2417
Bjørge Næss fix(studio): fallback to when logging installed plugins (#5602) 6df6ee5c03
renovate[bot] chore(deps): update dependency @sanity/ui to ^2.0.1 (#5594) b701756105
Pedro Bonamin chore(deps): update dependency @sanity/ui to ^2.0.1 (#5607) dad349266d
Rico Kahler feat(cli): add intentUrl to json and ndjson reporters (#5610) 71f9aedc21
Bjørge Næss feat(migrate): move into monorepo from poc fa86d633e8
Bjørge Næss test(migrate): make sure uint8array-extras package gets transpiled from esm 3b0e783f5f
Bjørge Næss feat(cli): scaffold create/run migration cli commands 9495db7541
Bjørge Næss fix(migrate): inline functions from uint8array-extras for now f379f407b3
Bjørge Næss feat: basic migration cli support 8304afc76d
Bjørge Næss feat: basic migrations list command ead9f3ed19
Bjørge Næss feat: migration create command w/templates 0a596e4505
Bjørge Næss feat(sanity): add exports for sanity/migrate + sanity/migrate/mutations c4b19a422b
Ash chore(migrate): add test script 4abe2bca88
Ash test(migrate): add tests for parseJSON 1d39b784e1
Ash feat(migrate): add customisable parser and iterator type to parseJSON 5e8e66677e
Ash feat(migrate): add JSON parser that can handle chunks interrupted by an error object 74db2df76c
Bjørge Næss refactor(migrate): rename targets => destinations b7303245f6
Ash feat(migrate): use safe JSON parser when streaming from Export HTTP API (#5542) a1c0faf191
Bjørge Næss fix(util): fix package.json formatting 17e8130770
Bjørge Næss feat(migrate): implement mutation batcher and use when submitting against mutate endpoint 1822dc2e8f
Bjørge Næss feat(migrate): limit request concurrency a9bfef9f09
Bjørge Næss fix(migrate): workaround issue with p-map and ESM 7aaa5ed6af
Bjørge Næss feat(cli): allow user provided concurrency 2579159969
Bjørge Næss feat(migration): improve progress as migration is running (#5550) 67aa5a9983
Binoy Patel feat(migration): add a prompt before runing a real migration (#5552) 4ab2ac27ed
Binoy Patel feat(migration): support passing an array of documentTypes to migration (#5566) 458ac49adb
Binoy Patel chore(migration): add better error message when request fails (#5567) f1c2cd45a4
Bjørge Næss feat(migrate): add asyncIterableToStream util 0563e7b3c1
Bjørge Næss feat(migrate): add bufferThroughFile utility ed7c904247
Bjørge Næss fix(migrate): buffer exports through file dd47e2beec
Bjørge Næss fix(cli): use dryRun from @sanity/migrate 4c2cab9e01
Bjørge Næss refactor(migrate): rename function 154483ecb4
Bjørge Næss refactor(migrate): add ndjson support for both parsing and stringifying in ndjson util ec11092170
Bjørge Næss refactor(sanity): remove mutiny dependency in favor of inlined creators 66bf826da2
Bjørge Næss fix(sanity): add --no-progress flag 24bc18f99b
Bjørge Næss fix(migrate): simplify bufferThroughFile 990fb5058c
Bjørge Næss feat(migrate): unify contexts, add support for document lookup and query during a migration 3a54e20787
Bjørge Næss fix(dev): fix example migration script imports 5381f3480d
Binoy Patel feat(migration): support async hooks in migration nodes (#5564) cc6b2f33a1
Bjørge Næss fix(sanity): use --no-dry instead of --dry=false ba905dc41d
Bjørge Næss feat(migrate): add support for yielding transactions 0a58fa3d97
Bjørge Næss fix(migrate): minor typing issue 663da91a84
Bjørge Næss fix(sanity): polish cli and migration templates 027ad476c3
Bjørge Næss chore(deps): remove unused deps 2e61bd53b3
Bjørge Næss fix(sanity): fix quoting of documentTypes in migration templates 8a5f67bf42
Bjørge Næss fix(sanity): rename migration name => title 27b0088498
Bjørge Næss fix(migrate): run migration against all documents if documentTypes is omitted e80bbdf9a1
Binoy Patel fix(migration): fixes dry run not showing any information 2568666752
Binoy Patel fix(migration): show proper error message when the file has code issues 7256f85a3d
Bjørge Næss fix(migrate): various naming consistency fixes dbb70480e2
Bjørge Næss fix(sanity): add a few examples to help text for 'sanity migration create' 8290baecee
Bjørge Næss fix(sanity): improve error handling on 'sanity migration run' without id 5d9a556f9d
Bjørge Næss fix(migrate): fix error asserting transaction df310cf5f3
Bjørge Næss fix(migrate): use transactionId instead of id on mutation payload a82df02b54
Ash feat(cli): add pretty mutation formatting to migration runner (#5573) 2dba206983
Bjørge Næss chore(migrate): instrument with some debug logging 79c5e12cf9
Bjørge Næss refactor(migration): move filtered document methods to a separate filtered-context key, add a client with limited concurrency to migration context 81e43092dc
Bjørge Næss fix(migrate): add request tags and user agent f22aa0cc03
Bjørge Næss fix(sanity): improve minimal example 2e77de7b7a
Binoy Patel chore(migration): remove from-export flag from migration cli (#5611) b2a94ffc0f
Binoy Patel chore(migration): remove query from migration context (#5612) ae7105a241
Binoy Patel chore(migration): change dry command to dry-run (#5613) 81eb846380
Bjørge Næss fix(migrate): limit client methods during migration 13de5a273b
Binoy Patel fix(migration): parse cli arguments so the types are proper (#5616) 7751df1717
Bjørge Næss fix(migrate): cleanup buffer file after read (#5618) 387945cde1
Bjørge Næss fix(migrate): remove mkdirp in favor of node:fs (#5619) 338bf269c9
Rico Kahler fix(cli): add support for import.meta.env (#5617) 083ff16e3d
Bjørge Næss fix(migrate): scope node path to the current node (#5620) 93f82d2dcb

v3.26.1

3 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

🐛 Notable bugfixes

  • Fixes issue introduced in v3.26.0 where, upon the first comment in a project lacking an addon dataset, the dataset fails to be created, and the comment remains unposted.
  • Enhanced export reliability through improved asset retry mechanisms.

📓 Full changelog

Author Message Commit
Sindre Gulseth Improve asset export retrying (#5563) a68df71
Herman Wikner fix(comments): addon dataset creation (#5577) c8f1da3

v3.26.0

3 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

Deprecation support for Documents and Fields

This release introduces the option to mark document and field types as deprecated. This can be used to gently steer Studio users towards updated schemas or to phase out legacy fields without abrupt changes.

export const deprecatedDocument = defineType({
  name: 'deprecatedDocument',
  title: 'Deprecated Document',
  type: 'document',
  deprecated: {
    reason: 'Use the Author document type instead',
  },
  fields: [
    defineField({
      name: 'title',
      type: 'string',
      deprecated: {
        reason: 'This field was used in a legacy system and is no longer used.',
      },
    }),
  ],
})

Deprecation example

When a field or document is deprecated, an informative message will appear in the Studio, clearly indicating the recommended action to take. This aids in maintaining a clean and up-to-date content structure.

Bonus: Deprecation messages now appear in the GraphQL schema, providing clarity during transitions. Deprecated document types and fields should be appropriately treated in documentation and tooling.

Reactions to Comments

This release also introduces a new layer of interactivity in the Studio with the ability for users to react to comments! :tada:

Far be it from us to speak ill of verbose and precise communication using full sentences, but sometimes you just want to express a sentiment quickly with a :rocket: or a :+1: and Sanity Studio now has you covered for those occasions. Streamline feedback processes and consensus building, and make your Studio a more vibrant collaborative space in one fell swoop with comment reactions. :tophat:

Comments Reactions Screenshot

🐛 Notable bugfixes

  • Enhances user experience in the Studio by adding localized browser document titles and correcting unlocalized strings, accommodating users who prefer languages other than English.
  • Fixes an issue where number-like string flags passed to CLI commands were parsed as numbers by the option parser, leading to truncation of large integer-only document IDs and similar.
  • Resolves a restoration issue with the token login method ensuring the active session is retained post webpage reloads when cookieless auth is in effect.
  • Enhances UI components consistency in tooltips and delay groups for better UX.
  • Fixes a performance issue by re-applying useMemo on DocumentPaneContext values, reducing unnecessary re-renders and improving document pane performances.
  • Ensures that errors in the useFeatureEnabled hook result in an empty features list rather than disruptive error toasts; this minimizes user interruption when feature availability checks fail.
  • Fixes multiple bugs in the sanity documents validate CLI command relating to visibility, unnecessary validation reports, reference checks batch processing, and unknown field validation for images and file types.
  • Improves spacing between the published date and the last updated date in the document status bar for better readability.

📓 Full changelog

Author Message Commit
Tommy Petty fix(cli): always treat arguments without options as strings (#5500) 9ca1cd0ce
Espen Hovlandsdal feat(i18n): add i18n resources for browser document title (#5477) fb4eb6813
Herman Wikner refactor(core): grants permission logic (#5299) dfebba6e5
Espen Hovlandsdal test(structure): fix document title test d9cc636aa
Binoy Patel test(structure): update StructureTitle tests (#5518) 840ac3e06
Ash fix(core): token login method session restoration (#5497) ae44bc7fb
Pedro Bonamin fix(ui-components): add TooltipDelayGroupProvider to ui-components (#5514) 030780a8e
Espen Hovlandsdal fix(desk): correct import from @sanity/structure to sanity/structure e64463350
Espen Hovlandsdal chore(deps): bump minimum version of @sanity/logos to latest 7c20321c9
Tommy Petty chore(core): updated pull request template to emphasize testing (#5519) b1c55d835
Herman Wikner feat(comments): implement reactions (#5409) 8c140beab
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.6.1 (#5526) 6dbaceaf4
ecospark[bot] chore(deps): dedupe yarn.lock (#5527) 8fab227dd
Robin Pyon fix(cli): upgrade templates to use @sanity/ui@2 (#5528) 8c3d46a1e
Binoy Patel chore(deps): remove pretty-quick packages and fix formatting action (#5511) 9b3eae978
Espen Hovlandsdal refactor: colocate duplicate type + value imports (#5515) 9795480a3
Cody Olsen fix(performance): add back useMemo on DocumentPaneContext value (#5458) bd141cdac
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.7.0 (#5537) 88ab3adaf
Herman Wikner fix(core): error handling in useFeatureEnabled (#5538) 08eb76c39
Rico Kahler fix(cli): misc sanity documents validate fixes (#5521) 475981d6d
Espen Hovlandsdal fix(i18n): import i18n utils from relative path/sanity module (#5546) e536d2381
Espen Hovlandsdal fix(structure): fix unintended import from @sanity/ui-workshop (#5545) 0e18aa9ad
Tommy Petty fix(i18n): missing translation on document inspector close button (#5520) 39babbfad
Bjørge Næss feat(core): add telemetry scaffolding to Studio (#5503) 66b88f7eb
Bjørge Næss Revert "fix(i18n): import i18n utils from relative path/sanity module (#5546)" bdfb913ea
Bjørge Næss chore(codeowners): add growth team as owners of telemetry definitions (#5525) aa62661e4
Robin Pyon chore: add ui component workshop stories, simplify internal tab component (#5549) 657c6e5da
Binoy Patel feat(core): schema and field deprecation (#5489) f7c241787
Robin Pyon fix: increase space between published date and last updated date (#5548) 1d0bac960
Pedro Bonamin chore(telemetry): track expand and collapse pte actions (#5523) 0f8e1a281

v3.25.0

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

New Documents Validate CLI Command (beta)

https://github.com/sanity-io/sanity/assets/10551026/36dd1d32-84a3-4755-b629-1798bd845e46

The sanity documents validate command is now available! This powerful tool checks your documents against your project's schema directly from your command line. It uses a mocked browser environment to validate all documents locally, perfect for ensuring data integrity.

Note: As this feature is currently in beta, some projects may not load correctly. We encourage users to report any issues encountered to help us improve here: https://github.com/sanity-io/sanity/issues/5510

Improved Copy-Paste experience from Google Docs and Notion

The Studio now preserves formatting more reliably when content is pasted from Google Docs in Safari, and no longer incorrectly applies underline decorators to pasted links. Additionally, the Studio now preserves formatting more reliably when content is copied from a single block in Notion.

User interface and experience updates

  • Root page link: The workspace icon now consistently serves as a direct link to the 'root' page (the first configured tool), streamlining navigation.
  • Improved Workspace Switcher: A new tooltip feature has been added to the workspace switcher for better clarity.
  • Simplified Tool Menu: The tool menu will now be hidden when only one tool is installed, reducing clutter.
  • Layout stability: We've resolved an issue with long workspace titles disrupting the navbar layout. Titles now truncate with ellipses to maintain a clean appearance.
  • Localized tooltip text: The 'open menu' button tooltip text has been localized and is now more accessible on smaller screens.
  • Intuitive icons: The help and resources button now features the correct icon, making it more intuitive and consistent with previous versions.
  • PTE improvements: Ensures that clicking to edit in presentation mode correctly focuses the relevant block, improving the editing workflow.

🐛 Notable bugfixes

  • Fixes a bug where logging out didn't invalidate the cookieless auth token.
  • Fixes an issue in the Portable Text Editor where the 'Empty' placeholder placement was off.
  • Fixes an issue where array item focus rings were cropped, ensuring they're now displayed in full.
  • Fixes a bug where the workspace switcher tooltip wasn't displaying correctly.

📓 Full changelog

Author Message Commit
Fred Carlsen feat(block-tools): add special notion handling for single block decorators (#5411) a28106160
Fred Carlsen fix(block-tools): more robust formatting detection on copy paste in Safari (#5485) 0cec72bad
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.5.3 (#5486) 4a25ee9fe
renovate[bot] fix(deps): update dependency @sanity/client to ^6.11.1 (#5488) 0f51ba97c
renovate[bot] chore(deps): update dependency @sanity/ui to v2.0.0-beta.17 (#5487) 48066a3e0
Rico Kahler fix(test): use "runtime": "automatic" for "@babel/preset-react" (#5492) 8023c3305
shur fix: mark builds as completed/errored and indicate empty cli runs (#5469) a581d8dfb
Ash fix(core): include cookieless auth token in logout request if it exists (#5491) ee9f89f1b
Nina Andal Aarvik fix(core): add missing inter fontface for weights 800+900 (#5490) ec84a4293
Bjørge Næss fix(cli): telemetry: only log first 10 elements in args array (#5471) 5281b42fa
Tommy Petty chore(i18n): fixed missing translations with document status pulse (#5498) c558040a5
Ash test(cli): fix flaky dev server test (#5476) 87cc62b74
Bjørge Næss chore(deps): regenerate lockfile 2fe7f0957
Per-Kristian Nordnes fix(form/inputs): include text blocks in PT-members when theya are focused (#5502) f2a228fb7
Robin Pyon fix: use help icon for help + resources button (#5506) 9105ec767
Robin Pyon fix: ensure list array card focusRing isn't cropped and renders with correct radii (#5505) ffb626893
Robin Pyon fix(deps): update @sanity/ui to 2.0.0 and @sanity/color to 3.0.0 (#5507) cc27cb842
Robin Pyon fix: various navbar improvements (#5504) 6c8dce9aa
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.6.0 (#5508) ddece4c55
Rico Kahler feat(cli): new documents validate command (#5475) 836906142

v3.24.1

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) a63a20a24
renovate[bot] chore(deps): update babel monorepo to ^7.23.7 (#5430) 232aab865
renovate[bot] chore(deps): update dependency turbo to ^1.11.2 (#5436) cee0e15fb
Pedro Bonamin fix(legacy-theme): update buildLegacyTheme to support custom colors (#5437) b4fb5b67f
Fred Carlsen feat: conditionally set maximum search depth in studio search (#5440) 261b05efc
renovate[bot] chore(deps): update dependency @sanity/ui to v2.0.0-beta.14 (#5445) ac1e465ee
renovate[bot] chore(lockfile): update dependency framer-motion to v10.17.4 (#5450) e462d96c8
renovate[bot] chore(deps): update dependency styled-components to ^6.1.6 (#5446) 5cc319db3
Robin Pyon fix: opt-out of internal studio ui-components for user facing custom document action dialogs (#5444) 5a9d1f8fa
Robin Pyon fix(i18n): use correct locale string for document restore confirmation (#5453) 2d817cb7e
Jørn Knutsen fix(vision): use untranslated value for "other" api version (#5433) f3181ba94
Espen Hovlandsdal refactor(structure): desk => structure file rename 7c484f798
Espen Hovlandsdal refactor(structure): rename references to desk/Desk e3ea119be
Espen Hovlandsdal fix(structure): fix typo in renamed structure tool context 00496ab8f
Espen Hovlandsdal feat(cli): add desk rename codemod 749444d19
Espen Hovlandsdal chore: run desk rename codemod e6a2b3acc
Espen Hovlandsdal fix(cli): bootstrap new studios with structure import 7516d0f78
Espen Hovlandsdal refactor(desk): explicitly import/export for improved deprecation handling 47c5e4b29
Espen Hovlandsdal fix(core): correct typesVersions path for structure export b01819332
ecospark[bot] chore(prettier): fix unformatted files 🤖 ✨ (#5454) c446609c6
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.4.2 7972ff48b
ecospark[bot] chore(deps): dedupe yarn.lock (#5455) 01d52388e
Fred Carlsen fix(block-tools): keep strike-through formatting when pasting from gdocs (#5443) 779a114e1
Nina Andal Aarvik fix(core): remove variable fonts in global styles (#5456) 47d84a213
Tommy Petty fix(cli): uniquify temp directory used during dataset import (#5400) a84cfeb84
Cody Olsen chore(deps): update dependency @sanity/ui to v2.0.0-beta.15 d916bd7a5
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.4.3 547906964
Nina Andal Aarvik fix(desk): utranslate when form title is missing (#5439) 8c52faa15
Robin Pyon fix: add custom resize handle icon (#5462) 38f951c5b
Herman Wikner fix(core): form fieldset border (#5468) 8ff030823
Pedro Bonamin feat(desk): add __experimental_formPreviewTitle to documents (#5452) 90c24c895
Nina Andal Aarvik fix(core): left align button text in PTE (#5422) a21656efe
Nina Andal Aarvik fix(core): add scroll event listener for AnnotationToolbarPopover referenceBoundary (#5410) 5719a092d
Nina Andal Aarvik fix(core): add useClickOutside function to filter buttons afdb3f969
Herman Wikner feat(comments): enable by default (#5467) c09a26d7c
Pedro Bonamin chore(dependencies): update @sanity/ui to 2.0.0-beta.16 (#5474) 49e1a7eae
Sindre Gulseth refactor(graphql): use Set to speedup guard check 31b755914
Sindre Gulseth refactor(graphql): optimize multiple loops into two for loops ab1459a2d
Sindre Gulseth chore(graphql): remove unncessary type cast and optimize readability 330c621c0
Sindre Gulseth feat(graphql): add experimental mode to optimize/cache schema union definitions 52e436973
Espen Hovlandsdal fix(i18n): pass Code component to document list pane error (#5434) 30f9bef0b
Rico Kahler fix(cli): update esbuild options for better compat (#5461) fc45930ee
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.5.0 75b052c96
Robin Pyon fix: update reverse trial button styles, add tooltips to nav button and localize (#5478) 8e8c474ed
Cody Olsen fix: prevent props that are unknown html attributes from passing through (#5481) ddf605ff7
Robin Pyon fix: position search button in the LHS navbar (#5479) 8b3aa07e0
Nina Andal Aarvik fix(core): add aria-label to expand PTE button (#5459) d7091127b
Robin Pyon chore: add codeowners for search, theming and visual components (#5480) f59774b53
Pedro Bonamin fix(theme): update studio theming, support only color and fonts customisation. (#5442) 078574bde
Rico Kahler feat(validation): validateDocument (#5465) 3c5421efb