TL;DR
Payload CMS v3.34.0 brings significant improvements to querying capabilities, UI enhancements, and performance optimizations. Key features include support for querying by join fields and configurable time formats for scheduled publishing. The release also fixes numerous UI issues, particularly in the rich text editor and form handling, while improving documentation and test coverage.
Highlight of the Release
- Support for
where querying by join fields, crucial for bi-directional relationships
- Configurable time format (12/24 hour) and intervals for scheduled publishing
- Significant performance improvements in the rich text editor with debounced onChange handler
- Fixed form state race conditions for more reliable data handling
- Improved filtering with multi-select inputs for text and number fields in the where builder
Migration Guide
No breaking changes are included in this release, so migration should be straightforward. Simply update your Payload CMS version:
npm install [email protected]
# or
yarn add [email protected]
# or
pnpm add [email protected]
If you're using the rich text editor extensively and have implemented custom onChange handlers, you may want to review the changes in the debounced handler implementation to ensure compatibility with your custom code.
Upgrade Recommendations
This release is recommended for all users, especially those who:
- Use rich text editors extensively and have experienced performance issues
- Need to query by join fields for bi-directional relationships
- Have encountered issues with form state race conditions
- Use PostgreSQL with long field names
- Need more flexible time format options for scheduled publishing
The upgrade is low-risk as it contains no breaking changes, and the performance improvements for the rich text editor alone make it worthwhile for most users.
Bug Fixes
UI Improvements
- Fixed image previews getting stuck when paginating in list views
- Added multi-select inputs for text and number fields when using
in & not_in operators in filters
- Fixed array minimum row validation incorrectly showing for non-required fields with no rows
- Fixed value not resetting in where builder when operator changes
- Improved handling of upload edits for bulk uploads
- Fixed orderable table rendering issues
- Now properly preferring adminThumbnail even for non-image files
Form State and Data Handling
- Fixed race conditions in form state that could cause local changes to be overridden
- Ensured
file field is only serialized at top-level for upload-enabled collections
- Fixed querying by polymorphic join field
relationTo with overrideAccess: false
Database and Field Handling
- Fixed long array field table aliases causing errors in PostgreSQL even when
dbName is used
- Fixed issue where join fields couldn't be defined when the target relationship is nested in a second or higher tab
- Fixed CSS for rich text diff component not being included in CSS bundle
New Features
Support for where Querying by Join Fields
Now you can query collections based on join field values, which is especially useful for bi-directional relationships. For example:
const categories = await payload.find({
collection: 'categories',
where: { 'relatedPosts.title': { equals: 'my-title' } },
})
This feature enables more powerful querying capabilities and can be used for access control.
Configurable Time Format for Scheduled Publishing
You can now customize the time format and intervals for scheduled publishing with new configuration options:
versions: {
drafts: {
schedulePublish: {
timeFormat: 'HH:mm', // 24-hour format (default is 12-hour)
timeIntervals: 5, // Time slot intervals in minutes
},
},
},
This allows for better adaptation to different regional preferences and workflow needs.
Security Updates
The release includes a security update by bumping the image-size package to version 2.0.2, which contains a fix for a potential DDOS vulnerability. The updated package also brings performance benefits as it now has no dependencies and improved overall performance.
Performance Improvements
Rich Text Editor Performance
The rich text editor has been significantly optimized by debouncing the onChange handler using requestIdleCallback. This addresses a critical performance issue where typing in the editor could be laggy on devices without high-end CPUs.
Before this change, the editor state serialization was executed on every keystroke, causing UI stuttering and high CPU utilization. The optimization reduces Input Delay from several seconds to around 200-350ms, making the typing experience much smoother.
This improvement is particularly noticeable when:
- Working on larger documents
- Using devices with limited processing power
- Working with complex rich text content
The implementation carefully preserves all editor functionality while ensuring the UI remains responsive during typing.
Impact Summary
Payload CMS v3.34.0 delivers significant improvements across several areas, with the most notable being enhanced querying capabilities and performance optimizations.
The addition of support for where querying by join fields unlocks more powerful data relationships, especially for bi-directional relationships. This enables developers to build more sophisticated content models and access control patterns.
Performance improvements to the rich text editor address a critical usability issue, making the typing experience much smoother, especially on less powerful devices. This change alone significantly improves the content editing experience.
The UI enhancements, particularly around filtering with multi-select inputs and improved form state handling, make the admin interface more intuitive and reliable. The fixes for image previews and upload handling also contribute to a more polished user experience.
For administrators, the new time format configuration options for scheduled publishing provide more flexibility to adapt to regional preferences and workflow needs.
Overall, this release represents a solid improvement to both developer and content editor experiences without introducing breaking changes.
Full Release Notes
🚀 Features
- support
where querying by join fields (#12075) (466dcd7)
- add support for time format config on scheduled publish (#12073) (eab9770)
🐛 Bug Fixes
- cannot define a join field when the target relationship is nested to a second or higher tab (#12041) (7aa3c5e)
- image previews getting stuck in list view when paginating (#12062) (a0fb335)
- array minRow validation should not show when non-required with no rows (#12037) (f079ece)
- querying by polymorphic join field
relationTo with overrideAccess: false (#11999) (b9ffbc6)
- db-postgres: long array field table aliases cause error even when
dbName is used (#11995) (09782be)
- richtext-lexical: diff component css was not included in css bundle (#12028) (f1d9b44)
- ui: ensure
file field is only serialized at top-level for upload-enabled collections (#12074) (112e081)
- ui: form state race conditions (#12026) (4d7c1d4)
- ui: adds multi select inputs for text fields in where builder (#12054) (18ff9cb)
- ui: orderable table rendering (#12066) (9853f27)
- ui: adds multi select inputs for number fields in where builder (#12053) (09916ad)
- ui: resets value in where builder when operator changes (#11136) (ec34e64)
- ui: upload edits handling for bulk uploads (#12001) (c7b14bd)
- ui: prefer adminThumbnail even if file is non-image (#11948) (7721025)
⚡ Performance
- richtext-lexical: debounce field
onChange handler (#12046) (101f765)
📚 Documentation
🧪 Tests
📝 Templates
⚙️ CI
- add sort and hooks suites to the e2e tests matrix (#12023) (ae9e5e1)
🏡 Chores
🤝 Contributors