Released Oct 289th 2018


Upgrade the Command Line Interface (CLI) with

npm install --global @sanity/cli

Upgrade the Content Studio with:

sanity upgrade

✨ Highlights

👩🏽‍🔬 Toggle studio UI affordances for create, update, delete and publish

It is now possible to prevent a document type from appearing in the Create new dialog, and prevent the Delete-menu action from appearing in the editor (among others) by specifying a set of enabled actions on the schema type.

It is launced as an experimental feature and can be configured on the property __experimental_actions. For example, this is how you would hide affordances for deleting documents of type myDocument:

  type: 'document',
  name: 'myDocument',
  __experimental_actions: ['create', 'update', 'publish'], 

Note: this only affects the UI and the documents will still be possible to delete through the API.

🙅‍♂️ Turn off icons in lists with structure builder

For certain lists you don't need icons for individual list items. This is often the case when displaying a list of documents of the same type where an image is not available to use as preview. In other cases, the icon might not make a meaningful visual difference. Whatever the case - you can now disable icons for lists by using the showIcons(false) method in the list builder. You can also switch off icons on a per-item basis using the showIcon(false) method.

For more information, see the structure documentation

Other features

  • Vision plug-in autocompletes brackets and quotation marks
  • Icons in type pane and shows without a gray background
  • Improved the JSON-viewer in Vision plug-in
  • The sanity dataset import command now has a --allow-failing-assets flag, which is nice when importing data from a source that may reference broken images and files. With this flag, it will simply ignore the URLs it cannot fetch and proceed as if they did not exist.

🐛 Notable bugfixes

  • Fixed a bug causing webpack to crash when Sanity is used within a monorepo
  • Fixed a bug causing uploads of more than four items at once to fail
  • Fixed a bug where clicking the "new item" action twice in a row would not work
  • Fixed a bug in the content studio that caused listener connections to not get disconnected when no longer needed
  • Fixed a bug where certain schema types would result in documents being listed as "Untitled"
  • Fixed a bug where altering the filter for a document type list would cause the New document action to not resolve properly
  • (Probably) fixed a bug where Safari-users sometimes would not be able to log in
  • Panes now collapse again when made dragged too narrow

📓 Full changelog

Bjørge Næssdesk-tool Experimental feature: actions (#992)f940f605b
Espen Hovlandsdalwebpack-integration Allow passing webpack instance to use (#991)7f53c40a9
Bjørge Næssform-builder Fix broken batch upload when uploading > 4 entries at once (#994)72838a5ce
Espen Hovlandsdaldesk-tool Allow setting editor title (#996)eaa3374a6
Bjørge Næsschore Remove lockfiles and turn off lerna ci2ac5f1127
Bjørge Næsslanguage-filter Fix incorrect function name in readmec9beafab0
Espen Hovlandsdalimport Fix spinner issue on no references/assets (#998)8a041b554
Espen Hovlandsdalbase Use same active/hover/focus styles for textarea as inputs (#997)08ca301f0
Kristoffer J. Sivertsenform-builder Cleanup textarea (#997)159de7380
Bjørge Næssdocument-store Refactor document store (#1003)839c6e1fe
Kristoffer J. Sivertsencomponents Object fit on img in preview (#1004)8445e5539
Espen Hovlandsdaldesk-tool Remove useless SimplePaneItemPreview component (#1001)03c99f4fe
Espen Hovlandsdalcomponents Allow disabling media in previews (#1002)b04821165
Espen Hovlandsdaldesk-tool Clean up pane deriving flow slightly (#1000)cb79bcac9
Espen Hovlandsdaldesk-tool Fix document list items with only title being displayed as Untitled (#995)31b487de1
Kristoffer J. Sivertsencomponents Not scrollable pane when handling scroll in infinitelist (#1006)e5931db1d
Kristoffer J. Sivertsenbase Some specific styles for textarea (#1008)3fa5c636d
Espen Hovlandsdalimport Add --allow-failing-assets flag (#999)aeea1856d
Espen Hovlandsdalschema Always define hotspot/crop fields for image type (#980)c79563bd6
Kristoffer J. Sivertsencomponents Add default icon on pane items (#1005)9553b1377
Kristoffer J. Sivertsencomponents Collapse pane when too narrow (#1010)58a52de9d
Kristoffer J. Sivertsencomponents Smooth spinner with proper fullscreen (#1012)dba80097a
Espen Hovlandsdaldefault-layout Defer intent redirect to fix empty tool state (#1015)e5249d8c9
Espen Hovlandsdalstructure Reset canHandleIntent on doc type list spec changes (#1014)f82569e93
Espen Hovlandsdalstructure Allow disabling icons for lists and list items (#1013)6d86c9e73
Knut Melværvision Add auto close brackets to editors in Vision (#1016)b881cbae5
Espen Hovlandsdaldefault-login Attempt to use session ID exchange in Safari (#1018)5cecffe73
Knut Melværvision Replace JSON viewer (#1020)63c89ebe1
Per-Kristian Nordnesdefault-login Fix invalid notice of no providers configured message + fix deprecated React lifecycle methods (#1021)6a17f9803
Kristoffer J. Sivertsencomponents Set height on select for firefox (#1011)9fea4b9a2
Espen Hovlandsdalclient Warn when token is used with useCdn set to true (#1019)4b0329160