TL;DR
Payload CMS v2.15.0 introduces sortable arrays and blocks, improved relationship filtering, and fixes several GraphQL relationship issues. This release enhances the admin UI with better filter handling and accessibility improvements, while also addressing bugs in the rich text editor and version restoration functionality. The update focuses on improving developer experience and admin interface usability.
Highlight of the Release
- New
isSortable property for arrays and blocks
- Enhanced relationship filtering with
filterOptions support
- Fixed GraphQL nested relationships for proper locale and draft state handling
- Improved version restoration functionality
- Better UI/UX for rich text editor on smaller screens
Migration Guide
No breaking changes were introduced in this release, so migration should be straightforward. Simply update your Payload CMS version to 2.15.0.
If you're using arrays or blocks and want to take advantage of the new isSortable property, you can add it to your field configurations:
{
name: 'myArray',
type: 'array',
isSortable: true, // or false to explicitly disable sorting
fields: [
// your fields here
]
}
Similarly for blocks:
{
name: 'myBlocks',
type: 'blocks',
isSortable: true, // or false to explicitly disable sorting
blocks: [
// your block configs here
]
}
If you're using the filterOptions feature with relationships, you can now use it in list relationship filters as well.
Upgrade Recommendations
This release is recommended for all Payload CMS users, especially those who:
- Use GraphQL for querying nested relationships with localization
- Work with arrays and blocks and need control over sorting functionality
- Have experienced issues with version restoration
- Use the rich text editor on smaller screens or with custom line heights
- Rely on relationship filtering in the admin UI
The update contains no breaking changes and brings several quality-of-life improvements that enhance both developer and content editor experiences.
Bug Fixes
GraphQL Relationship Fixes
- Fixed nested relationships not respecting request locale in GraphQL queries
- Added proper cascade of draft arguments in nested GraphQL relationship queries
Rich Text Editor Improvements
- Fixed drag and add block handles disappearing too quickly on smaller screen sizes
- Corrected floating toolbar caret positioning for various line heights
Admin UI Fixes
- Fixed bulk publishing functionality from collection lists
- Corrected filter state reset when parameter state changes within routes
- Added proper
readonly styles to disabled radio fields
- Fixed incorrect
localesNotSaved translation
- Improved sanitization of fields in default edit view for drawer content
Version Management
- Fixed version restoration functionality
Plugin Fixes
- Plugin Cloud: Fixed cache purging for all image sizes
New Features
Sortable Arrays and Blocks
Added a new isSortable property for arrays and blocks, giving developers more control over whether users can reorder these elements in the admin UI.
Enhanced Relationship Filtering
Implemented support for filterOptions in list relationship filters, allowing for more granular control over which items appear in relationship fields. This provides developers with greater flexibility when building complex data relationships.
UI/UX Improvements
Several improvements to the admin interface make it more intuitive and user-friendly:
- Better filter handling when navigating between routes
- Hiding unusable fields from collection filter selects
- Improved drawer content handling with proper field sanitization
Security Updates
No specific security fixes were mentioned in this release.
Performance Improvements
Admin UI Performance
The improvements to filter handling and relationship queries contribute to a more responsive admin interface, particularly when working with complex data structures and relationships.
GraphQL Query Optimization
The fixes to GraphQL nested relationships improve the efficiency of queries by properly handling locale and draft states, reducing unnecessary data fetching.
Impact Summary
Payload CMS 2.15.0 delivers significant improvements to both developer and content editor experiences. The addition of the isSortable property for arrays and blocks gives developers more control over content organization, while enhanced relationship filtering with filterOptions support provides greater flexibility when building complex data models.
The release addresses several important GraphQL issues, particularly around nested relationships and locale handling, which improves the reliability of API queries. Content editors will benefit from a more polished admin interface with better filter behavior, improved bulk publishing, and enhanced rich text editing on smaller screens.
The fixes to version restoration functionality and cloud plugin cache purging also improve the overall stability of the CMS. While this release doesn't introduce breaking changes, it provides meaningful enhancements that make Payload more robust and user-friendly across various use cases.
Full Release Notes
2.15.0 (2024-05-03)
Features
Bug Fixes
- bulk publish from collection list (#6063) (84570e6)
- cascade draft arg in nested GraphQL relationship queries (#6141) (a8ac8b4)
- GraphQL nested relationships not respecting req locale (#6117) (3fccd34)
- hide unusable fields from collection filter select (#6135) (2be5ad0)
- incorrect
localesNotSaved translation (#5996) (af67749)
- plugin-cloud: purge cache for all sizes (#5301) (831f1ff)
- properly adds
readonly styles to disabled radio fields (#6176) (9b7e62d)
- resets filter state when param state change within route (#6169) (6e38cc2)
- richtext-lexical: drag and add block handles disappear too quickly for smaller screen sizes. (#6145) (24f6972)
- richtext-lexical: floating toolbar caret positioned incorrectly for some line heights (#6151) (36b1f5a)
- sanitizes fields in default edit view for drawer content (#6175) (43dab5c)
- version restoration (#6039) (91bac9c)