Home

>

Tools

>

Payload CMS

>

Releases

>

3.0.0-beta.99

Payload CMS Release: 3.0.0-beta.99

Pre Release

Tag Name: v3.0.0-beta.99

Release Date: 9/5/2024

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

PayloadCMS v3.0.0-beta.99 brings significant performance improvements to relationship fields, fixes PostgreSQL database queries for hasMany relationships, and corrects UI behavior for version restoration. This release focuses on enhancing user experience through optimized rendering and reduced API requests.

Highlight of the Release

    • Significant performance optimization for relationship fields reducing unnecessary re-renders and API requests
    • Fixed PostgreSQL database queries for hasMany relationships with text/number in arrays/blocks
    • Improved version comparison UI to only show 'Restore as draft' option when drafts are enabled

Migration Guide

No migration is required for this release. The changes are non-breaking and should work seamlessly when upgrading from v3.0.0-beta.98.

Upgrade Recommendations

This release is recommended for all users of PayloadCMS v3.0.0-beta.98, especially those:

  • Using relationship fields extensively in their admin UI
  • Working with PostgreSQL as their database
  • Using version control with drafts functionality

The performance improvements and bug fixes provide a better experience without introducing breaking changes.

Bug Fixes

Fixed PostgreSQL Database Queries

Fixed an issue with PostgreSQL database queries for hasMany relationships containing text or number fields within arrays or blocks. This resolves issue #7671 where certain query patterns were not working correctly.

Improved Version Restoration UI

Fixed the version comparison view to only display the "Restore as draft" button when the versions.drafts option is set to true. Previously, this button would appear regardless of whether drafts were enabled for the collection.

Optimized Relationship Field

Fixed performance issues with the relationship field component by:

  • Reducing the number of client-side requests made by the component
  • Eliminating the visual "blink" of field values on initial load
  • Implementing a new useIgnoredEffect hook to precisely control when effects are triggered
  • Optimizing re-renders to prevent unnecessary API calls

New Features

No new features were added in this release. This beta update focuses on bug fixes and performance improvements to existing functionality.

Security Updates

No security fixes were included in this release.

Performance Improvements

Relationship Field Optimization

The relationship field component has been significantly optimized to reduce unnecessary re-renders and API requests:

  • Implemented a new useIgnoredEffect hook that allows effects to be triggered based on specific dependency changes while ignoring others
  • Reduced the overall number of re-renders in the relationship field component
  • Eliminated duplicative API requests by preventing unnecessary effect executions
  • Fixed visual "blink" issues during initial loading of relationship field values

This optimization results in a smoother user experience and reduced server load, especially in forms with multiple relationship fields or complex data structures.

Impact Summary

This release focuses on improving performance and fixing bugs in PayloadCMS. The most significant impact comes from the relationship field optimization, which reduces unnecessary API requests and improves rendering performance. This change will be particularly noticeable for users working with forms containing multiple relationship fields.

The PostgreSQL query fix ensures more reliable database operations when working with hasMany relationships containing text or number fields in arrays or blocks, addressing a known issue that affected query results.

The version comparison UI improvement ensures that the "Restore as draft" option only appears when drafts are actually enabled for a collection, providing a more consistent user experience.

Overall, this release enhances stability and performance without introducing breaking changes, making it a recommended upgrade for all users of the beta version.

Full Release Notes

Statistics:

File Changed49
Line Additions711
Line Deletions165
Line Changes876
Total Commits5

User Affected:

  • Will experience improved performance when working with relationship fields
  • Will see fixed PostgreSQL database queries for hasMany relationships with text/number in arrays/blocks
  • Will notice more consistent behavior with version restoration options

Contributors:

denolfer1tsuujessrynkarjacobsfletch