npm @sanity/vision 3.0.0-dev-preview.13
v3.0.0-dev-preview.13

latest releases: 3.64.2-react-compiler.0, 3.64.1, 3.64.0...
2 years ago

✨ Highlights

Vision v3: Query GROQ from the Studio

The @sanity/vision plugin now supports Sanity Studio version 3! Use the dev-preview tag when installing it:

npm install @sanity/vision@dev-preview

To enable it, import the vision plugin and add it to the plugins array in your sanity.config.ts/sanity.config.js file:

import {visionTool} from '@sanity/vision'

export default createConfig([
  {
    // ... other configuration ...
    plugins: [
      deskTool(),
      visionTool({
        defaultApiVersion: '2022-08-15' // optional
        defaultDataset: 'production'    // optional
      }),
      // ... other plugins ...
    ],
  },
])

Learn how to only load the plugin in development mode (that is, not enabling it when deployed to production) in Vision's documentation.

Vision v3 also supports dark mode and Studio themes, as well as letting you cancel in-progress queries.

Other features

  • The development server and build tooling now use Vite 3
  • If the Studio does not have the correct CORS origin setup, an error dialog will now be displayed to indicate this
  • Improve configuration validation of workspaces
  • Allow omitting the name and basePath properties if only a single workspace is defined
  • Improved appearance of the Studio error boundary
  • Improved performance of the Portable Text Editor
  • Implemented fallback message for browsers where JavaScript is disabled
  • sanity build/sanity deploy up to 5x faster
  • Presence is now supported for users using cookieless authentication
  • When a user does not have access to the Studio but is authenticated, the login provider used is now displayed

🐛 Notable bugfixes

  • Fixes an issue where readOnly would not be respected in certain cases
  • Removes a few peer dependency warnings
  • Fixes an issue where installing dependencies using yarn when creating new projects might fail if yarn 3 was used
  • Fixes display of arrays with layout: 'grid'
  • Fixes the development server not allowing the use of _document.js with JSX
  • Fixes incorrectly typed props for user pane view components
  • Improves the accessibility of image actions menu
  • Fixes an issue where opening the image actions menu on image inputs inside of portals would not work
  • Fixes an issue where certain edit dialogs would say Edit undefined instead of Edit file (or similar)
  • Fixes a potential crash if the file and image fields had incorrect values. Now provides an option to reset the value
  • Fixes an issue where a large amount of references in a document might crash when attempting to validate the document
  • Fixes an issue where cookieless auth users might see an error about being unable to align history
  • Fixes an issue where the upgrade dialog would not use the correct dark/light mode
  • Fixes an issue where inline types for arrays could be given the same name as globally defined types
  • Fixes an issue where icons for field groups would not be displayed

📓 Full changelog

