Upgrade the Command Line Interface (CLI) with:
npm install --global @sanity/cli
Upgrade Sanity Studio with:
sanity upgrade
✨ Highlights
References in place
Users can now create a reference to a draft within the context of the referring document. This allows for a smoother workflow where having to leave the document you are working on in order to create and publish the document you wish to refer to is no longer necessary,
This new behavior of the reference input can be disabled by setting the property disableNew: true
.
More:
Conditional readOnly
fields and fieldsets
The ability to define if a field is editable based on conditions defined in a schema.
Info-level validation
In addition to being able to provide validation errors, developers can also provide guidance with ℹ️ -symbols to give in-line help to editors.
New modal
options in Portable Text editor
The Portable Text editor now supports a new modal
option with a type
and width
property. This means you can customize the size of annotation popovers (a much requested feature).
type: 'block',
marks: {
annotations: [
{
type: 'object',
name: 'link',
title: 'Link',
options: {
// 👇👇👇
modal: {
type: 'popover',
width: 'medium' // the default is "small"
},
// 👆👆👆
},
},
],
},
// ...
🐛 Notable bugfixes
- Fixes a case where the
sanity graphql deploy
command would not exit after a successful deploy. - Fixes a bug where importing the
@sanity/eventsource
module in non-browser, non-node.js environments could potentially crash because of a window reference.
📓 Full changelog
Author | Message | Commit |
---|---|---|
Bjørge Næss | chore(test-studio): add example of nested array with a reference | 66266cc |
Bjørge Næss | fix(base): don't reexport types as values | f7a77b3 |
Rico Kahler | test(desk-tool): proxy module instead of spread | 3790775 |
Fred Carlsen | feat(base,form-builder): support callback for readOnly property on field type | 945bb0f |
vicbergquist | feat(form-builder): resolve readOnly for types in arrays | 07e77f9 |
vicbergquist | feat(form-builder): resolve readonly callbacks in file and image input fields | 5f85c74 |
vicbergquist | fix(conditional-fields): resolve readOnly in changes panel | a90e057 |
vicbergquist | test(conditional-fields): add tests for useConditionalProperty hook and formbuilder | c05d673 |
RitaDias | feat(form-builder, field, cypress): add conditional (readOnly and hidden) properties to FieldSets (#2959) | ba3dfc1 |
Marius Lundgård | fix(desk-tool): use Tooltip from @sanity/ui
| 2078e0d |
Marius Lundgård | feat(form-builder): support new modal option with width property (PTE)
| e16fa33 |
Marius Lundgård | test(form-builder): test custom modal size in PTE | 5f1135d |
Marius Lundgård | test(test-studio): test modal width option in PTE | 0201006 |
Rico Kahler | test: update document creation and navigation (#2972) | adc65f7 |
RitaDias | fix(desk-tool): fix width issues when publish & changes buttons were small (#2976) | 9f478af |
Per-Kristian Nordnes | fix(form-builder): fix missing hook dep. issue | 436c3ec |
Per-Kristian Nordnes | test(workshop): fix missing commonjs support for @sanity/structure | d1e1804 |
Bjørge Næss | chore: upgrade Sanity UI | 15b35e6 |
Bjørge Næss | chore(eslint): allow unstable_ prefixes | bd8f645 |
Bjørge Næss | fix(desk-tool): add missing type import | 21df0c8 |
Bjørge Næss | fix(base): show text skeleton only when loading preview | 1269582 |
Bjørge Næss | fix(base): show schema type icon as default media preview | fe3cc55 |
Bjørge Næss | feat(form-builder): add package exports | b990851 |
Bjørge Næss | feat(preview): add building blocks for drafts model aware preview values | 92dd785 |
Bjørge Næss | chore(base): convert draftUtils to ts | 3ea2139 |
Bjørge Næss | refactor(base): add draftId/publishedId helper function + opaque id types | 7aed6cd |
Bjørge Næss | chore(base): remove soon to be obsolete _internalMeta property for ref type previews | a663369 |
Rico Kahler | feat(validation,base): add validation for referencing non-existent documents | 644591c |
Bjørge Næss | feat(structure): support parent ref path | edb196f |
Rico Kahler | feat(base): remove _weak if _strengthenOnPublish | dc67de4 |
Rico Kahler | feat(desk-tool): provide reference input with necessary plumbing for opening referenced docs in next pane | 50f8630 |
Bjørge Næss | feat(desk-tool): add reference changed banner | 630cd0e |
Bjørge Næss | fix(desk-tool): serialize path before navigating | 88ea9a5 |
Bjørge Næss | refactor(form-builder): implement new reference input | 9bc4622 |
Mikolaj Dobrucki | fix(form-builder): fix border on reference input | 451acd7 |
Mikolaj Dobrucki | fix(form-builder): add space between buttons in reference input | 7a0ef2a |
Bjørge Næss | chore(test-studio): add a liveEdit'ed document to references test | 129e569 |
Rico Kahler | fix(desk-tool): use getDefaultDocumentNode to enable views in nested references | 13a19b6 |
Rico Kahler | fix(desk-tool): fix styles of ReferenceChangedBanner | 1393c68 |
Rico Kahler | fix(form-builder): fix false warning in annotation | e6d2a58 |
Rico Kahler | fix(desk-tool): hide reference changed banner if viewing history | e8cd68f |
Bjørge Næss | chore(test-studio): add an image to species type | e7f6ff5 |
Bjørge Næss | chore(test-studio): add an example of an array of objects + references | b85da18 |
Bjørge Næss | feat(form-builder) support inline editing of reference items | 320ba36 |
Bjørge Næss | feat: store weak flag on _strengthenOnPublish | bf76a99 |
Bjørge Næss | test(form-builder): Fix failing tests | 6b7bbdc |
Bjørge Næss | fix(form-builder): use border instead of shadow around array items | 8bab404 |
Mikolaj Dobrucki | fix(form-builder): make status icons more muted | 7cd672a |
Bjørge Næss | feat: pass initial value templates as create menu items to reference input | 61b7c85 |
Bjørge Næss | fix(base): improve InsufficientPermissionsMessage wording when no roles passed | 52fc0ab |
Bjørge Næss | chore(test-studio): add referenceTest as editable type for the restricted role | f92ca39 |
Bjørge Næss | refactor(form-builder): extract CreateButton + display permission denied tooltip | 310939f |
Bjørge Næss | feat: pass template + template params when navigating from a reference | 7e4843a |
Bjørge Næss | feat(form-builder): support disableNew option | 1e8a4d8 |
Bjørge Næss | chore(desk-tool): remove disabling of camelcase eslint rules | 4055f44 |
Bjørge Næss | refactor(form-builder): create a shared reference autocomplete | 75de8db |
Bjørge Næss | feat(form-builder): make reference input responsive | 9110be0 |
Bjørge Næss | fix(form-builder): close "edit mode" on click outside | 26a9eb9 |
Bjørge Næss | fix(form-builder) render reference input popover in a portal with container as referenceElement | 9487f30 |
Bjørge Næss | fix(form-builder): make sure to forward given ref to popover | 422b94e |
Bjørge Næss | refactor(form-builder): clean up typings | 817fa57 |
hermanwikner | feat(base): add TextWithTone component
| 6bdfd53 |
hermanwikner | test(base): add TextWithToneStory to workshop
| 75b20e2 |
hermanwikner | feat(desk-tool): update DraftStatus with TextWithTone and Tooltip
| 6d42dd6 |
hermanwikner | feat(desk-tool): update PublishedStatus with TextWithTone and Tooltip
| 2465159 |
hermanwikner | feat(desk-tool): update PaneItem so that TextWithTone inherits correct color
| 3b19df6 |
hermanwikner | refactor(form-builder): remove __workaround_selected in PreviewReferenceValue since it is not needed anymore
| fc43952 |
hermanwikner | feat(form-builder): update ReferenceInput so that TextWithTone inherits correct color
| c3c5d0a |
hermanwikner | refactor(form-builder): use updated TextWithTone component in ReferencePreview
| ab26ead |
hermanwikner | refactor(form-builder): remove old TextWithTone component
| 92c7cb4 |
hermanwikner | feat(desk-tool): update pane item getStatusIndicator helper
| 24e18d4 |
hermanwikner | feat(form-builder): update ArrayItemReferenceInput so that TextWithTone inherits correct color
| d632261 |
Bjørge Næss | refactor(form-builder): extract a shared PreviewCard component | ea1496f |
Bjørge Næss | feat(form-builder): add ability to remove _strengthenOnPublish in liveEdited documents | 3c52e07 |
Bjørge Næss | fix(form-builder): open references in grid arrays in a dialog | 3b4dfe2 |
Rico Kahler | fix(desk-tool): fix flashing reference changed banner; update copy (#2968) | 684c495 |
Bjørge Næss | fix(default-layout): wrap the search term in “no results”-message in smart quotes | dec3112 |
Bjørge Næss | fix(form-builder): display a 'no results' message in reference autocomplete | eaac8e7 |
hermanwikner | feat(form-builder): update array ListItem design
| 489ea02 |
hermanwikner | feat(form-builder): add data-ui property and update props typing in array DragHandle
| be23c4e |
hermanwikner | feat(form-builder): update ArrayOfPrimitivesInput / ItemRow design
| 48f17f1 |
hermanwikner | feat(form-builder): update array ConfirmDeleteButton design
| 7ab0e72 |
hermanwikner | refactor(form-builder): update ArrayOfPrimitivesInput design
| cca2cfa |
hermanwikner | feat(form-builder): update ItemWithMissingType design
| e1b752a |
hermanwikner | feat(form-builder): update CellItem design
| e2ca0a1 |
hermanwikner | feat(form-builder): add missing useMemo dependency in ArrayOfObjectsInput / ArrayItem
| 137c4c5 |
hermanwikner | feat(form-builder): update ArrayOfObjectsInput / ArrayInput design
| 5454b0d |
hermanwikner | feat(form-builder): add withRadius and withBorder props to Preview
| 48ea0b3 |
hermanwikner | feat(base): add withRadius and withBorder props to MediaPreview
| 3310626 |
hermanwikner | feat(base): add portal prop to FormFieldValidationStatus
| 9803a96 |
Bjørge Næss | chore(test-studio): add a portable text field to reference test | 4e1f940 |
Rico Kahler | fix(validation): skip validation error for missing _ref | e31d0c2 |
Rico Kahler | fix: PR feedback | f089fca |
Bjørge Næss | fix(form-builder): switch to useMemoObservable for fetching reference metadata | efef87e |
Bjørge Næss | fix(form-builder): display error + retry button if fetching reference metadata fails | b0d2af0 |
Bjørge Næss | fix(base): remove duplicate hits from global search | 8b89b49 |
Bjørge Næss | feat(form-builder): limit search results to 50 | 762098e |
Bjørge Næss | fix(form-builder): fix bug causing scrolling in reference autocomplete close the popover | dc93363 |
Per-Kristian Nordnes | fix(base): fix type exports/imports | 7a58705 |
Espen Hovlandsdal | fix(eventsource): check for window before using it (#2982) | 2f08939 |
Bjørge Næss | refactor(form-builder): make reference input responsive based on available width | 2d097f7 |
Espen Hovlandsdal | fix(core): explicitly exit on successful graphql deploy (#2987) | ea9cb64 |
RitaDias | test(cypress, default-layout): add smoke test for initial value templates (#2983) | cc44c96 |
Bjørge Næss | chore(test-studio): add some more inline and annotation reference examples | 4fcb654 |
Bjørge Næss | fix(form-builder): don't clear previous search results when re-opening the autocomplete | b40e38a |
Bjørge Næss | chore: rimraf root node_modules when running clean script | 45b1720 |
hermanwikner | feat(validation): update convertToValidationMarker to support info level
| 0182a4e |
hermanwikner | feat(validation): update Rule to support info level
| d3e6236 |
hermanwikner | chore(validation): add info level to Rule type
| d044fa8 |
hermanwikner | chore(markers): add info level to ValidationMarker type
| cb70506 |
hermanwikner | feat(desk-tool): check if info validation markers exists in ValidationMenu
| 389a186 |
hermanwikner | chore(types): add isValidationInfoMarker function
| 6a9cf41 |
hermanwikner | feat(base): add info validation support in ValidationList
| bd89a09 |
hermanwikner | feat(base): add info validation design ListItem
| 38d8085 |
hermanwikner | chore(base): add FormFieldValidationInfo type
| 409a86c |
hermanwikner | feat(base): return marker level as type in markersToValidationList
| ebc7db5 |
hermanwikner | feat(base): add info validation support in FormFieldValidationStatus
| ee7d02d |
hermanwikner | feat(form-builder): add info validation support in BlockObject
| a7c38dc |
hermanwikner | feat(form-builder): add info validation support in Markers
| cafeb55 |
hermanwikner | test: add info validation in test-studio schema | df403ea |
Rico Kahler | test(validation): add info messages test | 35b5b59 |
Bjørge Næss | fix(form-builder): use simpler ref bookeeping for better interplay between mutable and callback refs | f4b307b |
Espen Hovlandsdal | chore(client): upgrade get-it to latest version | 42134a0 |