sanity
sanity copied to clipboard
isHighlighted option for images does not work anymore in sanity studio v3
Discussed in https://github.com/sanity-io/sanity/discussions/3664
Confirmed and reproducible in dev-preview.17.
Originally posted by intensr September 20, 2022
{
title: 'Poster',
name: 'poster',
type: 'image',
options: {
hotspot: true // <-- Defaults to false
},
fields: [
{
name: 'caption',
type: 'string',
title: 'Caption',
options: {
isHighlighted: false // <-- doesnt work anymore
}
},
]
}
The is highlighted functionality for the image-type doesnt seem to work anymore in studio v3. it is not possible to hide a field anymore, each field is just shown in the same view as a regular object is displayed.
It also seems like the field label (title) isn't autogenerated from the name value if the title prop isn't present:
{
name: 'mainImage',
title: 'Main image',
type: 'image',
options: {
hotspot: true,
},
fields: [
{
name: 'alt',
type: 'string',
options: {
isHighlighted: false
}
}
]
},

isHighlighted has been removed in v3. All fields defined on image types are now "highlighted" by default. If you want to hide fields from plain sight, image fields has got fieldset support in v3, so you can put these fields behind a collapsed fieldset.