Presence Cursors in Portable Text Editor, Comments and Tasks Out of Beta, and TypeGen Improvements
Published: April 30, 2024
Install or upgrade Sanity Studio
To initiate a new Sanity Studio project or upgrade an existing one, please refer to our comprehensive guide on Installing and Upgrading Sanity Studio.
If you are updating from a version earlier than 3.37.0, you should also check out this article to ensure your dependencies are up to date.
✨ Highlights
Presence cursors in the Portable Text Editor
Sanity Studio has always supported real-time collaboration, but you have yet to be able to see where others are working within the Portable Text Editor. By upgrading, you'll get a similar experience to Google Docs when editing block content.
This release also includes bug fixes for the Portable Text Editor:
- The Portable Text Editor will now remove the invisible Stega-encoded characters if you copy-paste from a preview using Visual Editing
- The cursor will not move out of viewpoint when deleting a character in PTE.
- Creating an annotation at the bottom of a PTE will no longer scroll you to the top.
- Fixes an issue where changing positions of items of an array within PTE would launch a cryptic error
Comments and Tasks are now out of beta
Comments and Tasks are now officially out of beta; hence, we have updated the configuration APIs. Both comments and tasks are enabled by default and for all document types.
Comments configuration migration
Configuration during beta:
// ./sanity.config.ts|js
export default defineConfig({
// ... rest of config
document: {
unstable_comments: {
enabled: false,
},
},
});New configuration (remove unstable_):
// ./sanity.config.ts|js
export default defineConfig({
// ... rest of config
document: {
- unstable_comments: {
+ comments: {
enabled: false,
},
},
});Tasks configuration migration
Configuration during beta:
// ./sanity.config.ts|js
export default defineConfig({
// ... rest of config
unstable_tasks: { enabled: false },
})New configuration (remove unstable_):
// ./sanity.config.ts|js
export default defineConfig({
// ... rest of config
- unstable_tasks: { enabled: false },
+ tasks: { enabled: false },
})Sanity TypeGen improvements
Thanks for all the feedback about Sanity TypeGen so far! This release ships several improvements and bug fixes:
- Sanity Typegen now supports
countin GROQ projections - TypeGen code (
sanity.types.ts) is now formatted when a project has a Prettier configuration - The TypeGen search path now includes
src,app, andsanityfolders by default - Various bug fixes for type generation
- Fixes an issue where
typegencommand would fail on relative imports - Fixes a bug where we could not extract or validate schema when the
sanity-plugin-mux-inputplugin was installed.
Do continue to give us feedback in #typescript in the community!
🐛 Notable bugfixes
- Fixes ambiguous aria-labels on some Status buttons
- Fixes issue with inline text comments that would include an inline object.
- Fixes toast message for document duplicate action
Related documentation
Configuring Tasks
Learn how to enable, configure, and use the Tasks feature in Sanity Studio for effective team collaboration on content creation.
- Previous page
Enable and configure Comments
Learn how to enable and configure the Comments feature in Sanity Studio.
Tasks for Sanity Studio
Learn to use Sanity Studio's tasks for collaboration, assign tasks, comment on tasks, and resolve tasks for efficient content creation.
Comments for Sanity Studio
Learn to use Comments in Sanity Studio for effective collaboration, including leaving comments, @mentions, and resolving comments.
Sanity TypeGen
How to use Sanity TypeGen tooling to generate TypeScript definitions from Sanity Studio schemas and GROQ queries.