TL;DR
PayloadCMS v3.0.0-beta.130 brings significant improvements to the developer experience with new features like customizable log levels, base list view filters, and improved localization handling. This release also fixes several bugs related to custom components, CSS layer ordering, and PostgreSQL database migrations. Developers will benefit from enhanced type safety, better multi-tenant support, and more intuitive configuration structures.
Highlight of the Release
- Customizable log levels to reduce noise in error logs
- Base list view filters for improved multi-tenant support
- Enhanced localization fallback behavior
- Improved CSS layer ordering for better styling consistency
- Better type safety for field components
Migration Guide
Field Components Migration
The useFieldComponents hook and FieldComponentsProvider have been deprecated. Instead, use the extended RenderField component which now accounts for all field types with improved type safety.
Log Level Configuration
If you want to customize log levels for specific errors, use the new loggingLevels configuration property:
export default buildConfig({
// ... other config
loggingLevels: {
'YourCustomError': 'info', // Downgrade specific errors to info level
'AnotherError': 'warn' // Set other errors to warning level
}
})
Localization Fallback Changes
Be aware that the localization fallback behavior has changed:
fallback: false in config is now respected (previously it might have been ignored)
- Locale-specific fallbacks now take priority over
defaultLocale
- By default,
fallback is now true if unspecified
If you were relying on the previous behavior, you may need to update your configuration.
Upgrade Recommendations
This beta release includes several important bug fixes and feature enhancements that improve the developer experience and fix issues with localization, custom components, and PostgreSQL migrations.
If you're already using PayloadCMS v3.0.0-beta series, upgrading to beta.130 is recommended, especially if you:
- Work with multi-tenant applications (for the new base list view filters)
- Use custom list slot components (to get the fixed server and client props)
- Work with localized content (for the improved fallback behavior)
- Use PostgreSQL as your database (for the fixed migration tools)
- Want better control over logging (for the new customizable log levels)
As this is still a beta release, make sure to test thoroughly in a non-production environment before deploying to production.
Bug Fixes
Localization Fallback Improvements
Fixed issues with fallbackLocale not respecting default settings and locale-specific fallbacks. Now fallback: false in config is properly respected, and locale-specific fallbacks take priority over defaultLocale unless an explicit fallback is provided. The REST API now treats fallbackLocale and fallback-locale consistently with the Local API.
Custom List Slot Components
Fixed missing serverProps and clientProps in custom list view slot components, ensuring these important properties are properly exposed to components.
CSS Layer Ordering
Added inline <head><style> to ensure proper ordering of declared CSS layers, helping to resolve styling inconsistencies in the admin UI.
PostgreSQL Database Migrations
Fixed the payload migrate:create --file @payloadcms/db-postgres/relationships-v2-v3 command that stopped working after the db-postgres and drizzle packages were separated. The fix passes the correct dirname to getPredefinedMigration and adds support for .js files.
First User Creation
Fixed an issue where the state from form-state was returning null when creating the first user, causing potential errors. Now it safely checks for state before using it.
New Features
Customizable Log Levels
Now you can configure log levels based on specific errors, with common errors downgraded to info by default. This helps reduce noise in your logs by preventing normal, expected errors from cluttering error logs. The new loggingLevels config property allows you to override default log levels based on error names.
Base List View Filters
A powerful new feature that allows you to define base filters for list views, which is particularly valuable for multi-tenant implementations. This enables you to restrict data visibility based on tenant or other criteria at the list view level.
Improved Field Types and Components
Field types have been improved with better type safety. The path property is now required on fields that expect it (all except row fields), reducing developer experience overhead. The RenderField component has been extended to account for all field types, improving type safety.
Server-Side Nav Group Preferences
Navigation group preferences are now initialized on the server side, with consolidated records for better performance and user experience.
Updated Website Template Configuration
The config structure in the website template has been updated to be more clear and intuitive for developers.
Security Updates
No specific security fixes were mentioned in this release.
Performance Improvements
Improved Navigation Group Preferences
Navigation group preferences are now initialized on the server side and records are consolidated, which improves performance by reducing client-side processing and unnecessary re-renders.
CSS Layer Optimization
The improved CSS layer ordering ensures styles are applied more efficiently and consistently, potentially reducing layout shifts and improving rendering performance.
Type Safety Improvements
Enhanced type safety for field components reduces the likelihood of runtime errors and improves code completion in development environments, leading to more efficient development workflows.
Impact Summary
PayloadCMS v3.0.0-beta.130 delivers significant improvements to both developer experience and end-user functionality. The ability to customize log levels will help teams maintain cleaner logs by downgrading common errors to info level, making it easier to spot actual issues. Multi-tenant applications get a major boost with the new base list view filters feature, allowing for more sophisticated data segregation.
The fixes to localization fallbacks ensure more predictable behavior when working with multilingual content, while improvements to CSS layer ordering help maintain consistent styling throughout the admin UI. Developers will appreciate the enhanced type safety for field components and the exposure of server and client props to custom list slot components.
For PostgreSQL users, the fixed migration tools ensure smoother database updates. Overall, this release represents a solid step forward in PayloadCMS's evolution, with thoughtful improvements that address real-world usage scenarios and developer pain points.
Full Release Notes
🚀 Features
- adds ability to define base filter for list view (#9177) (9da8543)
- customize log levels and downgrade common errors to info (#9156) (d628222)
- next: initializes nav group prefs on the server and consolidates records (#9145) (f6bdc0a)
- templates: update config structure in website template to be more clear (#9161) (5ac4e73)
🐛 Bug Fixes
- add inline <style> to ensure the order of declared css layers as much as possible (#9123) (cd95daf)
- fallbackLocale not respecting default settings, locale specific fallbacks and not respecting 'none' or false (#8591) (f4d526d)
- expose server and client props to custom list slot components (#9159) (a8e3095)
- db-postgres: create relationship-v2-v3 migration (#9178) (5b9cee6)
- next: safely check for
state when creating first user (#9168) (3b55458)
🤝 Contributors