Skip to content

v3.44.0

Latest
Compare
Choose a tag to compare
@bjoerge bjoerge released this 29 May 13:48
· 9 commits to next since this release

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

Customizing restore action now works

This releases fixes a bug preventing developers removing or customising the "restore" document action using the document.actions Studio configuration property.

Studio will now respect changes you make to the "restore" document action, but please note that you must set the action property to "restore" on your DocumentActionComponent. The action property allows Studio to identify the restore action.

Example

import {RocketIcon} from '@sanity/icons'
import {type DocumentActionComponent} from 'sanity'

export const TestCustomRestoreAction: (
  action: DocumentActionComponent,
) => DocumentActionComponent = (restoreAction) => {
  const action: DocumentActionComponent = (props) => ({
    ...restoreAction(props),
    label: 'Custom restore',
    tone: 'positive',
    icon: RocketIcon,
  })

+ action.action = 'restore'
  return action
}

Other bugfixes

  • Fixes an issue that could under certain conditions cause a circular structure to enter an infinite loop. Shoutout to @sarahsvedenborg and @stian-svedenborg for identifying the issue and proposing a fix.
  • Resolves a type error caused by the missing preview property in DocumentComponents.
  • Fixes an issue causing cross dataset reference search not returning hits in certain cases.
  • Improves text selection of full screen Portable Text editors (PTE).
  • Fixes issue where nested fullscreen PTEs were unable to open the block style dropdown.
  • Fixes issue causing EXIF metadata not being included when uplading multiple images through drag + drop. Thanks @xuzuodong!
  • Fixes bugs related to when the PTE is using a Reference input directly as the annotation type (not wrapped in a object type).
  • Add automatically resolving of some validation errors in the PTE.
  • Fixes bug causing "Untitled" to appear as title for array and object fields, even when explicitly passing undefined as title to renderDefault().

📓 Full changelog

