Released May 134th 2018


Upgrade with:

sanity upgrade

And install the latest Command Line Interface (CLI) with:

npm install --global @sanity/cli

✨ Highlights

⌨️ CORS management through CLI

The command line tool now allows you to manage CORS origins without going through the management interface: sanity cors add, sanity cors list and sanity cors delete are your new friends!

📭 Removing empty values

A common complaint has been that "empty" array items sometimes keep hanging around. For example, if you add an item to an array, then closes the add dialog immediately, then the added item was not removed again. This has now been fixed, and if array items are empty when the edit dialog is closed, the item will be removed from the array (see #780 for more details).

🗑 Dropping React 15 support

We launced with React 16 support as of v0.127.0, which was released two months ago. Since then, we have been developing against React 16.2, and since tracking usage of React 16 specific features is hard, we have decided to make it explicit that the studio needs React 16.2 or newer to run. In case you missed it, here's how to upgrade React in your Sanity studio.

🍱 Use layout: 'grid' on your array of images

Make an array look more like an image gallery. Just add options: {layout: 'grid'} to your array. Uses CSS Grid layout to autosize the columns.

ProTip: You can use the layout: 'grid'-option on arrays of any type, not only images.

layout: grid

🗝 Part-ify rendering of login providers

You can now take complete control of how your Studio renders your login providers. Create your own implementation of the LoginDialogContent.js component. Then wire it up in sanity.json:

  "implements": "part:@sanity/base/login-dialog-content",
  "path": "MyLoginDialogContent.js"

🐛 Notable bugfixes

  • Improved display of the tokenized tags input in readOnly mode
  • Fixed a bug causing errors when geopoint types were used in an array
  • Fixed a bug causing the sanity command to complain about incompatible version for prereleases
  • Fixed a bug causing preview components to erroneously identify numbers and empty values as invalid preview values

📓 Full changelog

Espen Hovlandsdalplugin-loader Add option to stub CSS loading (#771)49e6f0910
Kristoffer J. Sivertsencomponents Make tags textfield display readOnly correct (#776)86f73dd73
Kristoffer J. SivertsenStyleselect and official react popper (#777)ba8aadfa3
Kristoffer J. SivertsenResponsive dialogs width (#775)468769fdc
Bjørge Næssform-builder Remove empty values when array dialog closes and pass down undefined as item values if empty (#780)acf0a3b4f
Bjørge Næssgoogle-maps-input Don't overwrite value, just set lat/lng (#781)0dbbf5c38
Bjørge Næssschema Remove geopoint as core type (#782)c0495a4b5
Espen Hovlandsdaltest-studio Add custom reference input example (#778)4847a7953
Espen Hovlandsdalchore Normalize package fieldsa339d6d1f
Espen Hovlandsdaldefault-layout Ensure error message inclusion in error boundary (#789)3fcdd219f
Espen Hovlandsdaltest-studio Add inline object without preview select to objects schemaa79db5bd5
Kristoffer J. SivertsenOverflowing switch description (#788)4df78c878
Kristoffer J. Sivertsendesk-tool Fix syncing icon and publish button spacing (#787)39bd39f50
Espen Hovlandsdalcore Add CLI-commands for managing CORS-origins (#790)7bb470019
even westvangecommerce-studio Change blurb to from localText to localeString (#779)c025d46fa
Thomas Drevondefault-login Part-ify rendering of login providers (#793)c6658b23c
Espen Hovlandsdalimage-url Allow using actual query parameters instead of aliases (#792)d36b714c8
Espen Hovlandsdalschema Add missing fields for reference and slug types (#784)9a79e5b2d
Espen Hovlandsdalform-builder Add overridable part for array input functionality (#795)7b4bcb149
Knut Melværcli Make upgrade message less confusing (#773)fd93e7d4b
Kristoffer J. SivertsenFix array grid view (#786)6da04a038
Thomas Drevonmovies-studio Update google maps api key0849c5b73
Thomas DrevonFix typo in readmec57680f96
Bjørge Næsschore Drop support for React 15 (#802)ec4163111
Espen Hovlandsdalimage-url Allow passing asset documents as source (#803)2f6a7af8e
Kristoffer J. SivertsenButton spacing & click to close on dropdown (#794)d98b3bf0a
Thomas Drevoncli Coerce @sanity/core version string before performing satisfaction check (#804)aa5eef228
Bjørge Næsspreview Don't fail on numbers, booleans and empty values (#805)869c8c911