sanity

Sanity Studio – Rapidly configure content workspaces powered by structured content

MIT License

Downloads
9.5M
Stars
5.2K
Committers
128

Bot releases are hidden (Show)

sanity -

Published by bjoerge over 1 year ago

⚠️ THIS IS A MAINTENANCE RELEASE OF A PREVIOUS MAJOR VERSION OF SANITY

We recommend updating to Sanity Studio v3 which provides exceptional flexibility and an unparalleled developer experience. The core packages for Sanity Studio v2 will only receive critical bug fixes until Dec 7th, 2023

Please head over to the documentation for Sanity Studio v3 to learn more.

You can find migration guides from Studio v2 here.

Installation and upgrading

Upgrade the v2 version of the Command Line Interface (CLI) with:

npm install --global @sanity/cli@v2

Upgrade Sanity Studio with:

sanity upgrade

📓 Full changelog

Author Message Commit
Bjørge Næss chore: modify script for setting latest tag to print commands instead of exec'ing f0eff1356
Binoy Patel feat(cli): use local callback server for auth instead of listener (#4258) 0b7116424
sanity -

Published by bjoerge over 1 year ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

✨ Highlights

  • Adds getClient() method to reference filter context

🐛 Notable bugfixes

  • Invalid references can now be removed from array inputs
  • Validation error will now appear when missing a _ref in array of items
  • Removes convert to reference button when converting array of references to singular reference
  • patch.execute() now reflects that the second argument is optional

📓 Full changelog

Author Message Commit
Robin Pyon chore(test-studio): add debug input containing many fields 46f41bdde
Binoy Patel fix(core): fix deleting invalid reference items in array (#4256) a81119e2b
Espen Hovlandsdal feat(core): provide getClient() method to reference filter context (#4267) 28f2f6a31
Espen Hovlandsdal docs: add docblock for useClient hook (#4259) a432c4069
Binoy Patel fix(validation): show validation error for missing _ref (#4264) 56347466f
Bjørge Næss fix(core): fix typings to reflect that the second argument to patch.execute is optional (#4274) 401192ca9
Binoy Patel fix(core): remove button to convert to reference for arrays (#4275) 5d3de4980
sanity - v3.6.0

Published by RitaDias over 1 year ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

🐛 Notable bugfixes

  • General search performance improvements on larger studios (containing thousands of fields)
  • Desk Structure is now able to auto-generate IDs from non-ascii source values (for instance cyrillic characters)
  • Allows fractional section of a number to have leading zeros (thanks @pauloborges!)
  • Fixes studio authentication when using a custom API hostname
  • Makes schemas in Shopify online storefront template compatible with GraphQL deployments
  • Fixes an issue of document type icons not showing up in array fields
  • Fixes a bug where opening a reference field dropdown would not trigger a defined filtering function
  • Restores functionality of the "Open in new tab" function for arrays of references
  • Fixes issue where clicking a document reference while still loading would result in an invalid link and cause the studio to crash
  • Fixes several issues that might occur when dealing with duplicate document IDs across workspaces
  • Fixes an issue that might cause the studio to crash when trying to view history in a dataset copied with the --skip-history flag

📓 Full changelog

Author Message Commit
Robin Pyon fix(core): search performance improvements (#4216) 824b5fd03
Espen Hovlandsdal feat(cli): use local callback server for auth instead of listener (#4222) 8ba697cae
Binoy fix(desk): cyrillic characters in deskStructure crashing sanity (#4224) 98f716bfc
Bjørge Næss fix(ci): set a 60 minute timeout on the test workflow b9d666fa3
Herman Wikner fix(core): focus issue in nav drawer (#4232) 2e6e59a17
Bjørge Næss chore(build): remove cypress (#4235) 83da7d1e8
Bjørge Næss fix(deps): upgrade playwright to latest 3926ba3bb
Paulo Borges fix(form): allow fractional part of a number to have leading zeros (#4206) 19302131c
Espen Hovlandsdal fix(auth): use configured api hostname for auth checks (#4234) 5e7faeb52
Espen Hovlandsdal feat(cli): use strict mode schemas for shopify online template (#4229) 5edcce8ea
Bjørge Næss chore(ci): cleanup workflow files (#4236) af2b57e76
Binoy fix(core): icons not showing in array fields (#4242) 1465a1afb
Bjørge Næss ci: introduce performance test runner and studio c5859d4ca
Bjørge Næss ci: add webhook receiver for branch/tags and deployment events a13e4b122
Bjørge Næss test(perf): add test for deeply nested field 303e85df4
Bjørge Næss fix(ci): enable perf test workflow for "next"-branch 921a0c669
Binoy fix(core): ensure filter function on reference field is always fired when menu is opened (#4241) e32302b6e
Espen Hovlandsdal fix(core): restore "open in new tab" function for reference arrays (#4243) 115dd2347
Espen Hovlandsdal fix(desk): attempt to resolve missing document type automatically (#4244) a038ecff7
Binoy fix(core): changing workspace with same document id causes error (#4223) 2db15e99f
Binoy fix(core): fix crash when history does not include valid user information (#4248) 3825976ef
sanity - v2.35.7

Published by RitaDias over 1 year ago

⚠️ THIS IS A MAINTENANCE RELEASE OF A PREVIOUS MAJOR VERSION OF SANITY

We recommend updating to Sanity Studio v3 which provides exceptional flexibility and an unparalleled developer experience. The core packages for Sanity Studio v2 will only receive critical bug fixes until Dec 7th, 2023

Please head over to the documentation for Sanity Studio v3 to learn more.

You can find migration guides from Studio v2 here.

Installation and upgrading

Upgrade the v2 version of the Command Line Interface (CLI) with:

npm install --global @sanity/cli@v2

Upgrade Sanity Studio with:

sanity upgrade

🐛 Notable bugfixes

  • Fixes issue where clicking a document reference while still loading would result in an invalid link and cause the studio to crash
  • Fixes an issue that might cause the studio to crash when trying to view history in a dataset copied with the --skip-history flag

📓 Full changelog

Author Message Commit
Espen Hovlandsdal build: patch webpack to use md5 for cli hashes 12044f1eb
Espen Hovlandsdal chore: remove outdated ts-expect-error comment 7aa7f4c7b
Espen Hovlandsdal chore: upgrade nock to work around node 18 test issue df5bdc55f
Espen Hovlandsdal build: add empty perf/studio folder so vercel build can be skipped b1612f191
Espen Hovlandsdal fix(desk): attempt to resolve missing document type automatically 0f8fa9812
Espen Hovlandsdal build: add placeholder perf studio html f9618c3fc
Binoy fix(core): fix crash when history does not include valid user information (#4250) 9c3825f23
sanity - v3.5.1

Published by hermanwikner over 1 year ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

🐛 Notable bugfixes

  • Fixes an issue where the accept option for file and image schema types would not be respected by the image and file picker, only new uploads
  • Fixes dialog closing behavior in the studio to be more consistent
  • Improves readability of date and datetime diffs in the review changes panel
  • Fixes an issue where the first focusable element in a document was not focused when opening the document
  • Fixes an issue where form dialogs were not closing as esxpected when navigating to a new document
  • Fixes an issue where the selected sort option in the document list was not highlighted in the UI
  • Fixes an issue where the correct default fieldgroup was not set in an array of objects
  • Fixes an issue where opening a browser from the CLI tool on Windows might cause the login process to crash
  • Adds missing options in mobile sidebar menu
  • Fixes a regression from v3.4.0 in the Portable Text Editor that could corrupt text when typing fast and toggling text decorators (I.e. bold or italic) while typing
  • Fixes a regression from v3.4.0 in the Portable Text Editor where it sometimes would error when toggling between different versions in the History View

📓 Full changelog

Author Message Commit
RitaDias fix(core): non valid file types for image and file inputs will be greyed out (#4127) 8ad9eb883
Herman Wikner fix(core): focus handling and dialog behavior (#4139) 460bbaf45
Espen Hovlandsdal fix(cli): correct noop return value for renderDocument f2053ee8a
Nina Andal Aarvik fix(core): select default group (If exists) on expand (#4173) 09e6b0887
Herman Wikner fix(core): invalid reference link (#4201) afbe55129
Nina Andal Aarvik fix(desk): focusFirst in document and dialog behavior (#4156) a210ee752
Herman Wikner fix(desk): update tools and schema help links (#4205) 113f46c06
Espen Hovlandsdal fix(cli): add @types/styled-components dependency to new projects (#4202) 52826542b
Herman Wikner fix(core): date and datime review changes ui (#4217) fd870df31
Herman Wikner fix(desk): document list menu items selected state (#4207) 2123f9326
Espen Hovlandsdal fix(cli): patch missing SYSTEMROOT env var on windows (#4221) 2b9beaff9
shur feat(cli): add back get-started template (#4225) fbbbfeb13
Bjørge Næss fix(build): add an empty perf/studio folder so that the vercel build can be skipped fa968bed0
Nina Andal Aarvik fix(core): move theme logic to component and use in both navbars (#4183) e2eb622d3
Per-Kristian Nordnes fix(portable-text-editor): fix state toggle issue in withPreserveKeys 1fafb02b0
Per-Kristian Nordnes fix(portable-text-editor): only preserveKeys when strictly needed 776c1b83c
Per-Kristian Nordnes fix(portable-text-editor): fix some issues with syncing the value 663336e25
Per-Kristian Nordnes test(portable-text-editor): update snapshot d4c7ea079
sanity - v3.5.0

Published by rexxars over 1 year ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

✨ Highlights

Improved .env/environment variable handling

Over the past few releases we have been addressing some inconsistencies in how environment variables can be used. This release greatly improves how "dotenv" (.env) files are handled. To summarize the new behavior of environment variables and dotenv files from this release (v3.5.0) and onward:

  • All environment variables with the SANITY_STUDIO_ prefix is exposed to the bundle, and is available through process.env.SANITY_STUDIO_.... While they are theoretically also available under import.meta.env, it is not recommended to use them this way since it’s behavior specific to Vite, and thus not available under the same location in Node.js and other environments.
  • We now load both .env, .env.local, .env.<mode> and .env.<mode>.local files from the studio root folder. This is consistent with Vite’s behavior.
  • The .env files are loaded in the following order:
    • .env
    • .env.local
    • .env.<mode>
    • .env.<mode>.local
  • By default, sanity build and sanity deploy will use the production mode, while all other commands will default to the development mode.
    • Setting NODE_ENV to production will set the mode to production, but setting it to other values (such as test) will not change the mode.
    • To use a custom mode, you can set the SANITY_ACTIVE_ENV environment variable.
    • Both NODE_ENV and SANITY_ACTIVE_ENV must be set as a regular shell environment variable, not in .env files, since knowing which .env file to load is based on it.
  • Environment variables set in the shell will override variables set in the .env files.
  • The environment variables are loaded into both the browser bundle environment, and the CLI context. In other words, running scripts through sanity exec will have access to the same environment variables as the Studio bundle, and you can use environment variables in your sanity.cli.ts/sanity.config.ts files. Make sure you use process.env and not import.meta.env for cross-environment support.

Note that we encourage you to use environment variables sparingly, and define them in a single location instead of spreading them throughout the code base. This makes it easier to see which environment variables are in use, and allows you to easier transition between different environments should you need to. For instance, one might create a src/environment.ts file which re-exports the environment variables:

export const myCompanyInternalApiUrl = process.env.SANITY_STUDIO_MY_COMPANY_INTERNAL_API_URL
export const someOtherVariable = process.env.SANITY_STUDIO_SOME_OTHER_VARIABLE

Programmatic usage

Should you want to reuse the environment variable handling in other contexts (your own scripts, or using a different bundler etc), you can import and utilize the new getStudioEnvironmentVariables() method from sanity/cli:

import {getStudioEnvironmentVariables} from 'sanity/cli'

console.log(getStudioEnvironmentVariables())
// {SANITY_STUDIO_SOME_VAR: 'yourVariableValue'}

Note that .env files are not loaded by default when using this method. To do so, pass an envFile option:

import {getStudioEnvironmentVariables} from 'sanity/cli'

console.log(
  getStudioEnvironmentVariables({
    envFile: {
      mode: 'production',
      envDir: '/path/to/some-dotenv-root'
    }
  })
)

🐛 Notable bugfixes

  • Fixes an issue where generation 1 GraphQL APIs would have changed pluralization rules for types ending with a number.

📓 Full changelog

Author Message Commit
Espen Hovlandsdal fix(cli): maintain old pluralization behavior on graphql gen1 schemas eeaf26cc4f
Espen Hovlandsdal fix(cli): add .local files to .gitignore for new projects b8229beec1
Espen Hovlandsdal feat(cli): expose getStudioEnvironmentVariables method, add dotenv handling c03ef40ae4
Espen Hovlandsdal test(cli): ensure environment variables are loaded from dotenv files 93db31df82
Espen Hovlandsdal fix(cli): explicitly pass down env from parent to workers 20a4366803
Espen Hovlandsdal feat(cli): ensure process.env.MODE is always defined cc44f04153
Espen Hovlandsdal refactor(cli): optional options argument for getStudioEnvironmentVariables 459eb6f74a
sanity - v3.4.0

Published by robinpyon over 1 year ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

Notable changes

  • The studio has been upgraded to use @sanity/client v5, which boasts full Node.js ESM runtime support, a smaller footprint and much more

🐛 Notable bugfixes

  • Fixed a bug that could lead to duplication of a single block in the Portable Text Editor

📓 Full changelog

Author Message Commit
Espen Hovlandsdal chore: upgrade @sanity/client, get-it to latest versions 4b4dc5c126
Espen Hovlandsdal chore(cli): remove unused scripts 32392a3a25
Espen Hovlandsdal chore(cli): upgrade get-latest-version dependency db6ea7175c
Espen Hovlandsdal chore: drop unnecessary typing 16b955072a
Espen Hovlandsdal test: include api url in client mocks 95f012fe08
Espen Hovlandsdal chore: fix prettier inconsistency 20bc7e4947
Espen Hovlandsdal chore: fix typing issue with newer yargs 2cfb558511
Espen Hovlandsdal test(cli): throw and print stderr on command failure 8a39b3935b
Espen Hovlandsdal test(cli): shorten test ids to keep within 64 characters 8f8116d7b9
Per-Kristian Nordnes fix(types): add forgotten component schema extension (inlineBlock) 57c850c234
Per-Kristian Nordnes ci(github-actions): install playwright browsers 32e1ea9bc6
Per-Kristian Nordnes chore(portable-text-editor): add playwright and remove puppeteer as dev dep. 8843d4c540
Per-Kristian Nordnes test(portable-text-editor): replace puppeteer with playwright in collab. tests 3ddb3266f6
Per-Kristian Nordnes chore: streamline to latest playwright version 55dadcecce
Per-Kristian Nordnes refactor(portable-text-editor): move components and slightly improve them 0380d10a1c
Per-Kristian Nordnes feature(portable-text-editor): add API method insertBreak 53eeb98b4d
Per-Kristian Nordnes refactor(portable-text-editor): move bufferUntil to own utils file d332177375
Per-Kristian Nordnes feature(portable-text-editor): Slate Container component 87b7d24643
Per-Kristian Nordnes feature(portable-text-editor): add Validator component 1206a02e11
Per-Kristian Nordnes feature(portable-text-editor): add Synchronizer component 5eefe8ea5b
Per-Kristian Nordnes feature(portable-text-editor): keyGenerator context 7922a22d25
Per-Kristian Nordnes feature(portable-text-editor): add useSyncValue hook 680d9ebd4e
Per-Kristian Nordnes fix(portable-text-editor): fail proof unset patchToOperation 61823ade2d
Per-Kristian Nordnes fix(portable-text-editor): add condition (no listItem) to equalToEmptyEditor test fn d66f9677f2
Per-Kristian Nordnes chore(portable-text-editor): small comment adjustments + add missing TS return def. 812008ae80
Per-Kristian Nordnes refactor(portable-text-editor): refactor how plugins subscribe and takes options c21d69396e
Per-Kristian Nordnes fix(portable-text-editor): fix a bug where content wasn't unset correctly 9ed28c0cab
Per-Kristian Nordnes refactor(portable-text-editor): refactor PortableTextEditor class component e35f0d49a9
Per-Kristian Nordnes refactor(portable-text-editor): refactor Editable component e07f1665b1
Per-Kristian Nordnes test(portable-text-editor): update tests to work with latest refactorings 3aa3bcc3f1
Per-Kristian Nordnes test(portable-text-editor): fix order of emitting patch/value ec7e44d8d5
Per-Kristian Nordnes refactor(sanity/core/form/inputs): update renamed prop name for PTE in PT-input 6aa63b525c
Per-Kristian Nordnes fix(portable-text-editor): remove export that no longer exist 0840377a13
Per-Kristian Nordnes chore(portable-text-editor): remove unused code 8840d25a2e
Per-Kristian Nordnes refactor(portable-text-editor): code hygiene pass, remove unused param, re-enable debug statements c8942d6656
Per-Kristian Nordnes fix(form/inputs): add missing hook deps and types 0ac5085938
Per-Kristian Nordnes chore: upgrade @sanity/client which was accidentially downgraded a15682e735
Robin Pyon fix: revert client getUrl and getDataUrl usage (#4174) dc6f1cc71b
sanity - v3.3.1

Published by rexxars over 1 year ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

Notable changes

  • Added ability to mark project studio templates as typescript-only

📓 Full changelog

Author Message Commit
Espen Hovlandsdal feat(cli): allow templates to flag themselves as typescript-only 5a8afd30d4
Espen Hovlandsdal feat(cli): add new shopify online storefront template b0a08766e0
sanity -

Published by bjoerge over 1 year ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

✨ Highlights

A custom API hostname can now be configured for the studio through the apiHost configuration parameter. Note that the configured API host must behave the same as Sanity's API. This is mostly useful for enterprise customers with custom API CNAME enabled (get in touch if you are interested in this feature).

🐛 Notable bugfixes

  • Disables sorting of array items when readOnly is set
  • Updates design of the presence menu to make non-clickable users appear greyed out
  • Updates @sanity/schema module with a new named export – the default export is now deprecated and will give a warning when used
  • Fixes behaviour so that the editing pane will now scroll the relevant field into view when validation does not pass
  • Improves readability for tags array inputs in read-only mode
  • Enables fetching unresolved cross-dataset references through GraphQL API

📓 Full changelog

Author Message Commit
Espen Hovlandsdal feat(config): allow specifying apiHost for source (#4142) 57d72f9d67
Espen Hovlandsdal refactor: use named export for schema package (#4144) 25dcc575bd
Espen Hovlandsdal feat(cli): provide (unresolved) cross-dataset references for graphql APIs (#4137) 5de629b9be
Herman Wikner fix(core): improve tags input read only visibility ab61f15409
Herman Wikner dev(core): add tags input workshop story c4a2f474d5
Espen Hovlandsdal docs(block-tools): improve readme examples a39f177373
Herman Wikner fix(core): only notify subscribers if the the current user object has changed b3b26fbcc5
Espen Hovlandsdal test(cli): use higher timeout on v2 builds 2c3b3a1067
Victoria Wagenblast chore: configure playwright (#4143) f1c545865c
Bjørge Næss fix(ci): change test studio build command to 'build:test-studio' 937ef83850
Nina Andal Aarvik fix(desk): field validation - scroll to field (#4149) 3b611f088f
Nina Andal Aarvik fix(core): change design for clickable present users in dropdown (#4154) 81c9d4c7c4
Nina Andal Aarvik fix(core): add readOnly prop to sortable array items (#4161) 0deee1fb2d
sanity -

Published by bjoerge over 1 year ago

⚠️ THIS IS A MAINTENANCE RELEASE OF A PREVIOUS MAJOR VERSION OF SANITY

We recommend updating to Sanity Studio v3 which provides exceptional flexibility and an unparalleled developer experience. The core packages for Sanity Studio v2 will only receive critical bug fixes until Dec 7th, 2023

Please head over to the documentation for Sanity Studio v3 to learn more.

You can find migration guides from Studio v2 here.

Installation and upgrading

Upgrade the v2 version of the Command Line Interface (CLI) with:

npm install --global @sanity/cli@v2

Upgrade Sanity Studio with:

sanity upgrade

📓 Full changelog

Author Message Commit
Espen Hovlandsdal chore: add script for setting npm latest tag on v2 modules 82a1c3dd06
Espen Hovlandsdal chore: upgrade json5 dependency to 2.2.3 6a72b8df37
sanity - v3.2.6

Published by robinpyon over 1 year ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

🐛 Notable bugfixes

  • Fixes an issue that in some cases would prevent validation status from appearing for a document
  • Fixes an issue that ignored the readOnly state for fields inside fieldsets

📓 Full changelog

Author Message Commit
Robin Pyon test(core): use fake timers in dateOperator tests (#4125) 410dd6f8bd
Robin Pyon fix(core): clear reference fields when replacing links + fix open in new tab links (#4105) a8a50316a6
Espen Hovlandsdal chore: update lockfile 5565fa14d5
Bjørge Næss fix(form): make sure fields inside fieldsets actually get their readOnly state (#4129) 64e97151ed
Bjørge Næss fix(deps): upgrade rxjs-exhaustmap-with-trailing to latest (#4134) a370e3ed70
Bjørge Næss fix(tests): make sure cli tests don't crash if no token specified (#4136) 4e5eb6b75f
Herman Wikner refactor(core): re-structure EditPortal 8742ba3201
Herman Wikner fix(core): improve PopoverDialog a6707da045
Herman Wikner fix(core): reset document actions state when changing document 7fc1c29786
sanity - v2.35.5

Published by rexxars over 1 year ago

⚠️ THIS IS A MAINTENANCE RELEASE OF A PREVIOUS MAJOR VERSION OF SANITY

We recommend updating to Sanity Studio v3 which provides exceptional flexibility and an unparalleled developer experience. The core packages for Sanity Studio v2 will only receive critical bug fixes until Dec 7th, 2023

Please head over to the documentation for Sanity Studio v3 to learn more.

You can find migration guides from Studio v2 here.

Installation and upgrading

Upgrade the v2 version of the Command Line Interface (CLI) with:

npm install --global @sanity/cli@v2

Upgrade Sanity Studio with:

sanity upgrade

Notable changes

  • Upgrades the portable text editor to the latest compatible version
  • Fixes a potential build error caused by multiple versions of RxJS

📓 Full changelog

Author Message Commit
Per-Kristian Nordnes chore(form-builder): upgrade @sanity/portable-text-editor 013c538ac
Espen Hovlandsdal refactor(export): drop use of getUrl() method 46c165a23
Espen Hovlandsdal fix(base): pin bifur client to 0.3.0 3acf5d782
Espen Hovlandsdal fix(core): add missing yargs types 8de880c09
Espen Hovlandsdal chore: force react typings to use ^17 throughout monorepo 839700fac
Espen Hovlandsdal fix(core): restore URL constructor after mocked browser env b9e456bf9
sanity - v3.2.5

Published by RitaDias over 1 year ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

✨ Highlights

Improve readability for document history dates

The document history timeline now displays full dates in tooltips on hover

📓 Full changelog

Author Message Commit
RitaDias refactor(.github): add lock workflow for inactive issues (#4102) e3cc8c764
Robin Pyon fix(desk): add full timestamp tooltip to timeline items (#4100) 555de7517
Espen Hovlandsdal fix(cli): exit if user does not confirm v3 init continuation 8a51feb5e
Espen Hovlandsdal chore: upgrade @sanity/image-url dependency 61f79875e
Nina Andal Aarvik fix(core): remove uploaded image from hoveringFiles (#4112) c5607cd99
Nina Andal Aarvik fix(desk): Change hardcoded delete word in action dialog to the correct action (#4118) 774414390
Per-Kristian Nordnes dev(test-studio): add example config for LAN dev server 58a19227c
Cody Olsen fix: set htmlFor on <label>s (#4115) 641b38ac4
Nina Andal Aarvik fix(core): add readonly prop to RefenceInput (#4123) 29e251378
RitaDias refactor(core): remove commented code and deal with "todo" config error screen (#4101) 8761236f9
sanity - v3.2.4

Published by hermanwikner almost 2 years ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

✨ Highlights

Date range support in global search

It's now possible to easily search for documents between two dates in the global search.

🐛 Notable bugfixes

  • Fixes an issue where a configured studio-wide basePath would not be respected in build output, and workspaces would have to manually include the prefix in each workspace base path
  • Enables access to studio-prefixed environment variables through process.env
  • Fixes an issue where replacing the image asset in an image field would sometimes fail silently
  • Fixes an issue where using React components in field titles or descriptions could crash global search

📓 Full changelog

Author Message Commit
Per-Kristian Nordnes fix(form/inputs): don't wrap custom style comps. in Text d43e1cc19
Herman Wikner fix(core): make sure that the validation block is behind the text node 32e80c39a
Per-Kristian Nordnes refactor(core/form/inputs): clean up code and add TS-doc comments 8813ddc05
Espen Hovlandsdal fix: allow global studio base path (#3996) 71932dc9a
Espen Hovlandsdal fix: require node 14.18 or higher 84707614b
Espen Hovlandsdal feat(server): support studio env vars through process.env 0e733a6a7
Bjørge Næss fix(schema): set correct fallback title for image and file fields (#4093) f9eb765c5
Robin Pyon feat(core): global search date range support + minor fixes (#4055) 8db713e51
Nina Andal Aarvik fix(core): popover wrap button to allow replacing uploaded image (#4094) 918d8bd97
sanity -

Published by bjoerge almost 2 years ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

🐛 Notable bugfixes

  • fix issue in the Node.js runtime wrapper causing the groq tagged template literal to sometimes be undefined

📓 Full changelog

Author Message Commit
Cody Olsen fix: actually fix the groq bug and include tests that prove it (#4088) 060084c5ca
sanity - v3.2.2

Published by hermanwikner almost 2 years ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

🐛 Notable bugfixes

  • Fixes an issue where the Node.js ESM specific export for groq were missing from the package published to npm
  • Fixes a potential race condition with duplicate keys when an editor deletes all the content of a portable text editor while other editors are editing the same document

📓 Full changelog

Author Message Commit
Cody Olsen fix: add the node folder to the npm publish allowlist (#4086) f4b91469f
Per-Kristian Nordnes fix(portable-text-editor): fix selection issue with placeholder block ecf07c2c9
Per-Kristian Nordnes fix(portable-text-editor): move selection from state to ref 7742991fa
Per-Kristian Nordnes fix(portable-text-editor): fix prop propagation issue 7ba165efe
Per-Kristian Nordnes fix(portable-text-editor): fix issue with equality test 92a8f168d
Per-Kristian Nordnes fix(portable-text-editor): set placeholder directly 14bca9e25
Per-Kristian Nordnes fix(portable-text-editor): add missing hook dep. 7eaf2bfff
Per-Kristian Nordnes refactor(portable-text-editor): adjust debounce time 26756eeac
Per-Kristian Nordnes test(portable-text-editor): update snapshot d251a9042
Per-Kristian Nordnes fix(portable-text-editor): fix missing default to 0 for array insert pos d175ecf80
Per-Kristian Nordnes doc(portable-text-editor): type return val e31afbd38
sanity - v3.2.1

Published by hermanwikner almost 2 years ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

🐛 Notable bugfixes

  • Fixes a regression in [email protected] that is missing a default export affecting Node.js ESM runtimes

📓 Full changelog

Author Message Commit
RitaDias Fix focus navigation issue inside of block in PTE (#4066) 48eeac976
Cody Olsen fix: add missing default export to groq for the node ESM wrapper (#4085) 8dd6b269d
sanity - v3.2.0

Published by hermanwikner almost 2 years ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

✨ Highlights

RxJS upgraded to v7

This is an internal change, but if you have RxJS as a dependency in your Studio project you should make sure to upgrade to v7 of RxJS in your package.json. Otherwise you may get build errors due to changes in the Observable interface between v6 and v7 (note: this is a type change only, and should not affect the runtime behavior of your studio).

If you get a build error saying something similar to:

TS2322: Type 'Observable<…>' is not assignable to type 'ObservableInput<any>'. 
  Type 'Observable<…>' is not assignable to type 'Observable<any>'. 
  The types of 'source.operator.call' are incompatible between these types. 

Then the solution is to upgrade the version of RxJS used in your project or library to 7.x. See the full list of breaking changes in RxJS 7

Vite upgraded to v4

This is an internal change, but theoretically there might be small changes to how assets are handled between v3 and v4. If you're using custom Vite plugins or you are loading CSS or other files, please make sure they still work after the upgrade.

Notable changes

  • Reintroduces some flags for sanity graphql deploy. Note that flags will apply to all configured GraphQL APIs.

Notable bugfixes

  • Fixes issue with useFormValue hook lagging one iteration behind
  • Fixes issue where the uploaded images menu was inaccessible
  • Fixes some incorrect typings in defineField() when using Rule.valueOfField() - thanks @fritz-c
  • Adds schema validation error when defining already defined field names for image and file types
  • Supports Node ESM (>=14)

📓 Full changelog

Author Message Commit
Marius Lundgård fix(deps): upgrade to @sanity/pkg-utils@2 (#4012) 7f5f8fc0a
fritz-c docs: fix typos and update npm->yarn in CONTRIBUTING 6da910e0e
Espen Hovlandsdal fix(create-sanity): resolve cli module without module.resolve ad9890119
Herman Wikner fix(core): add missing hook dependencies 6b9ae908c
Herman Wikner fix(desk): set the form to read-only when reconnecting e1b94d310
Bjørge Næss chore: ignore @sanity/client when depchecking 'create-sanity' 784b57d5d
Herman Wikner fix(core): improve boolean read only ui e449ad627
Herman Wikner fix(core): add default icon to new document dialog bba4c7104
Espen Hovlandsdal fix(cli): prevent crash when deploying graphql API without a cli config 570958faf
Espen Hovlandsdal fix(cli): make project ID optional in cli config when deploying graphql API 9c685533e
Espen Hovlandsdal fix(cli): improve error when failing to encode CLI configuration 70de8ebb1
Espen Hovlandsdal fix(cli): reintroduce deprecated graphql deployment flags 93d30808b
Espen Hovlandsdal chore: upgrade to vite 4 ba4979530
Espen Hovlandsdal fix(server): make build entries plugin compatible with vite 4 e3aa8fd00
Espen Hovlandsdal fix: type fix for legacy experimental actions declaration d0bd029e2
Espen Hovlandsdal fix(types): add missing asset source extension properties a1f1ed7ca
Espen Hovlandsdal refactor(core): use optional chaining operator over lodash.get ae426da16
Espen Hovlandsdal refactor(core): improve type safety of template serialization a94dcd630
Marius Lundgård chore(deps): upgrade esbuild and esbuild-register 2356e06c5
Marius Lundgård fix: use esbuild-register only once in each thread 200596065
Espen Hovlandsdal fix: add esbuild to depcheck ignore (esbuild-register peer dependency) 6c0405204
Espen Hovlandsdal chore: drop unused babel plugin 81dbc4dce
Espen Hovlandsdal refactor: move @sanity/server into sanity module 6bad3f3b5
Espen Hovlandsdal test(cli): adjust cli build tests for vite 4 8e8a4b117
Fritz fix(types): allow use of Rule.valueOfField inside defineField 827a88f18
Bjørge Næss chore: update license files 12d13eaa2
Nina Andal Aarvik fix(core): uploaded images popover display (#4048) b9d335b65
Bjørge Næss chore(movies-studio): use correct version of google-maps plugin 8fcc0673d
Bjørge Næss chore(test-studio): add google maps input plugin to test-studio 20b40a8ff
Bjørge Næss chore: upgrade typescript to latest 4.x 5010f137d
Bjørge Næss chore(validation): allow @sanity/client@4 as peer dependency 42cf304bd
Bjørge Næss chore: upgrade to @sanity/client@4 55acbcc15
Bjørge Næss chore(portable-text-editor): allow rxjs@7 as peer dependency 8f08a6811
Bjørge Næss chore: upgrade rxjs to latest 7.x d458a31e2
Bjørge Næss chore(sanity): upgrade @sanity/bifur-client 30b535372
Bjørge Næss chore(test-studio): add example of field groups within an array c2cf16c82
Bjørge Næss chore(test-studio): add repro case for field groups issue 7bd29b537
Bjørge Næss fix(desk-tool): prevent form-state being re-used when switching between documents of different types f02b5dd53
Nina Andal Aarvik fix(schema): disallow fieldnames that are already defined (#4057) 020e24f78
Herman Wikner fix(desk): improve saving indicator 30098361f
Bjørge Næss fix: rename various scripts publish => release ca4958274
Herman Wikner fix(core): useFormValue lagging one iteration behind 3eebac376
Bjørge Næss refactor(core): deprecate WithReferringDocuments HOC in favor of a useReferringDocuments() hook (#4070) 71526d7da
sanity -

Published by bjoerge almost 2 years ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

🐛 Notable bugfixes

  • Fixed an issue introduced in v3.1.3 that caused the CLI to crash (#4035)
sanity -

Published by bjoerge almost 2 years ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

🐛 Notable bugfixes

  • Fixes an issue that could give false validation errors for complex documents
  • Hides restore action when revision is latest version
  • Improves responsiveness of file and image inputs for narrow widths
  • Restores transition effect when reordering primitive array values
  • Fixes an issue with the vision tool causing the query param errors tooltip disappear behind the above panel

📓 Full changelog

Author Message Commit
Bjørge Næss fix(base): wait for all chunked requests to arrive before continuing (#4017) 2134b27560
Espen Hovlandsdal chore(cli): increase chance of running post-test cleanup f138723c68
Espen Hovlandsdal test(cli): fix graphql datasets not being cleaned up d53a589f15
Cody Olsen chore: setup renovate config ed20a79a03
Cody Olsen chore: set renovate commit scope 8ae06e571f
Cody Olsen chore(renovate): ignore examples folder 223d31a839
renovate[bot] chore(deps): pin dependencies (#4032) d714540550
Herman Wikner fix(desk): remove restore action when revision is latest version 2846eec881
Herman Wikner fix(core): file/image input layout in narrow widths 125dc416e3
Herman Wikner dev(core): add files workshop c5e8102628
Bjørge Næss chore(sanity): upgrade json5 to latest 5d7eae6e54
Bjørge Næss chore(vision): upgrade json5 to latest 350f9ef547
Bjørge Næss fix(vision): render error tooltip in a portal fe96da15bb
Herman Wikner fix(core): add transition effect when sorting array of primitives 71e3212fa7