v0.131.0
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) | 49e6f0910 Kristoffer J. Sivertsen | [components] Make tags textfield display readOnly correct (#776) | 86f73dd73 Kristoffer J. Sivertsen | Styleselect and official react popper (#777) | ba8aadfa3 Kristoffer J. Sivertsen | Responsive dialogs width (#775) | 468769fdc Bjørge Næss | [form-builder] Remove empty values when array dialog closes and pass down undefined as item values if empty (#780) | acf0a3b4f Bjørge Næss | [google-maps-input] Don't overwrite value, just set lat/lng (#781) | 0dbbf5c38 Bjørge Næss | [schema] Remove geopoint as core type (#782) | c0495a4b5 Espen Hovlandsdal | [test-studio] Add custom reference input example (#778) | 4847a7953 Espen Hovlandsdal | [chore] Normalize package fields | a339d6d1f Espen Hovlandsdal | [default-layout] Ensure error message inclusion in error boundary (#789) | 3fcdd219f Espen Hovlandsdal | [test-studio] Add inline object without preview select to objects schema | a79db5bd5 Kristoffer J. Sivertsen | Overflowing switch description (#788) | 4df78c878 Kristoffer J. Sivertsen | [desk-tool] Fix syncing icon and publish button spacing (#787) | 39bd39f50 Espen Hovlandsdal | [core] Add CLI-commands for managing CORS-origins (#790) | 7bb470019 even westvang | [ecommerce-studio] Change blurb to from localText to localeString (#779) | c025d46fa Thomas Drevon | [default-login] Part-ify rendering of login providers (#793) | c6658b23c Espen Hovlandsdal | [image-url] Allow using actual query parameters instead of aliases (#792) | d36b714c8 Espen Hovlandsdal | [schema] Add missing fields for reference and slug types (#784) | 9a79e5b2d Espen Hovlandsdal | [form-builder] Add overridable part for array input functionality (#795) | 7b4bcb149 Knut Melvær | [cli] Make upgrade message less confusing (#773) | fd93e7d4b Kristoffer J. Sivertsen | Fix array grid view (#786) | 6da04a038 Thomas Drevon | [movies-studio] Update google maps api key | 0849c5b73 Thomas Drevon | Fix typo in readme | c57680f96 Bjørge Næss | [chore] Drop support for React 15 (#802) | ec4163111 Espen Hovlandsdal | [image-url] Allow passing asset documents as source (#803) | 2f6a7af8e Kristoffer J. Sivertsen | Button spacing & click to close on dropdown (#794) | d98b3bf0a Thomas Drevon | [cli] Coerce @sanity/core version string before performing satisfaction check (#804) | aa5eef228 Bjørge Næss | [preview] Don't fail on numbers, booleans and empty values (#805) | 869c8c911