This repository was archived by the owner on Sep 9, 2024. It is now read-only.
v2.0.0
Migration Guide: https://www.staticcms.org/docs/migration-guide-v2
Breaking Changes
- Static CMS now requires you import its styles separately as they are not longer bundled into the main JavaScript file.
- External media integrations for Cloudinary and Uploadcare have been removed
- All previously deprecated items have been removed as part of this release.
getAsset- UseuseMediaAssetReact hook insteadcreateReactClass- Use react functional components insteadisFieldDuplicate- Useduplicatevariable insteadisFieldHidden- Usehiddenvariable instead
- Nested collection configuration has changed. The
metaconfiguration has been removed and itspathproperty has been moved under thenestedconfiguration. - Card previews now are only used for the card view. The
viewStyleproperty has been removed. Field previews can be used to change the table view. - Widget Control component property changes:
isDisabledrenamed todisabledisDuplicaterenamed toduplicateisHiddenrenamed tohiddenmediaPathsis now object of id mapped to an object containing thepathand optionalalt
useMediaInserthook now requires a collection to be passed in. Its callback function now receives an object containing thepathand optionalaltinstead of a string.prePublishandpostPublishevents have been dropped.
What's Changed
- The UI has been completely overhauled (#282)
- Directory navigation support has been added to the media library as an optional beta feature (Related to decaporg/decap-cms#3240)
- Dark mode is now available (#409)
- Default styles are now provided for the previews, this is necessary to support dark mode. However, if you provide your own preview styles these default styles will not be included in the preview.
- All images are now loaded directly from your Git repository. Previous behavior to try and source the image from your current deployment, then fall back to the images in the Git repository. This created some odd and inconsistent behaviors throughout the app.
summary_fieldsproperty added to collection configuration to allow customization of the table view. This works with the new field preview.- New widget control property:
forSingleList. It specifies if the widget is within a singletonlistwidget (string array, number array, etc) - Markdown editor toolbar is now sticky (#690)
- Color widget now validates user input
- Local drafts are automatically loaded, entries with local drafts are indicated on the collection view (#516)
- New
hasLocalBackupproperty is being passed to collection card previews
- New
- New discard changes option available in editor (#516)
- A new
UUIDwidget has been added (#92) docs
Fixes
- Links now work inside of shortcodes (#695)
Deprecations
In the Widget Control component property, the following properties have been deprecated. They will be removed in v3.0.0.
| Param | Type | Description |
|---|---|---|
| mediaPaths | object | Deprecated. Use useMediaInsert instead. Key/value object of control IDs (passed to the media library) mapping to media paths |
| clearMediaControl | function | Deprecated. Use useMediaInsert instead. Clears a control ID's value from the internal store |
| openMediaLibrary | function | Deprecated. Use useMediaInsert instead. Opens the media library popup. |
| removeInsertedMedia | function | Deprecated. Use useMediaInsert instead. Removes draft media for a give control ID |
| removeMediaControl | function | Deprecated. Use useMediaInsert instead. Clears a control ID completely from the internal store |