Home

>

Tools

>

Payload CMS

>

Releases

>

Release 0.13.4

Payload CMS Release: Release 0.13.4

Tag Name: v0.13.4

Release Date: 11/30/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.13.4 - Form Component Abstraction & Bug Fixes

This release focuses on abstracting core form components (text inputs, textareas, selects, and uploads) to improve reusability and maintainability. The update also addresses several bugs related to component props handling and type definitions. These changes primarily affect developers building custom UI components with Payload, providing better TypeScript support and more consistent component behavior.

Highlight of the Release

    • Abstraction of core form components (text, textarea, select, upload) for better reusability
    • Improved TypeScript support with better event typing
    • Fixed issues with uncontrolled text field components
    • Better prop handling for select and textarea components

Migration Guide

No migration steps are required for this release. The changes are primarily internal abstractions and bug fixes that should not affect existing implementations.

If you've built custom components that extend or modify Payload's form components, you may want to review the updated component structure to ensure compatibility, but no breaking changes were introduced that would require immediate action.

Upgrade Recommendations

This release is recommended for all users, especially those who:

  • Are building custom UI components that extend Payload's form elements
  • Have experienced issues with select components or textarea prop handling
  • Need improved TypeScript support for form events

The upgrade should be straightforward with no breaking changes. Simply update your Payload dependency to version 0.13.4:

npm install [email protected]
# or
yarn add [email protected]

Bug Fixes

  • Select Component: Fixed an issue where the hasMany property wasn't being properly passed through the select component, which could cause incorrect behavior for multi-select fields.

  • Textarea Component: Resolved a bug where props weren't being properly threaded through the textarea component, potentially causing some properties to be lost.

  • Select Component Types: Fixed type definitions for the select component, improving TypeScript support and catching potential type errors during development.

  • Uncontrolled Text Fields: Fixed an issue that could cause text field components to behave as uncontrolled components in certain scenarios, which could lead to unexpected behavior in forms.

New Features

Component Abstractions

This release introduces significant architectural improvements by abstracting several core form components:

  • Text Component: The input has been abstracted from the text component, creating a cleaner separation of concerns and enabling better reusability.

  • Select Component: The select component has been abstracted to provide a more consistent interface and improved reusability across the codebase.

  • Textarea Component: The textarea component has been abstracted with improved event typing, making it more robust when handling user input events.

  • Upload Component: The upload component has been abstracted to provide a more consistent interface for file uploads.

These abstractions improve the overall architecture of Payload's form handling system, making it easier to maintain and extend in the future.

Security Updates

No security fixes were mentioned in this release. The changes are focused on component architecture and bug fixes rather than security-related issues.

Performance Improvements

No specific performance improvements were mentioned in this release. The changes are primarily focused on code architecture, component abstractions, and bug fixes rather than performance optimizations.

Impact Summary

Payload CMS v0.13.4 focuses on internal architecture improvements through component abstractions and bug fixes. The primary impact is on developers building custom UI components or plugins, who will benefit from more consistent component behavior, better TypeScript support, and improved event handling.

The abstraction of text, textarea, select, and upload components creates a more maintainable codebase and provides cleaner extension points for custom development. Bug fixes address issues with prop handling and type definitions that could cause unexpected behavior in forms.

This release doesn't introduce new end-user features or breaking changes, making it a safe upgrade for all Payload implementations. The improvements lay groundwork for more consistent component behavior and better developer experience when working with Payload's form system.

Full Release Notes

0.13.4 (2021-11-30)

Bug Fixes

  • passes hasMany through select component (c77bf3a)
  • prevents uncontrolled text field component (f0fd859)
  • select component types (7e2b259)
  • threads props through textarea component (0b13eda)

Features

  • abstracts input from text component (615e369)
  • abstracts select component (fa67137)
  • abstracts textarea component and improves event typing (86480b7)
  • abstracts upload component (f234f68)

Statistics:

File Changed20
Line Additions711
Line Deletions352
Line Changes1,063
Total Commits12

User Affected:

  • Benefit from improved component abstractions for building custom UI elements
  • Better TypeScript support with improved event typing
  • More consistent component behavior with fixed prop threading

Contributors:

jacobsfletchjmikrut