3.0.0-beta.31
Pre-release
Pre-release
3.0.0-beta.31 (2024-05-14)
Features
- typed i18n (#6343) (f716122)
- replaces admin.favicon with admin.icons (7438812)
- ui: exports png favicons (7e4f50a)
- cpa: initialize git repo on project creation (#6342) (40d3078)
- adds translations for API view and select component (#6143) (b3df253)
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 disabledradio
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
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 translationsExample of adding your own translations to the default translations type on the client:
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 translationsExample for the useTranslation hook within a component:
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.
Breaking: The following, exported components now need the
payload
object as a prop rather than theconfig
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)