Migrating @codedazur/sanity-plugin-fusion
To v1.0.0
1. Button Action Field Renamed
The Button.action field has been renamed to link to better align with its field type.
Use the 004-rename-button-link migration to update your dataset.
2. Section Options Simplified
The SectionOptions have been simplified. The constraint property has been removed and the fullBleed property has been renamed to bleed.
Use the 005-simplify-section-options migration to update your dataset.
3. Info Component Title Structure
The Info component’s title has been renamed to headline and the subtitle has been renamed to title.
Use the 006-rename-info-titles migration to update your dataset.
To v0.22.0
1. Field Definition Utilities
The define*Field() utilities have been removed in favor of using defineField({ type: FieldType.* }). Update your field definitions according to the table below:
| Old | New |
|---|---|
defineRichTextField({ ... }) | defineField({ type: FieldType.Body }) |
defineInfoField({ ... }) | defineField({ type: FieldType.Info }) |
defineHeroField({ ... }) | defineField({ type: FieldType.Hero }) |
defineButtonGroupField({ ... }) | defineField({ type: FieldType.ButtonGroup }) |
defineSectionsField({ ... }) | defineField({ type: FieldType.Sections }) |
Customization options are still supported through the options object, with one notable change: the defineRichTextField’s options.images has been renamed to options.figures.
2. Image Aspect Ratio
The image aspect ratio has been moved to the image field type.
Use the 003-move-aspect-ratios migration to update your dataset.
3. Figure Component Introduction
A new Figure component has been introduced with the following changes:
- The ImageSection component now uses the new
fusion.figurefield instead of the previousimagefield. - The Block field (previously defined with
defineRichTextField) now uses the same figure field for consistency. - Images in body fields now support captions through the Figure component’s unified interface.
Use the 002-image-section-figure migration to update your dataset.
4. Info Body Figures
Allowing figures in an Info component’s body is now an opt-in feature and can be enabled with the following configuration:
defineField({
type: FieldType.Info,
options: {
body: {
figures: true,
},
},
});To v0.21.0
1. Object Type Namespacing
Object type names are now namespaced (e.g. fusion.button instead of button) for better organization and to avoid potential naming conflicts.
Use the 001-namespace-object-types migration to update your dataset.