3.0.0-beta.31

Version 3.0.0-beta.31Major ReleasePre-release
Released:

May 14, 2024

Type:

Contains breaking changes

GitHub:View Release

Release Notes

3.0.0-beta.31 (2024-05-14)

Features

Bug Fixes

  • ui: step-nav breadcrumbs ellipsis (#6344) (353c2b0)
  • collection labels with multiple locales showing incorrectly (#5998) (58bbbbd)
  • depth field in api view throws error when no value present (#6106) (fcee13b)
  • implements graphql schema generation (#6254) (3abc2e8)
  • next: replaces default svg favicons with png (a48043c)
  • named tab being required in generated types without any required fields (#6324) (aa5ad47)
  • payload: loader alias issues (#6341) (890c21d)
  • ui: properly adds readOnly styles to disabled radio fields (#6240) (c7635b2)
  • db-postgres: too many clients already, cannot read properties 'transaction' of undefined (#6338) (47cd5f4)
  • some custom components were not handled properly if they are RSCs (#6315) (0d98b4b)
  • wrong translation key being used as upload:Sizes instead of upload:sizes (#6323) (2f02b3a)

BREAKING CHANGES

  • typed i18n (#6343) (f716122) >BREAKING: all i18n functions are now strongly typed, which will create errors if you have custom translations. If you do, you will have to pass a generic to i18n containing the types of your custom translations
>Example of adding your own translations to the default translations type on the client: >```ts >const linkTranslations = { en: { lexical: { link: { custom: 'Custom', internal: 'Internal', }, }, }, >} >type LinkTranslationKeys = NestedKeysStripped<typeof linkTranslations.en> >type MyI18n = I18nClient<typeof linkTranslations.en, LinkTranslationKeys> >const myI18n: MyI18n >myI18n.t('lexical:link:custom') // custom translations have been ADDED to the default client translations >``` >Example for the useTranslation hook within a component: >```ts >const linkTranslations = { en: { lexical: { link: { custom: 'Custom', internal: 'Internal', }, }, }, >} >type LinkTranslationKeys = NestedKeysStripped<typeof linkTranslations.en> >export const MyComponent: React.FC = () => { const { i18n, t } = useTranslation<typeof linkTranslations.en, LinkTranslationKeys>() return t('lexical:link:custom') >} >```
The admin.favicon: string property has been succeeeded by admin.icons: string | Icons | Icon[]. See nextjs.org/docs/app/api-reference/functions/generate-metadata#icons for full details.
  • some custom components were not handled properly if they are RSCs (#6315) (0d98b4b)
Breaking: The following, exported components now need the payload object as a prop rather than the config object: - RenderCustomComponent (optional) - Logo - DefaultTemplate - DefaultNav

Contributors

  • Alessio Gravili (@AlessioGr)
  • Patrik (@PatrikKozak)
  • Jessica Chowdhury (@JessChowdhury)
  • Jacob Fletcher (@jacobsfletch)
  • Elliot DeNolf (@denolfe)
  • Jarrod Flesch (@JarrodMFlesch)
  • Paul (@paulpopus)
  • James Mikrut (@jmikrut)
  • Fredrik (@Livog)