TL;DR
Payload CMS v3.13.0 brings several new features including more control over GraphQL queries/mutations, customizable placeholders for rich text fields, and Catalan translations. Key improvements include fixes for list view filtering, relationship edit drawers respecting locales, and better handling of Lexical rich text fields. This release also addresses various UI bugs and enhances documentation.
Highlight of the Release
- More granular control over GraphQL queries and mutations for collections and globals
- New onMount callback for CodeField to access Monaco editor instance
- Ability to override default placeholders in Lexical rich text fields
- Fixed relationship edit drawers to respect current locale
- Added Catalan translations and improved Swedish translations
- Fixed list view filtering issues with checkbox fields and fields with disableListColumn
Migration Guide
No breaking changes were introduced in this release, so no migration is required.
However, if you're using the cloud storage plugin, note that the adapters that were marked for deprecation in v2 are now actually deprecated. You should migrate to the standalone @payloadcms/storage-* packages as recommended in the migration guide.
Upgrade Recommendations
This is a feature release with numerous bug fixes and improvements. It's recommended to upgrade to take advantage of the new features and fixes, especially if you're experiencing any of the issues addressed in this release.
To upgrade:
npm install [email protected]
# or
yarn add [email protected]
# or
pnpm add [email protected]
After upgrading, test your application thoroughly, especially if you're using features that were fixed in this release, such as list view filtering, relationship edit drawers, or Lexical rich text fields.
Bug Fixes
UI Fixes
- Fixed an issue where autosave wasn't firing on the first change
- Removed the non-functional
_verified checkbox from user creation form
- Fixed relationship edit drawers to properly respect the current locale
- Fixed list view filtering issues:
- Checkbox fields as the first field in a collection were causing crashes
- Fields with
disableListColumn on the first field were breaking filter condition selection
- Improved filtering of fields from list view columns and conditions
Rich Text Editor Fixes
- Fixed formatted link markdown conversion not working properly
- Fixed issues with Lexical sub-fields due to incorrectly generated client field schema map
- Fixed empty lines being incorrectly stripped from MDX blocks when
doNotTrimChildren was set to true
- Ensured markdown normalization does not merge escaped code block lines
- Added proper error handling when attempting to create upload nodes without any upload collections enabled
Other Fixes
- Fixed database connections not closing after running jobs from command line
- Fixed GraphQL schema generation on Windows by changing config from raw path to
file: URL
- Fixed the search plugin's reindex button to respect custom API routes
- Fixed missing validation translation keys in the client
- Fixed
create-payload-app to not overwrite existing custom.scss file on update
New Features
More Control Over GraphQL Queries and Mutations
You can now disable GraphQL queries and mutations separately for collections and globals while keeping the types generated. This is useful when you want to disable API access but still need the types for relationship fields.
// Example: Disable queries but keep mutations and types
{
slug: 'posts',
graphQL: {
disableQueries: true,
disableMutations: false
}
}
CodeField onMount Callback
The CodeField component now exposes an onMount callback that gives you access to the Monaco editor instance, allowing for advanced customization:
<CodeField
onMount={(editor, monaco) => {
// Customize Monaco instance
monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
allowNonTsExtensions: true,
// Additional options...
})
// Add external type definitions
const run = async () => {
const types = await fetch('https://unpkg.com/payload@latest/dist/index.d.ts')
const typesText = await types.text()
monaco.languages.typescript.typescriptDefaults.addExtraLib(
typesText,
'file:///node_modules/payload/index.d.ts',
)
}
void run()
}}
// Other props...
/>
Customizable Rich Text Placeholders
Lexical rich text fields now support custom placeholders through configuration:
{
name: 'content',
type: 'richText',
editor: lexicalEditor({
features: ({ defaultFeatures }) => [
...defaultFeatures,
],
placeholder: 'Start writing your content here...'
})
}
New Translations
- Added Catalan translations for international users
- Improved Swedish translations for a more professional experience
Security Updates
No significant security fixes were included in this release.
Performance Improvements
List View Optimizations
The list view filtering and column handling has been improved by:
- Removing duplicative loops when filtering fields
- Improving the way columns are handled within the table columns provider
- Properly isolating row selectors from column state
Database Connection Management
Fixed an issue where database connections weren't being closed after running jobs from the command line, which could lead to resource leaks and prevent the Node process from exiting normally.
Impact Summary
Payload CMS v3.13.0 is a feature-rich update that enhances developer flexibility and improves the content editing experience. The release introduces more granular control over GraphQL queries and mutations, allowing developers to disable specific API endpoints while maintaining type generation. This is particularly valuable for complex applications with relationship fields.
The new onMount callback for CodeField opens up powerful customization options for the Monaco editor, enabling integration with external type definitions and compiler settings. Content editors will appreciate the ability to customize rich text field placeholders and the numerous UI fixes that improve the reliability of filtering, autosave, and relationship editing.
International users benefit from new Catalan translations and improved Swedish translations. The release also addresses several pain points in the rich text editor, particularly around markdown conversion and handling of code blocks.
Overall, this update represents a solid improvement in both developer experience and end-user functionality, with no breaking changes that would require migration efforts.
Full Release Notes
๐ Features
- adds more control over how to disable graphql for collections /โฆ (#10265) (7a59e7d)
- richtext-lexical: ability to override default placeholder (#10278) (182eaa3)
- translations: add Catalan translations (#10260) (5188a9b)
- ui: expose onMount to CodeField (#10223) (68a5f5c)
๐ Bug Fixes
- close db connections after running jobs from command line. (#9994) (eb69885)
- cpa: do not overwrite custom.scss file on update (#10285) (c3eb272)
- graphql: Change config from raw path to
file: url (#9311) (16c6abe)
- plugin-cloud-storage: actually deprecate adapters (#9640) (c4b31c0)
- plugin-search: respect custom api route in reindexButton (#10258) (cdaebcc)
- richtext-lexical: empty lines were incorrectly stripped from mdx blocks if doNotTrimChildren was set to true (#10287) (ee3c2cc)
- richtext-lexical: throw toast error when attempting to create upload node without any upload collections enabled (#10277) (07e86c0)
- richtext-lexical: various issues for lexical sub-fields due to incorrectly generated client field schema map (#10276) (35df899)
- richtext-lexical: formatted link markdown conversion not working (#10269) (885e966)
- richtext-lexical: ensure markdown normalization does not merge escaped code block lines (#10230) (c01b4bf)
- translations: adds missing max validations keys to client (#10266) (5d6064a)
- ui: checkboxes as first field were crashing WhereBuilder (#10290) (f3f36d8)
- ui: relationship edit drawers now respect current locale (#10262) (6dac4c5)
- ui: properly filters fields from list view columns and conditions (#10246) (f5a955d)
- ui: disableListColumn on first field breaks filter condition selection (#10267) (039b489)
- ui: removes useless verified checkbox on user create (#10252) (8671e85)
- ui: autosave wasnt firing on first change (#10256) (ef7242c)
๐ Documentation
- explicit
payload usage from req to avoid import payload confusion (#10291) (76e4402)
- fix all missing vertical lines in tables (#10288) (b6de432)
- add missing vertical line to Collection Upload options table (#10282) (950f8ce)
- adds useListQuery to list of React hooks and updates useDocumentInfo (#10186) (be87ba0)
- fix dispatch actions link for useFormFields and useAllFormFields (#10273) (313b4ba)
- fix incorrect escaping of * (#10274) (5b4730d)
- fix docs for generate db schema (#10251) (63bca12)
- adds notes about importance of serverURL for verify / forgot-paโฆ (#10248) (6af6e44)
- add clarity about forgot-password and verify tokens (#10247) (363a24c)
- richtext-lexical: minor improvements (#10280) (943798a)
- richtext-lexical: improve building custom feature docs, add example for custom blocks (code field within lexical) (#10279) (6e19e82)
๐งช Tests
๐ก Chores
๐ค Contributors