Home

>

Tools

>

Payload CMS

>

Releases

>

Release 1.10.0

Payload CMS Release: Release 1.10.0

Tag Name: v1.10.0

Release Date: 6/20/2023

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 v1.10.0: Performance Optimizations and Field Enhancements

This release brings significant performance improvements to conditional logic and database queries, introduces hasMany support for number fields, and fixes several UI issues in relationship drawers. The update also adds automatic redirection after login to the originally requested URL and deprecates min/max in favor of minRows/maxRows for relationship fields.

Highlight of the Release

    • Added hasMany support for number fields, allowing multiple number values to be selected
    • Optimized conditional logic performance for faster field rendering
    • Improved database query performance, especially for 'like' queries with large datasets
    • Added automatic redirection to originally requested URL after login
    • Fixed multiple issues with relationship drawers and fields
    • Deprecated min/max in favor of minRows/maxRows for relationship fields

Migration Guide

Migrating from min/max to minRows/maxRows in Relationship Fields

The min and max properties for relationship fields have been deprecated in favor of minRows and maxRows. To update your code:

// Before
{
  name: 'relatedPosts',
  type: 'relationship',
  relationTo: 'posts',
  min: 2,
  max: 5
}

// After
{
  name: 'relatedPosts',
  type: 'relationship',
  relationTo: 'posts',
  minRows: 2,
  maxRows: 5
}

While the old properties will continue to work for now, it's recommended to update your code to use the new properties to avoid issues in future releases.

Upgrade Recommendations

This release includes significant performance improvements and new features without breaking changes, making it a recommended upgrade for all Payload CMS users.

To upgrade:

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

After upgrading, review your relationship field configurations to update any instances of min/max to minRows/maxRows for future compatibility.

Bug Fixes

Relationship Field Improvements

  • Fixed issue where fields in relationship drawers were not usable (#2815)
  • Fixed drawer fields being read-only when opened from a hasMany relationship (#2843)
  • Fixed relationship field query pagination (#2871)
  • Fixed drawer closing unexpectedly on backspace (#2869)

Query and Database Fixes

  • Fixed slow 'like' queries with large record sets
  • Fixed near query sorting by distance and pagination (#2861)
  • Fixed default sort with near operator (#2862)
  • Fixed querying number custom IDs with 'in' operator (#2842)

UI Fixes

  • Fixed mobile loading overlay width (#2866)
  • Fixed persisting payloadAPI through local operations that accept req (#2831)

New Features

HasMany Support for Number Fields

Number fields now support the hasMany property, allowing users to select multiple number values. This feature includes:

  • A multi-select interface similar to relationship fields
  • Validation with minRows and maxRows properties
  • Full TypeScript support and GraphQL schema generation
  • Proper validation in both the UI and API

Automatic Redirection After Login

Users are now automatically redirected to their originally requested URL after logging in. This improves the user experience when accessing protected routes, eliminating the need to navigate back to the desired page after authentication.

Optimized Conditional Logic

Conditional logic performance has been significantly improved, resulting in faster field rendering and a more responsive admin UI. This optimization is particularly noticeable in forms with many conditional fields.

Security Updates

No specific security fixes were included in this release.

Performance Improvements

Conditional Logic Optimization

The conditional logic system has been optimized to significantly improve performance. This results in faster field rendering and a more responsive admin UI, especially in forms with many conditional fields.

Database Query Performance

  • Improved performance for 'like' queries with large datasets
  • Enhanced near query performance with proper sorting and pagination
  • Optimized relationship field queries with better pagination handling

Impact Summary

Payload CMS v1.10.0 delivers notable performance improvements and feature enhancements that benefit both developers and content editors. The optimization of conditional logic and database queries will result in a more responsive admin interface and faster API responses, especially for applications with complex forms or large datasets.

The addition of hasMany support for number fields expands the flexibility of the CMS, allowing for more sophisticated data modeling. This feature, combined with the fixes to relationship drawers and fields, significantly improves the content editing experience.

The automatic redirection after login enhances user experience by maintaining the context of the user's intended destination, while the deprecation of min/max in favor of minRows/maxRows for relationship fields improves API consistency.

Overall, this release focuses on performance, usability, and developer experience without introducing breaking changes, making it a valuable upgrade for all Payload CMS users.

Full Release Notes

1.10.0 (2023-06-20)

Bug Fixes

  • #2831, persists payloadAPI through local operations that accept req (85d2467)
  • #2842, querying number custom ids with in (116e9ff)
  • default sort with near operator (#2862) (99f3809)
  • deprecate min/max in exchange for minRows and maxRows for relationship field (#2826) (0d8d7f3)
  • drawer close on backspace (#2869) (a110ba2)
  • drawer fields are read-only if opened from a hasMany relationship (#2843) (542b536)
  • fields in relationship drawer not usable #2815 (#2870) (8626dc6)
  • mobile loading overlay width #2866 (#2867) (ba9d633)
  • near query sorting by distance and pagination (#2861) (1611896)
  • relationship field query pagination (#2871) (ce84174)
  • slow like queries with lots of records (4dd703a)

Features

Statistics:

File Changed91
Line Additions1,464
Line Deletions749
Line Changes2,213
Total Commits29

User Affected:

  • Need to update relationship field configurations from `min`/`max` to `minRows`/`maxRows`
  • Can now use hasMany functionality with number fields
  • Will experience improved performance with conditional logic and database queries
  • Can implement automatic redirection after login to originally requested URLs

Contributors:

AlessioGrdnolte-dpgjmikrutdigitaledge-gitDanRibbensjacobsfletch