Installation and upgrading
Initiate a new Sanity Studio without installing the CLI globally:
npm create sanity@latest
To upgrade Sanity Studio, update its dependency:
npm install sanity@latest
✨ Highlights
Visual Editing (Enterprise Only)
Note
Visual Editing is available for select Sanity enterprise customers. If you would like to use Visual Editing with Vercel, you will also need to contact Vercel to enable this feature for your Vercel team. You may contact our sales team for more information.
This release includes support for Visual Editing and Content Source Maps. This feature enables you to make deep edit links from components in a front end that takes you to respective fields in the Studio. This enables a new workflow that substantially reduces the time it takes to make changes by bringing you directly to the relevant field where you can make edits reliably in its appropriate context. For more information on Visual Editing, check out the documentation here.
Visual Editing is available for mutual Sanity and Vercel Enterprise customers. Existing Sanity enterprise customers can contact their dedicated customer success manager to enable this feature. Customers interested in upgrading to an enterprise plan can contact our sales team for more information. You will also need to contact Vercel sales to enable this feature for your Vercel team.
Sanity enterprise customers can also use the Content Source Maps with GROQ to build custom Visual Editing capabilities. For more information, check out the Content Source Maps documentation here.
Quickly add Sanity Studio to Next.js
The sanity init
command now recognizes if you are in a Next.js project, and will ask:
• What Sanity project you want to use (use existing or create new)
• Whether you want to place an embedded Studio using pages or app routes
• Whether you want to use TypeScript for your Studio
• What template you want to use (clean or blog)
• Whether you want to append the project ID and dataset to your .env file (you can also specify a custom env file with the --env flag)
If you have a Next.js project and want to quickly deploy an embedded Sanity Studio, you can run npx sanity init
within your application's directory to get started.
Minimum version when using pnpm required: 8.x
Additional notable features
- Enables fully unattended
studio init
with CLI whenprojectId
,dataset
and--y
flags are set sanity init
will now determine default package manager choice based on currently running package manager
🐛 Notable bugfixes
- Updates the Shopify Studio template with various fixes
- Fixes an issue that caused field group buttons to steal focus when deep linking into a Studio value
- Fixes an issue causing focus to be set on wrong element when deep linking to a field inside an array
- Fixes an issue so deep linking to a field/input expands the right fieldsets/collapsed objects along the way
- Fixes an issue where validation errors would not focus on collapsed fieldset
- Fixes an issue where using
pnpm
to install dependencies would not install the latest available versions when creating a new project - Resolves issue where unattended mode (
--yes
flag) forsanity init
would still show a confirmation prompt about running a v2-like CLI command - Fixes a bug with reference fields not receiving focus when clicking a validation error or following a link to the field
- Fixes intent links to focus on the correct location
- Fixes issue with pasting a file from clipboard into a file field that already has a value
- Fixes support for deep linking in image and file fields
- Fixes a bug that broke pasting a file into a file field when a value is already present
📓 Full changelog
Author | Message | Commit |
---|---|---|
Bjørge Næss | fix(form): fix focus issue with reference fields (#4429) | 912ce0d |
Espen Hovlandsdal | fix(cli): prefer package manager that is currently executing (#4426) | 4523046 |
Espen Hovlandsdal | fix(cli): skip v3 init prompt in unattended mode (#4425) | 7c17124 |
Rune Botten | feat(cli): skip dataset name validation in unattended mode when provided through options (#4422) | 605d62b |
Espen Hovlandsdal | fix(cli): resolve and install latest sanity+vision dependencies (#4424) | 25303f9 |
renovate[bot] | fix(deps): update codemirror (#4377) | 989dd81 |
Cody Olsen | chore(test-studio): use the @sanity/ui provided hook for 3d reduced motion
| 0f01713 |
Nina Andal Aarvik | fix(core): add fieldset within field to expandOperation | 488676a |
Bjørge Næss | fix(form): make sure getExpandOperations recursively expands objects and fieldsets | 8d50b9e |
Robin Pyon | chore(test-studio): add fieldgroup with fieldset + validation debug case | 349e65f |
Tom Smith | fix(cli): sync shopify template updates | 8047e5d |
Tom Smith | fix(cli): shopify template docs typos | 46bcf81 |
Espen Hovlandsdal | fix(cli): update shopify template dependency ranges | d159107 |
Espen Hovlandsdal | fix(cli): add missing dependencies for shopify template | 8af0512 |
Espen Hovlandsdal | chore: add Tom as codeowner of shopify templates | 48738ef |
renovate[bot] | chore(deps): update peter-evans/create-pull-request action to v5 (#4448) | cfe0b6f |
Bjørge Næss | chore: add codeowners to preview + file & image input | 01eb6b0 |
Bjørge Næss | fix(desk): set collapsed/fieldgroup/open path based on router path | b1f1eb4 |
Bjørge Næss | fix(form): prevent autofocus on array dialogs where focus is on a deeper value | 8cb0642 |
Binoy Patel | fix(core): scroll PTE input into view when receiving focus | 627640d |
Bjørge Næss | fix(form): skip autofocus on field groups as it's handled by either focusPath or focusFirstDescendant | 51c9483 |
Bjørge Næss | feat(util): add resolveKeyedPath | ec31040 |
Binoy Patel | fix(core): focus first descendant in FormView when empty initial focus path is given | 350b567 |
Binoy Patel | fix(desk): use resolveKeyedPath to set initial open/focus path from url | dc04b49 |
Binoy Patel | fix(form): sync local focus state when focused/focusPath props change | 89adbd8 |
Bjørge Næss | fix(form): improve focus handling for image and file inputs (#4451) | dd8e424 |
Benjamin Akar | feat(cli): sanity init for Next.js apps (#4439)
| 6effcfe |
Bjørge Næss | ci(github): drop node 14 from test matrix (#4452) | 6fe2b9f |