Home

>

Tools

>

Payload CMS

>

Releases

>

Release 0.7.0

Payload CMS Release: Release 0.7.0

Tag Name: v0.7.0

Release Date: 6/21/2021

Payload CMS LogoPayload CMS

Payload CMS is a modern, self-hosted headless content management system built with TypeScript, Node.js, and MongoDB. It's designed specifically for developers who want full control over their content management system while maintaining a powerful admin interface for content editors.

TL;DR

Payload CMS v0.7.0 Release

What's New

Payload CMS v0.7.0 introduces user preferences for a more personalized admin experience, exposes Babel configuration for enhanced customization, and fixes select cell handling issues.

Why It Matters

This release significantly improves the developer and admin user experience by allowing preferences to be saved (like locale choices and column visibility), while also making the codebase more extensible through exposed Babel configurations.

Who Should Care

Developers building with Payload CMS and admin users who manage content through the admin panel will benefit from these improvements, particularly those working with multilingual content or custom column layouts.

Highlight of the Release

    • Introduction of user preferences system for personalized admin experiences
    • Exposed Babel configuration for enhanced developer customization
    • New ID field for blocks and array items for better tracking and manipulation
    • Fixed select cell handling for improved reliability

Migration Guide

Migrating to v0.7.0

No breaking changes were introduced in this version, making it a straightforward upgrade from v0.6.10.

Using the New Features

To use the new user preferences:

// In custom React components
import { usePreferences } from 'payload/components/preferences';

const MyComponent = () => {
  const { getPreference, setPreference } = usePreferences();
  // Use preferences in your component
};

To use the exposed Babel configuration:

// In your babel.config.js
const payloadBabel = require('payload/babel');

module.exports = {
  ...payloadBabel,
  // Add your custom Babel configuration here
};

To access the new DocumentInfo context:

import { useDocumentInfo } from 'payload/components/utilities';

const MyComponent = () => {
  const { id, collection } = useDocumentInfo();
  // Use document info in your component
};

Upgrade Recommendations

We recommend all users upgrade to v0.7.0 as it introduces valuable new features without breaking changes.

How to Upgrade

  1. Update your Payload dependency in package.json:

    "payload": "^0.7.0"
    
  2. Run your package manager's install command:

    npm install
    # or
    yarn
    
  3. Restart your development server to apply the changes.

This is a feature-rich update with no breaking changes, making it a safe and beneficial upgrade for all Payload CMS projects.

Bug Fixes

Select Cell Handling

Fixed an issue with select cells to properly handle all scenarios, ensuring that:

  • Select fields display correctly in all contexts
  • Edge cases that previously caused rendering issues are now handled properly
  • Improved reliability when working with select fields in collection lists

New Features

User Preferences System

A comprehensive user preferences system has been added that allows:

  • Saving preferred locales in the admin panel
  • Customizing visible columns in collection lists
  • Accessing preferences via both REST API and GraphQL
  • Using the new usePreferences hook in custom components

Exposed Babel Configuration

Developers can now access and extend Payload's Babel configuration:

  • Import configuration via payload/babel
  • Reuse Payload's Babel settings in your own project
  • Customize Babel settings while maintaining compatibility with Payload

Enhanced Block and Array Functionality

  • New ID field automatically added to blocks and array items
  • Improved tracking and manipulation of nested content
  • New DocumentInfo context for accessing document metadata in custom components

Security Updates

No security fixes were mentioned in this release.

Performance Improvements

No specific performance improvements were highlighted in this release. The focus was on new features, developer experience enhancements, and bug fixes.

Impact Summary

Payload CMS v0.7.0 represents a significant enhancement to both developer and admin user experiences. The introduction of user preferences allows for a more personalized admin interface, where users can save their preferred locales and column visibility settings. This is particularly valuable for teams working with multilingual content or those who need customized views of collection data.

For developers, the exposed Babel configuration via payload/babel provides greater flexibility when integrating Payload into existing projects or when customizing the build process. The new DocumentInfo context and usePreferences hooks open up possibilities for creating more sophisticated custom admin components.

The addition of automatic ID fields to blocks and array items improves the developer experience when working with nested content structures, making it easier to track and manipulate these elements.

While this release doesn't include major performance improvements or security fixes, the bug fix for select cell handling ensures a more reliable admin interface experience. Overall, v0.7.0 enhances Payload's flexibility and user experience without introducing breaking changes, making it a recommended upgrade for all users.

Full Release Notes

0.7.0 (2021-06-21)

Bug Fixes

  • handle all scenarios in select cell (dd40ab0)

Features

Statistics:

File Changed76
Line Additions2,619
Line Deletions1,507
Line Changes4,126
Total Commits7

User Affected:

  • Can now access and extend Payload's Babel configuration via `payload/babel`
  • Have access to new hooks like `usePreferences` for building custom admin components
  • Can leverage the new DocumentInfo context in custom components

Contributors:

DanRibbensjmikrutdenolfe