Releases: payloadcms/payload
v3.0.0-beta.74
v3.0.0-beta.74 (2024-08-06)
Features
- richtext-lexical: add HTML converter to table feature (9bccdfd)
- richtext-lexical: accessible editor placeholders (c348081)
- richtext-lexical: add table hover actions to quickly add rows or columns (12ba820)
- allows loginWithUsername to not require username (#7480) (1ebd54b)
- updated admin UI (#7424) (68553ff)
- expose useTableColumns hook (#7448) (9a3bce1)
- richtext-lexical: upgrade lexical from 0.16.1 to 0.17.0 (e65b647)
Bug Fixes
- email and username fields rendering in drawers (#7520) (442189e)
- richtext-lexical: various table and icon style issues (#7522) (5d1cc76)
- ui: prevents
hasMany
text going outside of input boundaries (#7455) (3f5403a) - ui: properly handles ID field component type based on
payload.db.defaultIDType
(#7416) (62666a9) - db-*: drizzle enums, bump drizzle-kit (#7514) (95fcd13)
- cpa: adjust template file location detection (#7507) (0040e17)
- error thrown in version view when localization is false (#7502) (cdb2072)
- #7488, cant deploy SQLite to Vercel (#7490) (005befc)
BREAKING CHANGES
-
updated admin UI (#7424) (68553ff)
- Custom components and styling that don't utilize Payload's CSS/SCSS
variables may need adjustments to match the updated styling. - If you are using the
Merriweather
font, you will need to manually
configurenext/font
in your own project.
- Custom components and styling that don't utilize Payload's CSS/SCSS
-
richtext-lexical: upgrade lexical from 0.16.1 to 0.17.0 (e65b647)
- This upgrades lexical from 0.16.1 to 0.17.0. If you have any lexical packages installed in your project, please update them accordingly. Additionally, if you depend on the lexical APIs, please consult their changelog, as lexical may introduce breaking changes: https://github.com/facebook/lexical/releases/tag/v0.17.0
Contributors
- Jarrod Flesch (@JarrodMFlesch)
- Alessio Gravili (@AlessioGr)
- Patrik (@PatrikKozak)
- Elliot DeNolf (@denolfe)
- Jessica Chowdhury (@JessChowdhury)
- Tylan Davis (@tylandavis)
- Willy Brauner (@willybrauner)
- James Mikrut (@jmikrut)
v3.0.0-beta.73
v3.0.0-beta.72
v3.0.0-beta.72 (2024-08-01)
Features
- adds restore as draft option to versions (#7100) (d307d62)
- ui: expose custom errors in deleteMany (#7438) (febd7f7)
- db-*: add defaultValues to database schemas (#7368) (695ef32)
- cpa: warn on unsupported Next.js version (#7434) (6f5cf5d)
- db-*, payload: better transactions (#7395) (3545888)
Bug Fixes
- db-postgres: incorrect schema type on adapter (#7459) (449c16d)
- db-postgres, db-sqlite: enum schema (#7453) (0758199)
- db-postgres: localized array inside blocks field (#7457) (1ec78a1)
- validates password and confirm password on the server (#7410) (290ffd3)
- ui: reincorporate
basePath
into logout component link (#7451) (3d89508) - db-postgres: proper migrations table detection query (#7436) (b5b2bb1)
- formats locales for version comparison view (#7433) (5ef2951)
- hide force unlock button if the user has no permissions to interact with it (#7418) (a943487)
- page param not getting reset when applying filters (#7243) (ada9978)
- next: infinite loop when logging into root admin (#7412) (874279c)
- types for the 'validate' property across fields so internal validation functions can be reused (#7394) (7ed6634)
- export default was not found in graphql (#6975) (09a0ee3)
- plugin-search: ensure search updates are unique to collection (#6363) (67acab2)
- layout preferences for array/blocks were being saved twice in dev mode (#7396) (5cd0c7e)
Contributors
- Dan Ribbens (@DanRibbens)
- Jessica Chowdhury (@JessChowdhury)
- Jarrod Flesch (@JarrodMFlesch)
- Patrik (@PatrikKozak)
- Elliot DeNolf (@denolfe)
- Paul (@paulpopus)
- Alessio Gravili (@AlessioGr)
- Jacob Fletcher (@jacobsfletch)
- Michel v. Varendorff (@mvarendorff)
- Lynn Dylan Hurley (@lynndylanhurley)
v3.0.0-beta.71
v3.0.0-beta.71 (2024-07-29)
Features
- ui: passes field props to custom components (#7360) (97837f0)
- adds keepAfterRead to plugin-relationship-objectid (#7388) (f9e5573)
Bug Fixes
- db-sqlite: migration template errors (#7404) (6d066c2)
- db-postgres: migration template type error (#7403) (1dc4288)
- merges headers safely in nextjs route handlers (#7399) (c8da9b1)
- ui: stacking drawers (#7397) (2021028)
- docs: update import path for validation functions for fields (#7392) (2ea56fe)
- ui: handle
abort()
call signal error (#7390) (5655266) - ui: spacing in row fields by using gap instead of inner margins (#7387) (e823051)
BREAKING CHANGES
-
ui: passes field props to custom components (#7360) (97837f0)
Currently, there is no way to read field props from within a custom
field component, i.e.admin.components.Description
. For example, if
you setmaxLength: 100
on your field, your custom description
component cannot read it fromprops.maxLength
or any other methods.
Because these components are rendered on the server, there is also no
way of usingadmin.component.Field
to inject custom props yourself,
either. To support this, we can simply pass the base component props
into these components on the server, as expected. This has also led to
custom field component props becoming more strictly typed within the
config.This change is considered breaking only because the types have changed.
This only affects you if you were previously importing the following
types into your own custom components. To migrate, simply change the
import paths for that type.Old:
import type { ArrayFieldProps, ReducedBlock, BlocksFieldProps, CheckboxFieldProps, CodeFieldProps, CollapsibleFieldProps, DateFieldProps, EmailFieldProps, GroupFieldProps, HiddenFieldProps, JSONFieldProps, NumberFieldProps, PointFieldProps, RadioFieldProps, RelationshipFieldProps, RichTextComponentProps, RowFieldProps, SelectFieldProps, TabsFieldProps, TextFieldProps, TextareaFieldProps, UploadFieldProps, ErrorProps, FormFieldBase, FieldComponentProps, FieldMap, MappedField, MappedTab, ReducedBlock, } from '@payloadcms/ui'
New:
import type { FormFieldBase, // etc. } from 'payload'
Custom field components are now much more strongly typed. To make this
happen, an explicit type for every custom component has been generated
for every field type. The convention is to append
DescriptionComponent
,LabelComponent
, andErrorComponent
onto the
end of the field name, i.e.TextFieldDescriptionComponent
. Here's an
example:import type { TextFieldDescriptionComponent } from 'payload' import React from 'react' export const CustomDescription: TextFieldDescriptionComponent = (props) => { return ( <div id="custom-field-description">{`The max length of this field is: ${props?.maxLength}`}</div> ) }
Here's the full list of all new types:
Label Components:
import type { ArrayFieldLabelComponent, BlocksFieldLabelComponent, CheckboxFieldLabelComponent, CodeFieldLabelComponent, CollapsibleFieldLabelComponent, DateFieldLabelComponent, EmailFieldLabelComponent, GroupFieldLabelComponent, HiddenFieldLabelComponent, JSONFieldLabelComponent, NumberFieldLabelComponent, PointFieldLabelComponent, RadioFieldLabelComponent, RelationshipFieldLabelComponent, RichTextFieldLabelComponent, RowFieldLabelComponent, SelectFieldLabelComponent, TabsFieldLabelComponent, TextFieldLabelComponent, TextareaFieldLabelComponent, UploadFieldLabelComponent } from 'payload'
Error Components:
import type { ArrayFieldErrorComponent, BlocksFieldErrorComponent, CheckboxFieldErrorComponent, CodeFieldErrorComponent, CollapsibleFieldErrorComponent, DateFieldErrorComponent, EmailFieldErrorComponent, GroupFieldErrorComponent, HiddenFieldErrorComponent, JSONFieldErrorComponent, NumberFieldErrorComponent, PointFieldErrorComponent, RadioFieldErrorComponent, RelationshipFieldErrorComponent, RichTextFieldErrorComponent, RowFieldErrorComponent, SelectFieldErrorComponent, TabsFieldErrorComponent, TextFieldErrorComponent, TextareaFieldErrorComponent, UploadFieldErrorComponent } from 'payload'
Description Components:
import type { ArrayFieldDescriptionComponent, BlocksFieldDescriptionComponent, CheckboxFieldDescriptionComponent, CodeFieldDescriptionComponent, CollapsibleFieldDescriptionComponent, DateFieldDescriptionComponent, EmailFieldDescriptionComponent, GroupFieldDescriptionComponent, HiddenFieldDescriptionComponent, JSONFieldDescriptionComponent, NumberFieldDescriptionComponent, PointFieldDescriptionComponent, RadioFieldDescriptionComponent, RelationshipFieldDescriptionComponent, RichTextFieldDescriptionComponent, RowFieldDescriptionComponent, SelectFieldDescriptionComponent, TabsFieldDescriptionComponent, TextFieldDescriptionComponent, TextareaFieldDescriptionComponent, UploadFieldDescriptionComponent } from 'payload'
This PR also:
- Standardizes the
FieldBase['label']
type with a newLabelStatic
type. This makes type usage much more consistent across components. - Simplifies some of the typings in the field component map, removes
unneeded<Omit>
, etc. - Fixes misc. linting issues around voiding promises
- Standardizes the
-
ui: update the names of internal components so that they respect eslint rules (#7362) (e734d51)
So _Upload
becomes UploadComponent
which doesnt break the naming
convention of react components and we no longer export these internal
components
Contributors
- Dan Ribbens (@DanRibbens)
- James Mikrut (@jmikrut)
- Jacob Fletcher (@jacobsfletch)
- Paul (@paulpopus)
- Patrik (@PatrikKozak)
v3.0.0-beta.70
v3.0.0-beta.70 (2024-07-26)
Features
- templates: add live preview breakpoints for mobile, tablet and desktop to website template (#7384) (4704c8d)
- cpa: support next.config.ts (#7367) (a64f37e)
Bug Fixes
Contributors
- Paul (@paulpopus)
- Elliot DeNolf (@denolfe)
v3.0.0-beta.69
v3.0.0-beta.69 (2024-07-26)
Features
- payload: allows metadata to be appended to the file of the output media (#7293) (b5afc62)
- drizzle: abstract shared sql code to new package (#7320) (09ad6e4)
- adds @payloadcms/live-preview-vue to release pipeline (#7328) (904ec01)
- next: root admin (#7276) (863abc0)
Bug Fixes
- filterOptions for upload fields (#7347) (70f2e16)
- db-mongodb: adds new optional collation feature flag behind mongodb collation option (#7361) (8ba39aa)
- ui: hide 'Create new' button entirely if user has no access to create a media item (#7348) (128d721)
- attempts to use query.locale when present in createLocalReq (#7345) (2796d21)
- relaxes equality check for relationship options in filter (#7343) (cbac62a)
- db-postgres: localized groups/tabs and nested fields (#6158) (51f1c8e)
- some email adapters not working if they're promises due to config sanitisation (#7326) (c129c10)
- misc issues with loginWithUsername (#7311) (b2814eb)
- ui: email field now correctly renders autocomplete attribute (#7322) (c405e59)
- plugin-stripe: properly types async webhooks (#7317) (a35979f)
- ui: Where query selectors for checkboxes are now translated (#7309) (b9cf6c7)
- first version doc throws error (#7314) (f2b3305)
- db-mongodb: removes precedence of regular chars over international chars in sort (#7294) (b3e8ddf)
- cpa: check cmd exists after first checking flag and lock file (#7297) (83ad453)
Contributors
- James Mikrut (@jmikrut)
- Patrik (@PatrikKozak)
- Elliot DeNolf (@denolfe)
- Paul (@paulpopus)
- Jarrod Flesch (@JarrodMFlesch)
- Ritsu (@r1tsuu)
- Dan Ribbens (@DanRibbens)
- Jacob Fletcher (@jacobsfletch)
- Jessica Chowdhury (@JessChowdhury)
v2.25.0
v2.24.2
2.24.2 (2024-07-24)
Features
- db-mongodb: add jsonParse flag to mongooseAdapter that preserves existing, untracked MongoDB data types (#7338) (f96cf59)
Bug Fixes
- allow autosave relationship drawers to function properly (#7325) (69e7b7a)
- db-mongodb: removes precedence of regular chars over international chars in sort (#6923) (0058660), closes #6719
- fetches and sets permissions before setting user (#7337) (8259611)
- plugin-stripe: properly types async webhooks (#7316) (c6da99b)
v3.0.0-beta.68
v3.0.0-beta.68 (2024-07-22)
Features
- upgrade pino and pino-pretty, clean up hacky esm imports (#7291) (4584478)
- remove joi schema validation (#7226) (e83eb99)
- 700% faster deepCopyObject, refactor deep merging and deep copying, type improvements (#7272) (c45fbb9)
- new server-only, faster and immediate autoLogin (#7224) (a7b0f8b)
- ui: change autosave logic to send updates as soon as possible, improving live preview speed (#7201) (014ee1a)
- update reserved fields name check to be more comprehensive and only check top level fields (#7235) (76b3075)
Bug Fixes
- search plugin localized fields (#7292) (5aa3283)
- templates: website template building error with postgres number IDs (#7281) (bba7cf3)
- ui: not updating permissions when locale changes (#7245) (1ae71a3)
- payload: resizes images first before applying focal point (#7277) (2c16c60)
- api errors not populating in prod (#7232) (3d63ce9)
BREAKING CHANGES
-
700% faster deepCopyObject, refactor deep merging and deep copying, type improvements (#7272) (c45fbb9)
- The
deepMerge
exported from payload now handles more complex data and
is slower. The old, simple deepMerge is now exported asdeepMergeSimple
combineMerge
is no longer exported. You can use
deepMergeWithCombinedArrays
instead- The behavior of the exported
deepCopyObject
andisPlainObject
may
be different and more reliable, as the underlying algorithm has changed
- The
-
new server-only, faster and immediate autoLogin (#7224) (a7b0f8b)
autoLogin
withoutprefillOnly
set now also affects graphQL/Rest
operations. Only the user specified inautoLogin
will be returned.
Within the graphQL/Rest/Local API, this should still allow you to
authenticate with a different user, as the autoLogin user is only used
if no token is set.
Contributors
- Jarrod Flesch (@JarrodMFlesch)
- Alessio Gravili (@AlessioGr)
- Paul (@paulpopus)
- Dan Ribbens (@DanRibbens)
- Patrik (@PatrikKozak)
- Jacob Fletcher (@jacobsfletch)
- Elliot DeNolf (@denolfe)