Desk is now Structure
The deskTool API was renamed structureTool in v3.24.1 of Sanity Studio. The old names still work as deprecated aliases.
The version 3.20.0 update to Sanity Studio introduced a notable change: the tool previously known as "Desk" has been renamed to "Structure".
You may notice this renaming in the toolbar menu of your studio, as well as in the path segment of your studio URLs.
Why the rename
The "Desk" name suggested a singular, one-size-fits-all approach to content management. As Sanity Studio has grown, so have its capabilities. With features like Presentation broadening your content interaction options, Structure is a more appropriate and descriptive name that reflects its status as one of the many diverse ways you can shape and organize your content models.
For studio users
This update brings two changes to your workspace:
- Toolbar update: The studio toolbar label has changed from "Desk" to "Structure", and the tool works as before. If your studio customizations refer to the tool by its old name
desk— when resolving intents, for example — that identifier changed tostructurein version 3.20.0 and you need to update those references. - URL path update: The initial path segment of your studio URLs has changed from
/deskto/structure. Existing bookmarks will automatically redirect, so there's no immediate need to update them.
For studio maintainers
As of version 3.24.1, the deskTool has been renamed structureTool and is found in sanity/structure. In other words, where you'd previously do this:
import {defineConfig} from 'sanity'
import {deskTool} from 'sanity/desk'
export default defineConfig({
// ...rest of config
plugins: [
deskTool(),
]
})You should now update your code as follows:
import {defineConfig} from 'sanity'
import {structureTool} from 'sanity/structure'
export default defineConfig({
// ...rest of config
plugins: [
structureTool(),
]
})The previous names are still valid aliases, so existing code keeps working: deskTool is the same function as structureTool. They are deprecated, though. The 3.24.1 release notes state that the sanity/desk imports will be removed in a later major version, so migrate when you can.
Protip
The Sanity CLI has a codemod that updates your code for you. Run the following command in your studio root directory:
npx @sanity/cli@latest codemod deskRename
Be sure to check in any local changes to version control before running the codemod in case it should fail.
Current documentation
For the current Structure Tool documentation, see Structure tool and Structure builder and the Structure Tool API.
