Home

>

Tools

>

Payload CMS

>

Releases

>

3.0.0-beta.55

Payload CMS Release: 3.0.0-beta.55

Pre Release

Tag Name: v3.0.0-beta.55

Release Date: 6/26/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

Payload CMS v3.0.0-beta.55 brings significant improvements to rich text editing with Lexical, enhances upload functionality, and fixes authentication issues. This release includes a new migration function for Slate to Lexical, improved TypeScript types, custom upload components, and fixes for authentication strategy and UI display issues.

Highlight of the Release

    • New migration function to convert all Slate documents to Lexical format at once
    • Ability to add custom upload components
    • Improved TypeScript types for the Lexical rich text editor
    • Fixed authentication strategy expiration issues
    • Added ability to modify response headers for uploads

Migration Guide

Migrating from Slate to Lexical

If you're still using the Slate rich text editor and want to migrate to Lexical, this release includes a new migration function that can convert all your documents at once:

import { migrateSlateToLexical } from '@payloadcms/richtext-lexical';

// Example usage (refer to documentation for complete implementation details)
await migrateSlateToLexical({
  // configuration options
});

Using the New Upload Features

To use the new response header modification feature for uploads:

upload: {
  modifyResponseHeaders: ({ headers }) => {
    headers.set('Cache-Control', 'public, max-age=86400')
    return headers
  }
},

For implementing custom upload components, refer to the updated documentation.

Upgrade Recommendations

This beta release (v3.0.0-beta.55) is recommended for developers who:

  1. Are already using Payload v3 beta and want the latest features and bug fixes
  2. Need to migrate content from Slate to Lexical
  3. Require custom upload functionality
  4. Were experiencing issues with authentication strategy or local strategy display

As this is still a beta release, it's recommended to test thoroughly in a non-production environment before deploying to production. The improvements to the Lexical editor and upload functionality make this a valuable update for most Payload v3 beta users.

Bug Fixes

Authentication and UI Fixes

  • Authentication Strategy: Fixed issue where expiration (exp) and auth strategy were not properly available from the me and refresh operations and through the Auth provider.
  • Local Strategy Display: Fixed a bug where the create/login view was incorrectly displayed when disableLocalStrategy was set to true.

Localization Fixes

  • Heading Level Translations: Properly set heading level translations for Norwegian (nb) and Polish (pl) languages in the Lexical rich text editor.

New Features

Rich Text Editor Improvements

  • Slate to Lexical Migration Function: A new utility function that allows migrating all your Slate documents to Lexical format at once, making the transition to the new editor much smoother.
  • Improved Lexical TypeScript Types: Enhanced type definitions for the Lexical editor, providing better developer experience and type safety.

Upload Enhancements

  • Custom Upload Components: Added ability to implement custom upload components, giving developers more control over the upload UI and functionality.
  • Upload Actions: New support for passing uploadActions to the Upload component for more customized upload workflows.
  • Response Modification: Added ability to pass in a response to upload handlers and modify response headers using the new uploads.modifyResponseHeaders property.

Documentation Improvements

  • Custom Component Detection: Added documentation for automatic custom component detection.
  • Accessing Config: Improved documentation on accessing the config from custom components.
  • Plugin Overview: Enhanced documentation for the plugins system.

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

No specific performance improvements were mentioned in this release. The focus appears to be on feature enhancements, bug fixes, and documentation improvements.

Impact Summary

This release significantly enhances Payload's rich text editing capabilities with improved Lexical editor support and a migration path from Slate. The upload system gains flexibility with custom components and response header modification. Several important bugs are fixed, including authentication strategy issues and UI display problems.

For developers, the improved TypeScript types and migration utilities will make working with the Lexical editor more straightforward. Content editors benefit from fixes to heading level translations and an overall more robust editing experience.

This beta release continues to refine Payload v3, addressing user feedback and adding requested features while maintaining stability. The documentation improvements also help developers better understand and utilize Payload's features.

Full Release Notes

v3.0.0-beta.55 (2024-06-26)

Features

  • richtext-lexical: new slate => lexical migration function which migrates all your documents at once (#6947) (5105676)
  • add the ability to pass in a response to upload handlers (#6926) (6b7ec6c)
  • ability to pass uploadActions to the Upload component (#6941) (35eb16b)
  • ability to add custom upload component (#6927) (d8d5a44)
  • richtext-lexical: improve lexical types (#6928) (0b2be54)

Bug Fixes

  • richtext-lexical: properly set heading level translation for nb and pl (#6900) (abf6e9a)
  • auth strategy exp (#6945) (5ffc5a1)
  • should not display create/login view with disableLocalStrategy: true (#6940) (c34aa86)

Contributors

Statistics:

File Changed106
Line Additions1,390
Line Deletions442
Line Changes1,832
Total Commits13

User Affected:

  • Can now migrate content from Slate to Lexical editor with a new migration function
  • Have access to improved TypeScript types for Lexical editor
  • Can implement custom upload components
  • Can modify response headers for uploads
  • Can access config from custom components

Contributors:

AlessioGrJarrodMFleschjacobsfletchjessrynkarjmikrutandershermansendenolfe