Author Message Commit
Espen Hovlandsdal chore(test-studio): add array of references to arrays test f783d81
Espen Hovlandsdal chore: add missing esbuild dependency for sanity module 3078f76
Espen Hovlandsdal chore: normalize esbuild version throughout the monorepo f049107
Espen Hovlandsdal fix(portable-text-editor): suppress esbuild jsx transformation warning 7bbf891
Espen Hovlandsdal chore: upgrade vite to v3 3e75e3e
Espen Hovlandsdal chore: upgrade @sanity/client to v3.3.3 a4c43bc
Espen Hovlandsdal chore(test-studio): add dataset to cli config 93d8193
Espen Hovlandsdal chore: bring back vercel config 274c95b
Espen Hovlandsdal chore: upgrade jsdom to 20.0.0 06b9cbc
Espen Hovlandsdal fix(cli): drop --check-files flag for yarn 3 compatibility a577169
Herman Wikner fix(form): fix broken array grid layout 9c55484
Espen Hovlandsdal fix(server): use tsx loader even for .js extensions b99418c
Espen Hovlandsdal fix(server): only swallow module not found errors when importing document cc2b3c8
Espen Hovlandsdal fix(desk): correct prop typings for pane view components b0ccfc3
Espen Hovlandsdal feat!(datastores): remove deprecated document APIs from v1 c6cabbf
Espen Hovlandsdal fix(cli): add missing dependency 79da537
Espen Hovlandsdal fix(server): use jsx loader for .js document files, default loader setup for others 99f4dc4
Espen Hovlandsdal feat(server): warn when document component did not export expected type a3f6fde
Herman Wikner feat(datastores): add cors origin check when fetching current user in createAuthStore 75129af
Herman Wikner feat(studio): add CorsOriginErrorScreen e1b976d
Herman Wikner feat(studio): add CorsOriginErrorScreen to StudioErrorBoundary 2b950e1
Herman Wikner feat(datastores): add promise to check for cors origin errors 6489a32
Per-Kristian Nordnes fix(forms): fix bug with openField/closeField 3b4d913
Herman Wikner fix(form): a11y issues on image actions menu c924653
Per-Kristian Nordnes fix(forms): fix Image Input menu button now activating inside portals ddc8dfb
Espen Hovlandsdal fix(test-studio): use lowercase workspace names 0cf4434
Espen Hovlandsdal reactor(config): skip name from config resolution error if empty 951dbc6
Espen Hovlandsdal feat(workspaces): add more validation of basePath and names 82df86a
Espen Hovlandsdal feat(config): define SingleWorkspace type, allow omitting basePath, name e9da1a2
Espen Hovlandsdal feat(config): run workspace validation in prepareConfig step 8155b39
Espen Hovlandsdal refactor(errors): make studio error boundary UI mirror schema error 81bb951
Espen Hovlandsdal feat(workspaces): add "navigate to default workspace" on not found screen 5c1790f
Espen Hovlandsdal test(workspaces): update outdated test snapshot 43b4bd8
Espen Hovlandsdal test(datastores): fix broken document operation tests c27efd1
Espen Hovlandsdal chore(test-studio): add vision to test-studio 35bfdd9
Espen Hovlandsdal feat(vision): upgrade to v3, modernize, upgrade dependencies 32e4686
Espen Hovlandsdal feat(vision): allow specifying a default dataset 0f2cea4
Espen Hovlandsdal feat(vision): push toast indicating URL has been copied 30243f1
Espen Hovlandsdal feat(vision): push toast indicating that listener has been set up aca200f
Espen Hovlandsdal feat(vision): push toast indicating that pasted URL was parsed 08a4c1f
Espen Hovlandsdal feat(vision): show spinner while waiting for first listener event d7be81d
Espen Hovlandsdal feat(vision): allow cancelling query a855017
Espen Hovlandsdal chore(desk): upgrade react-json-inspector 11f20c9
Herman Wikner fix(form): update readOnly properties in formState 16fcdda
Herman Wikner dev(test-studio): update conditionalFields schema 6c7c288
Herman Wikner fix(form): pass readOnly to input in OptionsArrayInput fb78bb7
Bjørge Næss chore(form): simplify and optimize conditional callback resolution a little bit 6741dab
Bjørge Næss chore(form): rename function callConditionalProperty => resolveConditionalProperty a7b66d7
Per-Kristian Nordnes refactor(form): use global keyDown hook for Image action menu 3cdbdbf
Per-Kristian Nordnes chore(portable-text-editor): upgrade to latest slate and slate-react 51add24
Per-Kristian Nordnes refactor(portable-text-editor): Performance refactor bebe934
Per-Kristian Nordnes test(portable-text-editor): update and add tests for latest refactor 3cc1319
Per-Kristian Nordnes test(inputs): add visual re-render debug to PTE Text blocks 8bda33a
Per-Kristian Nordnes refactor(inputs): update new patch observable type for PTE e7f36a5
Per-Kristian Nordnes refactor(inputs): improve fullscreen and activation re-rendering d6d8aa7
Per-Kristian Nordnes test(dev): update dev studio schemas 4079041
Per-Kristian Nordnes fix(inputs): fix issue with scrolling to field and focus PTE on activation 6feb4f2
Per-Kristian Nordnes fix(portable-text-editor): don't use Object as const name a6b26ca
Per-Kristian Nordnes refactor(portable-text-edior): keep consistency in pattern 80e2482
Per-Kristian Nordnes fix(portable-text-editor): add default value when there are no previous value. 10167b2
Per-Kristian Nordnes test(portable-text-editor): update test server start script for vite 3 6a485e6
Per-Kristian Nordnes test(portable-text-editor): tsconfig for test suite 502e23b
Per-Kristian Nordnes fix(form): fix PTE focus handling issue 324b3fb
Per-Kristian Nordnes chore: update yarn.lock c66d937
Herman Wikner feat(form): add helper function to get correct field level in inputResolver 86f8b48
Espen Hovlandsdal chore: remove unnecessary typings files c18cf5d
Espen Hovlandsdal feat: add javascript disabled fallback 2ff43ca
Espen Hovlandsdal ci: optimize vercel builds d9153bd
Espen Hovlandsdal fix(server): optimize sanity build/sanity deploy 2e00ef3
Espen Hovlandsdal fix(form): use most specific title for schema type in modal header 06f862a
Espen Hovlandsdal fix(schema): add titles for built-in types 1bb59ab
Espen Hovlandsdal chore: upgrade asset-utils to v1.2.5 5e096f1
Espen Hovlandsdal fix(form): check for invalid image value, provide reset option b7b308f
Espen Hovlandsdal fix(form): check for invalid file value, provide reset option d21f917
Espen Hovlandsdal fix(server): use stricter entry file checks 4dac479
Espen Hovlandsdal fix(preview): chunk document availability ids on id length d64aefd
Espen Hovlandsdal fix(desk): resolve schema type from template if possible 93081f5
Espen Hovlandsdal feat(datastores): allow listenQuery to have separate listen and fetch queries 9c37c86
Espen Hovlandsdal feat(datastores): allow listenQuery to specify relevant transitions 4e40150
Espen Hovlandsdal feat(datastores): allow listenQuery to specify custom throttle time c1855f4
Espen Hovlandsdal fix(desk): only refetch references on appear/disappear 221628b
Espen Hovlandsdal fix(desk): use longer throttle time when refetching references 4166119
Espen Hovlandsdal refactor(desk): check for document existence before checking ref count 6919ea5
Espen Hovlandsdal refactor(desk): add request tag to external refs check e08ecd5
Dan Michael O. Heggø fix(types): add params to MutationSelection type 4eb7b0c
Espen Hovlandsdal chore(util): upgrade moment to latest version 81939b7
Espen Hovlandsdal feat(config): support presence for cookieless auth users ce8d27a
Espen Hovlandsdal feat: show current auth provider on not authenticated screen a1895fd
Espen Hovlandsdal fix(datastores): use auth token for history request if available cf1ce0d
Espen Hovlandsdal chore(test-studio): add playlist/playlistTrack schema types fd11603
Bjørge Næss fix(navbar): use root scheme for changelog dialog b6b8d5e
Bjørge Næss feat: add a "configuration issues" button + dialog to the global nav bar in development ab1cdef
Herman Wikner feat(studio): move note in ConfigIssuesButton to the dialog header 8338152
Marius Lundgård build: add groq package to root clean script 8b80b6d
Bjørge Næss fix(form): pass layout option from array input 5ee4151
Bjørge Næss feat(schema): add validation to disallow array members with same name as bulitin types ce862bd
Espen Hovlandsdal chore(schema): temporarily work around readonly type issue 8d1f0ee
Herman Wikner fix(form): missing icon in field group 6bafbdb
Espen Hovlandsdal docs(vision): add note on dev-only usage 3f990af
Espen Hovlandsdal docs(vision): update screenshot 6c62985

Don't miss a new vision release

NewReleases is sending notifications on new releases.