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
Author | Message | Commit |
---|---|---|
Bjørge Næss | [desk-tool] Experimental feature: actions (#992) | f940f60 |
Espen Hovlandsdal | [webpack-integration] Allow passing webpack instance to use (#991) | 7f53c40 |
Bjørge Næss | [form-builder] Fix broken batch upload when uploading > 4 entries at once (#994) | 72838a5 |
Espen Hovlandsdal | [desk-tool] Allow setting editor title (#996) | eaa3374 |
Bjørge Næss | [chore] Remove lockfiles and turn off lerna ci | 2ac5f11 |
Bjørge Næss | [language-filter] Fix incorrect function name in readme | c9beafa |
Espen Hovlandsdal | [import] Fix spinner issue on no references/assets (#998) | 8a041b5 |
Espen Hovlandsdal | [base] Use same active/hover/focus styles for textarea as inputs (#997) | 08ca301 |
Kristoffer J. Sivertsen | [form-builder] Cleanup textarea (#997) | 159de73 |
Bjørge Næss | [document-store] Refactor document store (#1003) | 839c6e1 |
Kristoffer J. Sivertsen | [components] Object fit on img in preview (#1004) | 8445e55 |
Espen Hovlandsdal | [desk-tool] Remove useless SimplePaneItemPreview component (#1001) | 03c99f4 |
Espen Hovlandsdal | [components] Allow disabling media in previews (#1002) | b048211 |
Espen Hovlandsdal | [desk-tool] Clean up pane deriving flow slightly (#1000) | cb79bca |
Espen Hovlandsdal | [desk-tool] Fix document list items with only title being displayed as Untitled (#995) | 31b487d |
Kristoffer J. Sivertsen | [components] Not scrollable pane when handling scroll in infinitelist (#1006) | e5931db |
Kristoffer J. Sivertsen | [base] Some specific styles for textarea (#1008) | 3fa5c63 |
Espen Hovlandsdal | [import] Add --allow-failing-assets flag (#999)
| aeea185 |
Espen Hovlandsdal | [schema] Always define hotspot/crop fields for image type (#980) | c79563b |
Kristoffer J. Sivertsen | [components] Add default icon on pane items (#1005) | 9553b13 |
Kristoffer J. Sivertsen | [components] Collapse pane when too narrow (#1010) | 58a52de |
Kristoffer J. Sivertsen | [components] Smooth spinner with proper fullscreen (#1012) | dba8009 |
Espen Hovlandsdal | [default-layout] Defer intent redirect to fix empty tool state (#1015) | e5249d8 |
Espen Hovlandsdal | [structure] Reset canHandleIntent on doc type list spec changes (#1014)
| f82569e |
Espen Hovlandsdal | [structure] Allow disabling icons for lists and list items (#1013) | 6d86c9e |
Knut Melvær | [vision] Add auto close brackets to editors in Vision (#1016) | b881cba |
Espen Hovlandsdal | [default-login] Attempt to use session ID exchange in Safari (#1018) | 5cecffe |
Knut Melvær | [vision] Replace JSON viewer (#1020) | 63c89eb |
Per-Kristian Nordnes | [default-login] Fix invalid notice of no providers configured message + fix deprecated React lifecycle methods (#1021) | 6a17f98 |
Kristoffer J. Sivertsen | [components] Set height on select for firefox (#1011) | 9fea4b9 |
Espen Hovlandsdal | [client] Warn when token is used with useCdn set to true (#1019) | 4b03291 |