npm @sanity/vision 3.16.0
v3.16.0

latest releases: 3.57.4, 3.57.4-memoized-form-state.18, 3.57.4-upgrade-vite-v5.9...
13 months ago

Installation and upgrading

Fresh install

To install and initiate a new Sanity Studio without installing the Sanity CLI globally, run the folling command in the terminal:

npm create sanity@latest

Upgrade

To upgrade an existing instance to Sanity Studio v3, run the following folling commands in the terminal:

# Go to the root folder of the installed Studio instance
cd path-to/sanity-studio/root-folder

# Upgrade Studio to v3
npm install sanity@latest

✨ Highlights

In a nutshell:

  • Enhanced Portable Text editing experience.
  • Faster syncing.
  • Full support for Portable Text on Android devices.
  • Offline detection

Improved Unicode support

Sanity Studio uses the diff-match-patch algorithm to match and patch document changes. In previous versions of the Sanity Studio, the underlying library wouldn't work correctly when parsing some Unicode characters. We addressed those issues in this release.
If you experienced issues when using characters such as emojis, Kanji, or other non-Latin characters, this release fixes these issues.

Enhanced Portable Text editing

Besides improved Unicode support, the Portable Text Input and the underlying text editor feature a number of improvements to provide a smoother editing experience.

Faster synchronization

Previously, prolonged fast typing in the editor would trigger debouncing: the Portable Text Input would temporarily suspend committing edits, until you decreased your typing speed below a specified threshold.
This behavior could produce bigger discrepancies between your local value and the corresponding actual value stored in the server side.
Now your changes are committed in a throttled way: the editor commits the changes as you type, without compromising performance.

Improved undo and redo

Undo and redo features have been improved considerably, especially when working with several editors on the same document.

Better Android support

The Portable Text Input is now fully supported on Android. Previously, typing in the editor using an Android on-screen keyboard would cause some issues.

Offline detection

The Portable Text Editor automatically enters read-only mode if it detects that the network is offline.
This behavior helps keep your local document in sync with the corresponding copy on the server when there is no online access, and it prevents losing changes as a consequence of not committing them.

Other features

  • The sanity module is now marked as free of side effects, which can produce smaller bundle sizes (thanks @mckelveygreg! 🙏)
  • Improved UX when deleting a document.

🐛 Notable bugfixes

  • Fixed a bug where changing text styles in the Portable Text Editor would cause the editor to lose focus.
  • Fixed a problem that would occur when repeatedly applying and removing text decorators while typing in the Portable Text Input.
  • Fixed the odd placement of the "Empty" placeholder in the Portable Text Editor on WebKit browsers.
  • Fixed a media visibility issue in Safari occurring in list previews with custom SVG elements.
  • Fixed the alignment of action items in pane headers on mobile devices.
  • Fixed a padding inconsistency in reference fields.
  • Fixed a visibility issue affecting tooltips in the navigation bar, and causing them to be displayed behind open menus.
  • Fixed an issue affecting cross-dataset reference fields displayed as nested fields, inconsistent with regular reference fields.
  • Fixed a bug that caused specifying apiVersion on documentList() and documentTypeList() to not work in the desk structure.
  • Fixed the initial flashes of validation errors for valid content on document load.

📓 Full changelog

