Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

v2.0.0

Choose a tag to compare

@KaneFreeman KaneFreeman released this 21 Apr 12:35
· 331 commits to main since this release

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 - Use useMediaAsset React hook instead
    • createReactClass - Use react functional components instead
    • isFieldDuplicate - Use duplicate variable instead
    • isFieldHidden - Use hidden variable instead
  • Nested collection configuration has changed. The meta configuration has been removed and its path property has been moved under the nested configuration.
  • Card previews now are only used for the card view. The viewStyle property has been removed. Field previews can be used to change the table view.
  • Widget Control component property changes:
    • isDisabled renamed to disabled
    • isDuplicate renamed to duplicate
    • isHidden renamed to hidden
    • mediaPaths is now object of id mapped to an object containing the path and optional alt
  • useMediaInsert hook now requires a collection to be passed in. Its callback function now receives an object containing the path and optional alt instead of a string.
  • prePublish and postPublish events 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_fields property 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 singleton list widget (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 discard changes option available in editor (#516)
  • A new UUID widget 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