Author Message Commit
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#6731) 1587dfe
Pedro Bonamin fix(core): add retry to image observer and loading state (#6709) 0f51f9d
Ash feat(sanity): use optimistic locking when publishing documents (#6711) 6fe8c69
jordanl17 EDX-1352: batch select sheet list documents (#6713) 10b596a
Michael fix(cli): graphql api flag is respected during validation (#6615) c739eea
renovate[bot] chore(lockfile): update dependency @sanity/telemetry to v0.7.8 (#6732) 4307a3c
renovate[bot] chore(lockfile): update dependency i18next to v23.11.5 (#6733) 922235f
Per-Kristian Nordnes refactor(portable-text-editor): automatically resolve some validation errors (#6705) 6062a9a
Per-Kristian Nordnes fix(core/form): prohibit focus and unset on root input (#6706) 4a2f141
Cody Olsen chore: setup CI check for react compiler errors (#6730) 9c7175f
ecospark[bot] chore(deps): dedupe pnpm-lock.yaml (#6734) fe807a8
Hash Brown fix: EXIF data on Image asset not included when uploading multiple images to array type, or via drag-and-drop (#6708) 222418a
Robin Pyon fix(pte): improve text selection in fullscreen inputs (#6642) 6163d96
renovate[bot] fix(deps): Update dev-non-major (#6719) dadfcfa
Rune Botten fix(core): avoid attribute names being scanned as symbols 23f6c67
Cody Olsen chore: change the action to use warnings and only fail on new ones (#6740) ebef5cb
renovate[bot] chore(lockfile): update dependency @sanity/telemetry to v0.7.8 (#6743) a230bbf
renovate[bot] chore(deps): update dependency @vitejs/plugin-react to ^4.3.0 (#6744) 7551264
renovate[bot] chore(deps): update dependency @sanity/pkg-utils to v6.8.18 (#6746) 913740d
renovate[bot] chore(lockfile): update dependency @sanity/import to v3.37.4 (#6749) e5b04d1
renovate[bot] chore(lockfile): update dependency @sanity/export to v3.38.1 (#6748) 0dbf0c5
renovate[bot] fix(deps): Update dev-non-major (#6745) 7c44121
renovate[bot] chore(deps): update dependency @sanity/tsdoc to v1.0.65 (#6747) 79a79a3
Cody Olsen fix: handle React Compiler errors (#6750) 403f485
Ash feat(sanity): use Actions API when restoring drafts 47e5420
Ash feat(sanity): add timeline test ids 038a1a2
Ash test(e2e): add test for restore document action e9b967f
Christian Grøngaard chore: add initial page-building test studio (#6735) cca14f3
Bjørge Næss fix(core): remove id from patch when using server actions (#6751) 7b90cad
Ash fix(sanity): respect Studio configuration when rendering "restore" document action (#6637) 6ba71f2
Binoy Patel chore(ci): set a shorter cache on manifest (#6660) 069dd31
renovate[bot] chore(lockfile): update dependency i18next to v23.11.5 (#6755) 6043919
renovate[bot] chore(lockfile): update dependency react-barcode to v1.5.3 (#6756) 89c86c6
renovate[bot] fix(deps): update dependency @sanity/ui to ^2.1.12 (#6757) 9025619
renovate[bot] fix(deps): update dependency get-it to ^8.5.0 (#6758) 6b98663
renovate[bot] fix(deps): Update dev-non-major (#6759) 5893609
renovate[bot] chore(deps): update dependency @sanity/tsdoc to v1.0.67 (#6761) 543d755
renovate[bot] fix(deps): update dependency @sanity/client to ^6.18.3 (#6762) 3e1bc3e
RitaDias fix(core): unable to open block style select when in nested PTEs in fullscreen (#6738) 9f7ab8b
Per-Kristian Nordnes test(portable-text-editor): add test for empty array value (#6764) a13e22c
Christian Grøngaard chore(page-building): configure build outputs (#6768) 076f9b8
Bjørge Næss fix(core): fix issue with nested preview fields not being included in legacy text search (#6767) 044ac39
jordanl17 feat(structure): sheet list prototype (#6741) f0670bf
Espen Hovlandsdal chore(deps): update dependency @sanity/bifur-client to ^0.4.0 (#6645) a79ea02
Simeon Griggs chore: correct grammar for open-source (#6766) f8ee0f2
Rico Kahler fix: resolve type error by inlining DocumentComponents definition (#6703) 10e1bc3
Herman Wikner fix(core): reactions menu open issue (#6765) 3f52b83
Bjørge Næss fix(form): fix issue making circular structures sometimes causing infinite loop (#6699) 7efdeeb
Per-Kristian Nordnes fix(portable-text-editor): add autoresolving validations and fix normalization issues (#6770) c458289
renovate[bot] fix(deps): update dependency @sanity/client to ^6.19.0 (#6781) 1961904
Bjørge Næss fix(form): properly support passing undefined as title to renderDefault() for array and object fields (#6774) f341c2d
Binoy Patel feat: store all versions in the manifest (#6769) 1fcc0f2
renovate[bot] chore(lockfile): update dependency @portabletext/react to v3.1.0 (#6788) 02fa562
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.15.10 (#6786) 517a1a9
renovate[bot] fix(deps): update dependency @sanity/ui to ^2.1.13 (#6787) 43f1766
renovate[bot] fix(deps): Update dev-non-major (#6789) 772d464
renovate[bot] chore(deps): update linters (#6790) 674a6cb
renovate[bot] chore(deps): update dependency @sanity/visual-editing to v2 (#6792) 8665a16
renovate[bot] chore(lockfile): update dependency @sanity/logos to v2.1.12 (#6793) 9d7c67d
Christian Grøngaard fix(form): avoid spreading key prop (#6776) eeba7f2
renovate[bot] chore(lockfile): update dependency @sanity/logos to v2.1.12 (#6794) 7d0d86a
renovate[bot] chore(lockfile): update dependency @sanity/telemetry to v0.7.9 (#6795) be1065f
Cody Olsen chore(deps): bump eslint-plugin-react-compiler (#6791) ea7db00
renovate[bot] chore(deps): update dependency @sanity/icons to v3 (#6797) 63e3c32
Cody Olsen chore(react-compiler): up the max warnings limit (#6801) aa95805
renovate[bot] fix(deps): update dependency @sanity/presentation to v1.15.11 (#6799) 42fd4bf
renovate[bot] fix(deps): update dependency @sanity/ui to ^2.1.14 (#6800) faa5bcf
renovate[bot] fix(deps): Update dev-non-major (#6798) 6640ad4
Bjørge Næss refactor(core): stabilize studio usage of actions API (#6783) 112b66c