npm @sanity/core 0.131.0
v0.131.0

latest releases: 2.36.2, 2.36.2-weighted-search.16, 2.36.2-weighted-search.10...
5 years ago

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.

🗝 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

Author Message Commit
Espen Hovlandsdal [plugin-loader] Add option to stub CSS loading (#771) 49e6f09
Kristoffer J. Sivertsen [components] Make tags textfield display readOnly correct (#776) 86f73dd
Kristoffer J. Sivertsen Styleselect and official react popper (#777) ba8aadf
Kristoffer J. Sivertsen Responsive dialogs width (#775) 468769f
Bjørge Næss [form-builder] Remove empty values when array dialog closes and pass down undefined as item values if empty (#780) acf0a3b
Bjørge Næss [google-maps-input] Don't overwrite value, just set lat/lng (#781) 0dbbf5c
Bjørge Næss [schema] Remove geopoint as core type (#782) c0495a4
Espen Hovlandsdal [test-studio] Add custom reference input example (#778) 4847a79
Espen Hovlandsdal [chore] Normalize package fields a339d6d
Espen Hovlandsdal [default-layout] Ensure error message inclusion in error boundary (#789) 3fcdd21
Espen Hovlandsdal [test-studio] Add inline object without preview select to objects schema a79db5b
Kristoffer J. Sivertsen Overflowing switch description (#788) 4df78c8
Kristoffer J. Sivertsen [desk-tool] Fix syncing icon and publish button spacing (#787) 39bd39f
Espen Hovlandsdal [core] Add CLI-commands for managing CORS-origins (#790) 7bb4700
even westvang [ecommerce-studio] Change blurb to from localText to localeString (#779) c025d46
Thomas Drevon [default-login] Part-ify rendering of login providers (#793) c6658b2
Espen Hovlandsdal [image-url] Allow using actual query parameters instead of aliases (#792) d36b714
Espen Hovlandsdal [schema] Add missing fields for reference and slug types (#784) 9a79e5b
Espen Hovlandsdal [form-builder] Add overridable part for array input functionality (#795) 7b4bcb1
Knut Melvær [cli] Make upgrade message less confusing (#773) fd93e7d
Kristoffer J. Sivertsen Fix array grid view (#786) 6da04a0
Thomas Drevon [movies-studio] Update google maps api key 0849c5b
Thomas Drevon Fix typo in readme c57680f
Bjørge Næss [chore] Drop support for React 15 (#802) ec41631
Espen Hovlandsdal [image-url] Allow passing asset documents as source (#803) 2f6a7af
Kristoffer J. Sivertsen Button spacing & click to close on dropdown (#794) d98b3bf
Thomas Drevon [cli] Coerce @sanity/core version string before performing satisfaction check (#804) aa5eef2
Bjørge Næss [preview] Don't fail on numbers, booleans and empty values (#805) 869c8c9

Don't miss a new core release

NewReleases is sending notifications on new releases.