Skip to content

Releases: sanity-io/sanity

v3.30.0

20 Feb 16:57
Compare
Choose a tag to compare

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) a3998c3
Ash refactor(util): move concurrency limiter packages to @sanity/util (#5654) 35d368e
Ash fix(cli): project root resolution (#5712) e30f45f
Bjørge Næss chore(deps): normalize vite dependencies 4c6ade2
Bjørge Næss chore(docs): remove internal 'how to publish' from CONTRIBUTING.md 3e95893
Bjørge Næss chore: install npm check-updates as dev dependency 5799aed
Bjørge Næss chore: upgrade debug to latest 4.x 5719016
Bjørge Næss chore(depcheck): remove v2 detector and fix ts error a2c08ee
Bjørge Næss chore(depcheck): cleanup depcheck ignores ac8fdc3
Bjørge Næss chore(portable-text-editor): add missing dev dependency ef47bad
Bjørge Næss chore(groq): use relative imports to 'groq' from tests b5dc763
Bjørge Næss chore(sanity): add missing dev dependencies e1be615
Bjørge Næss chore(cli): cleanup dependencies 3bb3d2b
Bjørge Næss fix(test): remove unused files 4317541
Bjørge Næss chore: add @jest/globals as dev dependency in packages af6561e
Bjørge Næss chore(test): remove @sanity/ui jest mock 66eaec5
Bjørge Næss chore(test): run codemod migrating from implicit imports from '@jest/globals' 23add76
Bjørge Næss chore(test): fix various test typings after moving to @jest/globals 79f89c8
Bjørge Næss chore(sanity): add workaround for typing difference between @types/jest and @jest/globals 7e3bcf2
Bjørge Næss chore: remove @types/jest usage c81b291
Bjørge Næss fix(test): remove usage of jest-dom/extend-expect 8a80150
Bjørge Næss chore(deps): upgrade @testing-library/jest-dom to 6.x 1a323e7
Binoy Patel chore(cli): update help copy for CLI commands (#5687) 12fb96b
Rupert Dunk chore(comments): improve i18n resource for comment contexts (#5731) ce560b0
Bjørge Næss chore: switch from yarn to pnpm da9f72e
Bjørge Næss fix(mutator): fix type export issue c7ed0c9
Bjørge Næss chore(cli): replace vite typing stub with proper dependency d09db4c
Bjørge Næss chore(vision): fix typescript issue related to reexporting codemirror extensions 26c5f47
Bjørge Næss chore(deps): add 'sanity' as dependency to workspace root 564c501
Bjørge Næss chore(deps): upgrade @types/node to 18.x 64203be
Bjørge Næss chore: rename mentions of yarn => pnpm 5a65aad
Bjørge Næss chore(package.json): alphabetize scripts 3527a43
Bjørge Næss chore: clean up package scripts c77b7ba
Bjørge Næss chore: cleanup depcheck scripts 6e37d03
Bjørge Næss fix(github): enable pnpm before installing dependencies 0b572f1
Bjørge Næss fix(github): fix workflow file 5a215ca
Bjørge Næss fix: run prettier e24a458
Bjørge Næss fix(monorepo): add missing dev dependency b5359d3
Bjørge Næss fix(vision): add missing type dependency 6e91aef
Bjørge Næss fix(sanity): update test snapshots 70bcf6f
Bjørge Næss chore: apply suggestions from code review 1b7a1f1
Bjørge Næss fix(ci): fix subargs issue w/pte e2e tests f0fad4c
Binoy Patel chore(e2e): fix e2e action failing (#5735) 4c02649
Bjørge Næss fix(chore): fix lint script (#5739) d1fc36d
Rico Kahler build: remove last rebase step (#5737) 79a5870
Espen Hovlandsdal chore(deps): align versions, lockfile 2d1f084
Espen Hovlandsdal fix(cli): minor whitespace tuning for migration error output (#5727) b20f121
Bjørge Næss chore(ci): fix prettier --write (#5740) 2b00589
Bjørge Næss chore: improve dev commands (#5747) b6199a1
Pedro Bonamin feat(core): add studioActiveToolLayout and navbar rightSectionNode prop (#5749) c708671
Per-Kristian Nordnes chore: add missing types packages (#5751) 656bec2
Ash fix(core): add @types/lodash (#5753) 59f8afd
Cody Olsen fix(structure): allow sanity.previewUrlSecret in document lists (#5733) 8fd55c4
Bjørge Næss chore(perf): replace references to yarn with pnpm (#5748) 2f777d8
Binoy Patel chore(deps): upgrade husky@9 (#5744) 8f3c44c
Binoy Patel test(e2e): fix e2e test caching issue (#5763) 6caf803
Bjørge Næss fix(migrate): throw if attempting to iterate over documents producer (#5758) 928f04d
Bjørge Næss fix(ci): use pnpm for package releases (#5746) 4dedf3b
Binoy Patel test(migration) add tests for normalizeMigrationDefinition (#5565) c4baaab
Pedro Bonamin fix(pte): PTE modal seems to re-render on validation state change due to tooltip disabled change (#5766) c24e4d9
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.9.1 (#5773) b7a3f13
renovate[bot] chore(deps): update dependency @sanity/visual-editing to v1.3.1 (#5770) ec1cc0f
renovate[bot] fix(deps): update dependency @sanity/client to ^6.13.3 (#5772) 79ef8c3
Binoy Patel chore(test): fix linting and type errors (#5775) 67ef631
renovate[bot] chore(deps): update dependency @sanity/ui to ^2.0.3 (#5776) 409edb1
Sindre Gulseth fix: update ndjson specification url (#5780) 15b9e79
Binoy Patel chore(deps): bump @sanity/tsdoc to 1.0.0-alpha.42 (#5765) 86bf2e9
Pedro Bonamin fix(core): update featuresEnabled when switching projects (#5787) 32d79a2
Per-Kristian Nordnes chore: upgrade @playwright/test to latest (#5792) 84a6015
Binoy Patel test(migrate): update types for test to better match usage (#5781) 15c3bc1
Per-Kristian Nordnes refactor(core/inputs): report focusPath on text spans ending with .text (#5786) 3941d86
Pedro Bonamin feat(core): rename useMentionOptions to useUserListWithPermission and move to core (#5778) 5da8891
Per-Kristian Nordnes fix(core/inputs): fix issues with calling onPathFocus for PT-input (#5794) 0f114b1
Bjørge Næss chore: use workspace protocol for internal dependencies 61eee1f
Bjørge Næss chore(workspace): use sanity dependency from workspace 0693a24
Bjørge Næss chore(deps): hoist sanity workspace package b57830c
Bjørge Næss chore(test): use SanityClient type from @sanity/client bfa53c9
Bjørge Næss fix(ci): run e2e-pte tests in the correct folder e2f26c4
Nina Andal Aarvik fix(core): bring back subtitle in workspace list view (#5788) 2202e3c
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#5798) 6d4090e
Espen Hovlandsdal fix(structure): intent menu item nodes not rendering (#5728) 613e1dd
Ash fix(ci): setup pnpm (#5800) 83630cf
Ash fix(ci): remove pnpm reference from setup-node step (#5801) 19c0e86

v3.29.1

14 Feb 18:43
Compare
Choose a tag to compare

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

13 Feb 16:56
Compare
Choose a tag to compare

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) 2664990
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.8.0 (#5694) e725a3c
renovate[bot] chore(deps): update dependency @sanity/visual-editing to v1.2.0 (#5693) 9373ce6
renovate[bot] chore(deps): update dependency @sanity/ui to ^2.0.2 (#5698) bb0b631
renovate[bot] chore(lockfile): update dependency @sanity/assist to v1.2.16 (#5696) 72bc694
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.8.1 (#5699) d645d37
Espen Hovlandsdal fix(comments): catch and suppress errors from comments upsell (#5700) fbaffd2
renovate[bot] fix(deps): update dependency @sanity/client to ^6.12.4 (#5701) f85396f
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.8.2 (#5702) c23ccb4
Simeon Griggs chore: rename "schemas" to the more correct plural "schemaTypes" (#5513) 2eaffd3
Fred Carlsen chore: apply auto eslint fixes with lint-staged (#5705) 40c9b4f
Binoy Patel chore(dev): remove react import 9aabbb0
Bjørge Næss use jsx: 'automatic' for dev server a2f505b
Bjørge Næss chore(deps): upgrade eslint tooling 95890c6
Bjørge Næss fix(eslint): add rules to enforce consistent type imports and import sort orders 1ec2c39
Bjørge Næss chore(eslint): set @typescript-eslint/no-explicit-any as warn instead of error e01c101
Bjørge Næss chore: autofix eslint errors after config change b14622e
Bjørge Næss fix(structure): add workaround for circular import issue causing resolveIntent tests to fail c2e6017
Bjørge Næss chore: exclude packages with type-only imports from depcheck 8fea4a0
Bjørge Næss chore(sanity): preserve order of side-effectsy imports 08e83dd
Bjørge Næss chore(test-studio): reorganize comments & imports in test schema 7ca741c
Bjørge Næss chore: manually fix remaining non-autofixable eslint issues 5a65b7b
Bjørge Næss chore(eslint): extend react/jsx-runtime config 5eb8755
Bjørge Næss chore: remove remaining react imports ff4c3bb
renovate[bot] chore(deps): update dependency @sanity/visual-editing to v1.2.2 (#5718) 117834e
Bjørge Næss fix(cli) let cli tests run with robot tokens (#5715) 04c30fb
Binoy Patel test(core): adds e2e tests for date and datetime inputs (#5681) 6694945
radhe feat(backup): add new command dataset backup for server-side backups (#5571) f04c76e
radhe feat(CLI): in sanity dataset import cmd, add --allow-system-documents to explicitly permit system document import, which should be ignore otherwise (#5689) fa9f924
ecospark[bot] chore(deps): dedupe yarn.lock (#5720) 2518ac4
Nina Andal Aarvik fix(structure): use useDocumentTitle hook for toast message (#5719) 51ed18d
Rupert Dunk feat(comments): add optional intent link to comments (#5576) 27bf5f9
Espen Hovlandsdal refactor(comments): use journey endpoint for comments upsell (#5721) b999da0
Drew Lyton feat(telemetry): add telemetry for Trial Dialogs (#5643) ad971f8
Rico Kahler build: release automation (#5722) d024b09

v3.28.0

06 Feb 19:38
Compare
Choose a tag to compare

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) 1527a9d
renovate[bot] fix(deps): update dependency @sanity/client to ^6.12.3 (#5623) 5116ee0
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.7.3 (#5622) c04afbc
renovate[bot] chore(lockfile): update dependency sanity-plugin-mux-input to v2.2.4 (#5624) 5697847
renovate[bot] chore(deps): update dependency express to ^4.18.2 (#5629) 0050425
Cody Olsen fix: remove __unstable_focusRing unknown forwarded prop warning (#5621) 6c87bea
renovate[bot] chore(deps): update thollander/actions-comment-pull-request digest to 1d3973d (#5632) 56bf76e
renovate[bot] chore(deps): update tiryoh/gha-jobid-action action to v1 (#5633) 359b4cb
Robin Pyon fix: only fully collapse PTE toolbars in 'root' FormBuilder instances (#5547) e219e2a
Knut Melvær docs(create-sanity): update README.md 6fa1750
renovate[bot] chore(deps): update dependency turbo to ^1.12.2 (#5635) f948e7d
Rune Botten chore: remove outdated beta docs URLs (#5636) 4d06ae8
renovate[bot] chore(deps): update dependency is-hotkey to ^0.2.0 (#5634) 5a49de6
Rune Botten fix(cli): update migration run usage text (#5637) 0bae465
Binoy Patel fix(migration): shows better error message when running migration list (#5625) 9c2db95
Simeon Griggs feat: apply text balance to document titles (#5641) 4e2507b
renovate[bot] chore(deps): update dependency framer-motion to v11 (#5649) e573c51
renovate[bot] chore(deps): update dessant/lock-threads action to v5 (#5650) 0e05e77
renovate[bot] chore(deps): update peter-evans/create-pull-request action to v6 (#5651) 5b1d51c
Indrek Kärner feat(cli): prompt to use default plan when wrong coupon or plan 8e202c7
Binoy Patel chore(deps): update dependency depcheck to ^1.4.7 (#5631) 03c65f6
Ash feat(cli): improve reporting when dry running from export (#5609) b8eefc6
ecospark[bot] chore(deps): dedupe yarn.lock (#5658) 93a05b1
Cody Olsen fix: regression caused by #5440 (#5657) 0af205c
Espen Hovlandsdal refactor(cli): clean up esbuild on completed migration list operation d17269e
Espen Hovlandsdal refactor(migration): sort imports cc9e473
Espen Hovlandsdal fix(migration): make sanity migration list also include file-only migrations c6745ab
Espen Hovlandsdal refactor(migration): use chalk from context instead of importing it 471e491
Espen Hovlandsdal refactor(migration): reuse resolve migration logic in run command 063f8eb
Espen Hovlandsdal refactor(migration): move migration resolve functions to util folder a9606b8
Ash fix(form): preserve intrinsic block size of field labels (#5639) 08f6694
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.7.4 (#5671) 55a54b5
Nina Andal Aarvik fix(src): add document title to publosh/unpublish success message in toast (#5605) 0cf3772
Nina Andal Aarvik fix(core): fix aligning of columnar objects/fieldsets (#5627) 851b62d
Binoy Patel fix(perf): fixes build and deploy issues with perf studio (#5646) d17f722
Binoy Patel chore(migration): fixes help copy on migration create command (#5663) bb3fb8f
Robin Pyon docs(core): update components.logo deprecation note to correctly point to workspace.icons (#5677) bfa8e54
Bjørge Næss feat(migration): (re)introduce --from-export (#5672) 7332a9f
Bjørge Næss fix(migrate): submit mutations with visibility=async (#5675) 0eda4a7
Binoy Patel fix(migration): fixes an issue where migration command would error sometimes (#5678) 805745f
cngonzalez fix: add icon display as default to documentTypeList (#5644) 40b3d50
ecospark[bot] chore(deps): dedupe yarn.lock (#5674) b0a8248
Nina Andal Aarvik fix(core): adding accessibility labels to pte objects (#5652) 3d6ed07
Ash fix(cli): respect unattended mode (#5659) 0e0fd1f
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.7.6 (#5682) 8f0e911
Rostislav Melkumyan fix(studio): center studio nav (#5608) d1aecb5
Espen Hovlandsdal refactor(comments): unprefix namespaced i18n comment resources 767ef22
Espen Hovlandsdal refactor(comments): clarify what "feedback" refers to in i18n comments f0ad739
Espen Hovlandsdal fix(comments): use correct apostroph in onboarding popover 07e0317
Espen Hovlandsdal refactor(comments): simplify usage 2f8bbe1
Espen Hovlandsdal refactor(comments): allow specifying location of "you" in reactions story 3c48b0d
Espen Hovlandsdal refactor(comments): allow for more users in reactions workshop 60b54c2
Espen Hovlandsdal refactor(comments): use list formatter, group reactions resources 8068c11
Espen Hovlandsdal refactor(comments): avoid using internal document inspector name 01e4998
Espen Hovlandsdal refactor(comments): align prop name for field title c914385
Espen Hovlandsdal refactor(comments): simplify "add comment to field" resources 765130f
Espen Hovlandsdal refactor(comments): replace useTimeAgo with useRelativeTime hook a86235d
Espen Hovlandsdal refactor(comments): sort imports 016342f
Espen Hovlandsdal fix(comments): use locale-aware date formatting d7fbcd8
Espen Hovlandsdal refactor(comments): clarify field button resources, remove unused resource e73b32c
Espen Hovlandsdal refactor(comments): group comment input resources under compose cc31d21
Espen Hovlandsdal refactor(comments): sort imports 12d355e
Espen Hovlandsdal fix(comments): translate input placeholder e93633c
Espen Hovlandsdal refactor(comments): group + clarify purpose of mention resources 67f3573
Espen Hovlandsdal refactor(comments): colocate more compose resources 7492d72
Espen Hovlandsdal refactor(comments): group status filter resources 09877bf
Espen Hovlandsdal refactor(comments): colocate "go to.." buttons under list item 904ad29
Espen Hovlandsdal refactor(comments): rename resources a909949
Espen Hovlandsdal refactor(comments): sort imports 1302bc4
Espen Hovlandsdal fix(comments): remove stray t prop in cloning causing warnings a89f5d3
Espen Hovlandsdal fix(comments): improve text wrapping logic inside of user list 6317b49
Bjørge Næss feat(migrate): use autoGenerateKeys=true when submitting mutations (#5685) 5ec6a22
Binoy Patel chore(cli): add schema command to help list (#5676) 3d0f7ee
Espen Hovlandsdal refactor(vision): sort imports 3191018
Espen Hovlandsdal fix(vision): explicitly allow v1 as valid API version 175ece0
Espen Hovlandsdal fix(vision): ensure query/params from localStorage are strings d1dd537
Espen Hovlandsdal fix(vision): persist raw (string) value of params to localStorage c13868a
Espen Hovlandsdal refactor(vision): sort state attributes alphabetically cb38c64
Espen Hovlandsdal fix(vision): provide error boundary with cache clear on error 3a8a987
Cody Olsen chore: add presentation test studio (#5683) 0828051
Pedro Bonamin feat(comments): adds read-only state to comments. (#5570) fab7cec

v3.27.1

01 Feb 10:50
39c0b8d
Compare
Choose a tag to compare

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) 343765d

v3.27.0

30 Jan 22:15
Compare
Choose a tag to compare

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) 881a991
Rico Kahler fix(core): wait for duplicate success before navigating (#5556) 088830d
Cody Olsen refactor: move babel config to jest config (#5562) fa3bf84
Tommy Petty bug(core): fix issue with date formatting in validation message (#5551) ab0dbe1
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.6.1 68e6b07
ecospark[bot] chore(deps): dedupe yarn.lock (#5581) 974b601
Nina Andal Aarvik fix(comments): localize all strings (#5578) a7086f2
Rico Kahler feat(cli): support --file in sanity documents validate (#5580) 5cb4ea6
ecospark[bot] chore(deps): dedupe yarn.lock (#5588) ff3d625
Fred Carlsen chore(core): include user agent and screen density in telemetry calls (#5568) 8a166bd
Kornelija Kupcinskiene fix(i18n): spelling mistake in asset source string (#5575) 3a81d6b
Binoy Patel chore(cli): remove beta copy from documents validate command (#5589) c328dca
Nina Andal Aarvik fix(src): add textskeleton to loading state of mentions (#5587) 26cbae7
Binoy Patel fix(validation): filter system documents when running validation (#5590) d8c4a3f
Rico Kahler feat(cli): add new sanity schema validate command (#5583) 09cdb5f
renovate[bot] fix(deps): update dependency @sanity/client to ^6.12.3 (#5593) e6cad2e
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.7.2 (#5596) 3650fb2
Bjørge Næss fix(studio): fallback to when logging installed plugins (#5602) 6df6ee5
renovate[bot] chore(deps): update dependency @sanity/ui to ^2.0.1 (#5594) b701756
Pedro Bonamin chore(deps): update dependency @sanity/ui to ^2.0.1 (#5607) dad3492
Rico Kahler feat(cli): add intentUrl to json and ndjson reporters (#5610) 71f9aed
Bjørge Næss feat(migrate): move into monorepo from poc fa86d63
Bjørge Næss test(migrate): make sure uint8array-extras package gets transpiled from esm 3b0e783
Bjørge Næss feat(cli): scaffold create/run migration cli commands 9495db7
Bjørge Næss fix(migrate): inline functions from uint8array-extras for now f379f40
Bjørge Næss feat: basic migration cli support 8304afc
Bjørge Næss feat: basic migrations list command ead9f3e
Bjørge Næss feat: migration create command w/templates 0a596e4
Bjørge Næss feat(sanity): add exports for sanity/migrate + sanity/migrate/mutations c4b19a4
Ash chore(migrate): add test script 4abe2bc
Ash test(migrate): add tests for parseJSON 1d39b78
Ash feat(migrate): add customisable parser and iterator type to parseJSON 5e8e666
Ash feat(migrate): add JSON parser that can handle chunks interrupted by an error object 74db2df
Bjørge Næss refactor(migrate): rename targets => destinations b730324
Ash feat(migrate): use safe JSON parser when streaming from Export HTTP API (#5542) a1c0faf
Bjørge Næss fix(util): fix package.json formatting 17e8130
Bjørge Næss feat(migrate): implement mutation batcher and use when submitting against mutate endpoint 1822dc2
Bjørge Næss feat(migrate): limit request concurrency a9bfef9
Bjørge Næss fix(migrate): workaround issue with p-map and ESM 7aaa5ed
Bjørge Næss feat(cli): allow user provided concurrency 2579159
Bjørge Næss feat(migration): improve progress as migration is running (#5550) 67aa5a9
Binoy Patel feat(migration): add a prompt before runing a real migration (#5552) 4ab2ac2
Binoy Patel feat(migration): support passing an array of documentTypes to migration (#5566) 458ac49
Binoy Patel chore(migration): add better error message when request fails (#5567) f1c2cd4
Bjørge Næss feat(migrate): add asyncIterableToStream util 0563e7b
Bjørge Næss feat(migrate): add bufferThroughFile utility ed7c904
Bjørge Næss fix(migrate): buffer exports through file dd47e2b
Bjørge Næss fix(cli): use dryRun from @sanity/migrate 4c2cab9
Bjørge Næss refactor(migrate): rename function 154483e
Bjørge Næss refactor(migrate): add ndjson support for both parsing and stringifying in ndjson util ec11092
Bjørge Næss refactor(sanity): remove mutiny dependency in favor of inlined creators 66bf826
Bjørge Næss fix(sanity): add --no-progress flag 24bc18f
Bjørge Næss fix(migrate): simplify bufferThroughFile 990fb50
Bjørge Næss feat(migrate): unify contexts, add support for document lookup and query during a migration 3a54e20
Bjørge Næss fix(dev): fix example migration script imports 5381f34
Binoy Patel feat(migration): support async hooks in migration nodes (#5564) cc6b2f3
Bjørge Næss fix(sanity): use --no-dry instead of --dry=false ba905dc
Bjørge Næss feat(migrate): add support for yielding transactions 0a58fa3
Bjørge Næss fix(migrate): minor typing issue 663da91
Bjørge Næss fix(sanity): polish cli and migration templates 027ad47
Bjørge Næss chore(deps): remove unused deps 2e61bd5
Bjørge Næss fix(sanity): fix quoting of documentTypes in migration templates 8a5f67b
Bjørge Næss fix(sanity): rename migration name => title 27b0088
Bjørge Næss fix(migrate): run migration against all documents if documentTypes is omitted e80bbdf
Binoy Patel fix(migration): fixes dry run not showing any information 2568666
Binoy Patel fix(migration): show proper error message when the file has code issues 7256f85
Bjørge Næss fix(migrate): various naming consistency fixes dbb7048
Bjørge Næss fix(sanity): add a few examples to help text for 'sanity migration create' 8290bae
Bjørge Næss fix(sanity): improve error handling on 'sanity migration run' without id 5d9a556
Bjørge Næss fix(migrate): fix error asserting transaction df310cf
Bjørge Næss fix(migrate): use transactionId instead of id on mutation payload a82df02
Ash feat(cli): add pretty mutation formatting to migration runner (#5573) 2dba206
Bjørge Næss chore(migrate): instrument with some debug logging 79c5e12
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 81e4309
Bjørge Næss fix(migrate): add request tags and user agent f22aa0c
Bjørge Næss fix(sanity): improve minimal example 2e77de7
Binoy Patel chore(migration): remove from-export flag from migration cli (#5611) b2a94ff
Binoy Patel chore(migration): remove query from migration context (#5612) ae7105a
Binoy Patel chore(migration): change dry command to dry-run (#5613) 81eb846
Bjørge Næss fix(migrate): limit client methods during migration 13de5a2
Binoy Patel fix(migration): parse cli arguments so the types are proper (#5616) 7751df1
Bjørge Næss fix(migrate): cleanup buffer file after read (#5618) 387945c
Bjørge Næss fix(migrate): remove mkdirp in favor of node:fs (#5619) 338bf26
Rico Kahler fix(cli): add support for import.meta.env (#5617) 083ff16
Bjørge Næss fix(migrate): scope node path to the current node (#5620) 93f82d2

v3.26.1

26 Jan 14:40
Compare
Choose a tag to compare

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

23 Jan 17:26
Compare
Choose a tag to compare

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! 🎉

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 🚀 or a 👍 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. 🎩

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) 9ca1cd0
Espen Hovlandsdal feat(i18n): add i18n resources for browser document title (#5477) fb4eb68
Herman Wikner refactor(core): grants permission logic (#5299) dfebba6
Espen Hovlandsdal test(structure): fix document title test d9cc636
Binoy Patel test(structure): update StructureTitle tests (#5518) 840ac3e
Ash fix(core): token login method session restoration (#5497) ae44bc7
Pedro Bonamin fix(ui-components): add TooltipDelayGroupProvider to ui-components (#5514) 030780a
Espen Hovlandsdal fix(desk): correct import from @sanity/structure to sanity/structure e644633
Espen Hovlandsdal chore(deps): bump minimum version of @sanity/logos to latest 7c20321
Tommy Petty chore(core): updated pull request template to emphasize testing (#5519) b1c55d8
Herman Wikner feat(comments): implement reactions (#5409) 8c140be
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.6.1 (#5526) 6dbacea
ecospark[bot] chore(deps): dedupe yarn.lock (#5527) 8fab227
Robin Pyon fix(cli): upgrade templates to use @sanity/ui@2 (#5528) 8c3d46a
Binoy Patel chore(deps): remove pretty-quick packages and fix formatting action (#5511) 9b3eae9
Espen Hovlandsdal refactor: colocate duplicate type + value imports (#5515) 9795480
Cody Olsen fix(performance): add back useMemo on DocumentPaneContext value (#5458) bd141cd
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.7.0 (#5537) 88ab3ad
Herman Wikner fix(core): error handling in useFeatureEnabled (#5538) 08eb76c
Rico Kahler fix(cli): misc sanity documents validate fixes (#5521) 475981d
Espen Hovlandsdal fix(i18n): import i18n utils from relative path/sanity module (#5546) e536d23
Espen Hovlandsdal fix(structure): fix unintended import from @sanity/ui-workshop (#5545) 0e18aa9
Tommy Petty fix(i18n): missing translation on document inspector close button (#5520) 39babbf
Bjørge Næss feat(core): add telemetry scaffolding to Studio (#5503) 66b88f7
Bjørge Næss Revert "fix(i18n): import i18n utils from relative path/sanity module (#5546)" bdfb913
Bjørge Næss chore(codeowners): add growth team as owners of telemetry definitions (#5525) aa62661
Robin Pyon chore: add ui component workshop stories, simplify internal tab component (#5549) 657c6e5
Binoy Patel feat(core): schema and field deprecation (#5489) f7c2417
Robin Pyon fix: increase space between published date and last updated date (#5548) 1d0bac9
Pedro Bonamin chore(telemetry): track expand and collapse pte actions (#5523) 0f8e1a2

v3.25.0

16 Jan 18:12
Compare
Choose a tag to compare

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)

CleanShot.2024-01-16.at.11.48.39.mp4

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: #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) a281061
Fred Carlsen fix(block-tools): more robust formatting detection on copy paste in Safari (#5485) 0cec72b
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.5.3 (#5486) 4a25ee9
renovate[bot] fix(deps): update dependency @sanity/client to ^6.11.1 (#5488) 0f51ba9
renovate[bot] chore(deps): update dependency @sanity/ui to v2.0.0-beta.17 (#5487) 48066a3
Rico Kahler fix(test): use "runtime": "automatic" for "@babel/preset-react" (#5492) 8023c33
shur fix: mark builds as completed/errored and indicate empty cli runs (#5469) a581d8d
Ash fix(core): include cookieless auth token in logout request if it exists (#5491) ee9f89f
Nina Andal Aarvik fix(core): add missing inter fontface for weights 800+900 (#5490) ec84a42
Bjørge Næss fix(cli): telemetry: only log first 10 elements in args array (#5471) 5281b42
Tommy Petty chore(i18n): fixed missing translations with document status pulse (#5498) c558040
Ash test(cli): fix flaky dev server test (#5476) 87cc62b
Bjørge Næss chore(deps): regenerate lockfile 2fe7f09
Per-Kristian Nordnes fix(form/inputs): include text blocks in PT-members when theya are focused (#5502) f2a228f
Robin Pyon fix: use help icon for help + resources button (#5506) 9105ec7
Robin Pyon fix: ensure list array card focusRing isn't cropped and renders with correct radii (#5505) ffb6268
Robin Pyon fix(deps): update @sanity/ui to 2.0.0 and @sanity/color to 3.0.0 (#5507) cc27cb8
Robin Pyon fix: various navbar improvements (#5504) 6c8dce9
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.6.0 (#5508) ddece4c
Rico Kahler feat(cli): new documents validate command (#5475) 8369061

v3.24.1

10 Jan 20:36
Compare
Choose a tag to compare

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 ...
Read more