Upgrade the Command Line Interface (CLI) with
npm install --global @sanity/cli
Upgrade the Content Studio with:
sanity upgrade
✨ Highlights
We had ourselves a "bug week"! Read our blog post.
This release has a bunch of small and less small fixes.
(Slightly) smarter image input/selection
The "select image" dialog no longer shows "Load more" when there are in fact no more images to load. The images are also scaled to fit the current device pixel ratio, resulting in sharper images on mobile devices and high-density displays. Certain images were also downloaded at full size, while they are now scaled down to fit the screen.
Divider allowed in desk structure
A minor (but much requested) feature; You can now use the S.divider()
method to add a small divider between list items in the desk tool. In future releases, we will add the ability to group items even further, which will allow "headings", among other features.
Improved error handling
Non-React errors will now be caught and displayed in the browser window, making it easier to debug issues. Opening the browser developer tools will usually give the error with a better stack trace, helping you find the source of the issue more easily.
sanity exec
uses same babel config as studio
In certain cases, scripts you would want to execute with sanity exec
would include non-standard features like JSX or class properties. While the babel config used for the studio would allow this, sanity exec
did not. This is now fixed.
Faster vision plugin
The @sanity/vision
GROQ playground is now faster and smarter - we've upgraded a bunch of dependencies, fixing a set of scrolling issues and other odd behavior. (Run sanity install @sanity/vision
to try it out.)
More schema validation
We've had a few cases reported where an incorrect schema definition would not be picked up by the schema validation, but instead lead to the studio crashing. Validation rules are now in place to make these situations easier to debug.
Object types no longer listed if no document types found
Previously, if your schema did not contain any document types, the desk tool would instead show object types. This functionality is now removed, and will instead show a descriptive error message.
🐛 Notable bugfixes
- Fixed a focus-ring bug in the editor for Portable Text if it was empty
- Fixed bugs with the "invalid type" warning interface inside the editor for Portable Text.
- Fixed issue where the reference input would not show a "Loading" state on initial load
- Fixed case where patches with a numeric key selection would incorrectly match a string key with the same value
- Fixed positioning of the "Publishing" overlay
- Fixed default layout not being usable without the desk tool installed
- Fixed desk structure resolving not allowing a plain structure node to be used as a child
- Fixed "loading" message on desk tool panes being cut off at the top
- Fixed issue where
sanity init
would not allow--visiblity
flag - Fixed
sanity documents
commands not accepting numeric document IDs - Fixed deprecation warning when logging in to the CLI from Node >= 11
📓 Full changelog
Author | Message | Commit |
---|---|---|
Espen Hovlandsdal | [form-builder] Display "no images found" text if no images are found (#1306) | cdc30a1 |
Espen Hovlandsdal | [form-builder] Don't show 'Load more'-button if reached known end (#1307) | 077172a |
Thomas Drevon | [structure] Throw error when configuring documentTypeListItems with an unknown type | bbb7b78 |
Thomas Drevon | [structure] Rename name --> typeName for consistency | dbb7866 |
Espen Hovlandsdal | [form-builder] Use loading state for reference input while loading initial value (#1309) | 3ee528a |
Espen Hovlandsdal | [form-builder] Use max-fit and and DPR-aware height (#1308) | 15d146e |
Per-Kristian Nordnes | [validation] Check for type validating arrays and objects in document (#1327) | ebb997a |
Espen Hovlandsdal | [mutator] Use strict equals when comparing equality (#1326) | 82caf34 |
Espen Hovlandsdal | [components] Fix propType depending on window global (#1321) | 2eece6f |
Espen Hovlandsdal | [form-builder] Make canvas to blob polyfill node.js-safe (#1320) | 357b2ad |
Espen Hovlandsdal | [components] Remove unused canvas-to-blob dependency (#1319) | d8b8114 |
Kristoffer J. Sivertsen | [desk-tool] Moving overlay out of scroll container (#1312) | 9d24e10 |
Espen Hovlandsdal | [form-builder] Constrain rendered images to a reasonable size (#1330) | 6d04113 |
Kristoffer J. Sivertsen | [vision] Faster result view (#1298) | 9f61ab5 |
Kristoffer J. Sivertsen | [vision] Fix scroll issues (#1295) | b8695a7 |
Kristoffer Sivertsen | [components] Remove unused classNames | 922943a |
Espen Hovlandsdal | [structure] Add divider builder method (#1331) | aa473ba |
Espen Hovlandsdal | [base] Add global error handler (#1333) | 71dc9b6 |
Kristoffer J. Sivertsen | [form-builder] Select asset fixes (#1334) | a752e74 |
Espen Hovlandsdal | [base] Fix history import to match new API (#1323) | 07bc78f |
Espen Hovlandsdal | [schema] Catch and display errors for falsey/incorrectly imported type defs (#1316) | c6cd728 |
Espen Hovlandsdal | [default-layout] Make active tool name optional | e3dd544 |
Espen Hovlandsdal | [default-layout] Prevent crash if no tools are installed | 60c0637 |
Espen Hovlandsdal | [default-layout] Disentangle from data aspects/desk-tool | c32591d |
Espen Hovlandsdal | [schema] Fix crash on invalid array of -member declaration (#1314)
| ec71ed4 |
Espen Hovlandsdal | [desk-tool] Fix issue where non-function child would fail to resolve (#1325)
| 54f745c |
Espen Hovlandsdal | [desk-tool] Fix loading indicator being cut at top (#1324) | 3b4c9b9 |
Espen Hovlandsdal | [cli] Show reconfigure prompt only if output path flag is not cwd | b48c7a7 |
Espen Hovlandsdal | [cli] Fix inverted visibility allowed check | 56d8f6f |
Espen Hovlandsdal | [structure] Improve error when promise is passed in list items (#1311) | 456388b |
Espen Hovlandsdal | [core] Cast document IDs to string (#1317) | 26e2469 |
Espen Hovlandsdal | [core] Make sanity exec use same babel config as studio (#1322)
| 3130fef |
Espen Hovlandsdal | [cli] Use v8 compile cache (#1259) | 414a03a |
Espen Hovlandsdal | [base] Don't catch errors without an Error instance (#1339) | 4a4115f |
Per-Kristian Nordnes | [block-tools] Rename blockContentTypeOptions to blockContentTypeFeatures (#1328) | 570df06 |
Marius Lundgård | [block-tools] Add info about running sanity scripts (#1293) | 4a133ac |
Per-Kristian Nordnes | [form-builder] Block editor: Fix bug where focus was not set properly on editor when first opening the document | 7b3a30e |
Per-Kristian Nordnes | [form-builder] Block editor: fix bugs related to removing unknown types interface inside the editor | 7b3a30e |
Per-Kristian Nordnes | [form-builder] Block editor: Support removing invalid annotation types | 7b3a30e |
Per-Kristian Nordnes | [form-builder] Remove unsued function in BlockObject/InlineObject | 7b3a30e |
Per-Kristian Nordnes | [form-builder] Block editor: fix invalid conditional, and make dragging of inline object nodes smoother | 7b3a30e |
Espen Hovlandsdal | [cli] Generate and use initialization vector for token exchange (#1341) | 2e6b1e2 |
Thomas Drevon | [desk-tool] Display EmptyListPane in case of no document types in schema | 5fe84ef |
Thomas Drevon | [data-aspects] Don't pass schema when calling class function getDocumentTypes | f9cc638 |
Thomas Drevon | [structure] Resolve documentTypeList using defined docs instead of inferred types | 4963164 |
Bjørge Næss | [clean-studio] Add clean-studio | a7469af |
Thomas Drevon | [desk-tool] Rename empty list message component and refrain from using any Pane | 2340e3a |
Thomas Drevon | [desk-tool] Make link actionable | 11d5a38 |
Knut Melvær | [block-tools] Fix variable name in example (#1337) | cdb23e3 |
Thomas Drevon | [structure] Update data aspects mock | 8bd38b4 |
Espen Hovlandsdal | [base] Use pre-wrap to constrain width when displaying uncaught errors (#1343) | 10f9130 |