Author Message Commit
renovate[bot] fix(deps): update dependency esbuild to ^0.19.0 (#4810) 97b3363
Greg McKelvey chore(sanity): ⚡ add sideEffects: false to package.json for smaller bundles (#4822) 425be21
Fred Carlsen fix(desk): close document panes when document is deleted (#4563) 5b3a415
renovate[bot] chore(deps): update dependency @sanity/eslint-config-studio to ^2.0.4 (#4784) 5243551
Espen Hovlandsdal test(e2e): add test for kanji textarea input 34e4ebb
Espen Hovlandsdal refactor: switch diff-match-patch library 279bbd6
Espen Hovlandsdal test(e2e): simplify kanji edit test (use fill() over type()) 2438b41
Espen Hovlandsdal refactor(pte): hoist patchToOperations functions to root e26ba82
Espen Hovlandsdal refactor(pte): drop unused arguments for patchToOperations 2654b3b
Espen Hovlandsdal refactor(pte): simplify/optimize diffMatchPatch application 25230b8
Espen Hovlandsdal refactor(pte): skip debug serialization when not enabled c64b0ce
Espen Hovlandsdal refactor(pte): use DMP to apply patches, then apply operations 95e308a
Espen Hovlandsdal chore: fix confusing description in test-studio f8b4c45
Espen Hovlandsdal fix: allow exceeding indices when applying DMP patches 80f1bdb
Per-Kristian Nordnes fix(portable-text-editor): remove invalid return value 99355d8
Per-Kristian Nordnes refactor(portable-text-editor): use throttle instead of debounce bc62abc
Per-Kristian Nordnes refactor(portable-text-editor): refactor undo/redo plugin 1bc96aa
Per-Kristian Nordnes feature(core/form/inputs): set PortableTextInput in readOnly mode when offline e0dd766
Per-Kristian Nordnes fix(core/form/inputs): keep selection intact when toggling block styles (PT-input) 79959c9
Per-Kristian Nordnes refactor(portable-text-editor): refactor synchronization + upgrade slate to latest 17f3393
Per-Kristian Nordnes chore(portable-text-editor): upgrade slate and slate-react b6ea88d
Per-Kristian Nordnes test(portable-text-editor): add and refactor tests 66cba84
Per-Kristian Nordnes fix(core/form/inouts): PT-input - remove default outline style of the PTE 2bafd32
Per-Kristian Nordnes chore: update yarn.lock 7a3dbc8
Per-Kristian Nordnes chore(sanity): remove unused dep. diff-match-patch 1f6cb82
Per-Kristian Nordnes chore(portable-text-editor): upgrade slate packages 8cb1698
Per-Kristian Nordnes chore(portable-text-editor): remove unused dep. diff-match-patch b8c66bd
Espen Hovlandsdal test(portable-text-editor): add failing undo/redo tests 17add93
Per-Kristian Nordnes test(portable-text-editor): add another test for undo/redo 0833de9
Per-Kristian Nordnes fix(portable-text-editor): fix bug in offset calculation for undo/redo remove text aeff824
Per-Kristian Nordnes refactor(portable-text-editor): keep network status / readOnly vars seperate cd87d36
Espen Hovlandsdal chore(deps): upgrade to prettier v3 bc74ba1
Espen Hovlandsdal chore: format with prettier v3 a5cc3e0
Espen Hovlandsdal chore: remove unintentionally added file b3a4758
Cody Olsen chore(ci): add turborepo to speed up yarn build:cli (#4812) 0ae0eac
Jon Eide Johnsen docs: add ctas to readme header (#4836) 0736f75
ecospark[bot] chore(deps): dedupe yarn.lock (#4835) 72e0820
Bjørge Næss chore: convert various scripts to typescript (#4832) e60f891
Herman Wikner feat(core): field actions improvements (#4824) e47e251
ecospark[bot] chore(prettier): fix unformatted files (#4839) 53b4fe8
Cody Olsen chore(CI): remove double PRs on prettier fixes (#4841) 08e73ad
Fred Carlsen test(playwright): initial component testing with playwright-ct (#4779) f44593e
Herman Wikner fix(core): svg preview issue in safari (#4838) 6a041b3
Nina Andal Aarvik fix(desk): center align pane header action icons (#4854) d36c174
Nina Andal Aarvik fix(core): remove padding on ReferenceField (#4842) 0a2438c
Nina Andal Aarvik fix(core): close navbar tooltips when menubutton is open (#4826) c5bfa12
Nina Andal Aarvik fix(core): add check for cdr schematype and use PrimitiveField (#4859) 3ad324b
Per-Kristian Nordnes test(playwright): fix hotkey activation + helper method (#4856) 093fec3
ecospark[bot] chore(prettier): fix unformatted files 🤖 ✨ (#4846) 8e2e5c9
renovate[bot] fix(deps): update dependency @sanity/client to ^6.4.9 (#4851) 7b3e1f2
renovate[bot] chore(lockfile): update dependency @sanity/assist to v1.1.1 (#4850) 246c062
Per-Kristian Nordnes fix(portable-text-editor): fix empty placeholder placement for webkit 757b7b5
Per-Kristian Nordnes test(portable-text-editor): update snapshot 1fb093e
Per-Kristian Nordnes test(playwright-ct): break up pt-input tests to separate stories 2966b63
Per-Kristian Nordnes test(playwright-ct): simplify decorators tests 71bc3f1
Per-Kristian Nordnes test(form/inputs): add test id for pt-input placeholder de77988
Per-Kristian Nordnes test(playwright-ct): add test for placeholder (pt-input) dc25e36
Per-Kristian Nordnes test(playwright-ct): wrap all pt-input tests in the same description e9194fc
renovate[bot] fix(deps): update dependency get-it to ^8.4.3 (#4852) 1514a69
renovate[bot] chore(deps): update dependency @vercel/frameworks to v1.6.0 (#4853) 458ae3e
Bjørge Næss fix(desk): use configured api version when fetching document lists (#4749) 9d90fb0
Bjørge Næss fix(core): wait for availability status to arrive before passing on document existence status (#4860) 201cfcc
renovate[bot] chore(deps): update dependency @vercel/fs-detectors to v4.1.3 (#4848) 30ab832
Per-Kristian Nordnes fix(portable-text-editor): fix issue with fast toggling of decorators 25867d6
Per-Kristian Nordnes test(portable-text-editor): support hotkey value cf936f0
Per-Kristian Nordnes test(portable-text-editor): add test for sequencing hotkey toggles 43b0590

Don't miss a new vision release

NewReleases is sending notifications on new releases.