Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
Standardizes all named field exports. This improves semantics when using these components by appending Field onto the end of their names. Some components were already doing this, i.e. ArrayField and BlocksField. Now, all field components share this same convention. And since bundled components were already aliasing most exports in this way, this change will largely go unnoticed because most apps were already importing the correctly named components. What is ultimately means is that there was a mismatch between the unbundled vs bundled exports. This PR resolves that conflict. But this also introduces a potentially breaking change for your app. If your app is using components that import from the unbundled@payloadcms/ui package, those import paths likely changed:
Old:
import { Text } from '@payloadcms/ui/fields/Text'
New:
import { TextField } from '@payloadcms/ui/fields/Text'
If you were importing direcetly from the bundled version, you're imports likely have not changed. For example:
This still works (the import path is top-level, pointing to the bundled code):
import { TextField } from '@payloadcms/ui'
[x] I have read and understand the CONTRIBUTING.md document in this repository.
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist:
[x] Existing test suite passes locally with my changes
Description
Standardizes all named field exports. This improves semantics when using these components by appending
Field
onto the end of their names. Some components were already doing this, i.e.ArrayField
andBlocksField
. Now, all field components share this same convention. And since bundled components were already aliasing most exports in this way, this change will largely go unnoticed because most apps were already importing the correctly named components. What is ultimately means is that there was a mismatch between the unbundled vs bundled exports. This PR resolves that conflict. But this also introduces a potentially breaking change for your app. If your app is using components that import from the unbundled@payloadcms/ui
package, those import paths likely changed:Old:
New:
If you were importing direcetly from the bundled version, you're imports likely have not changed. For example:
This still works (the import path is top-level, pointing to the bundled code):
Type of change
Checklist: