Media
Sandro Wegmann
August 2, 2024
Media

Newsletter 1 | 20.08.2024

Wen V3 stable??

Due to NextJS 15 (which Payload 3 depends on) being on hold, it’s unclear when Payload V3 will enter stable.
NextJS 15 stable until mid September -> Payload V3 stable immediately afterwards
if not -> Payload 3 release candidate mid September -> no more breaking changes
This doesn’t mean you cannot use v3 in any production environment. We’ve already migrated a handful of our codebases to the newest beta, and it’s been running smooth as butter. (Still don't do it for highly critical workloads :)

Community Update Call

Here are the key takeaways from the community call that took place today:
  • Lexical Richtext now comes with inline blocks & tables
  • UI library + Lexical are now shipped pre-compiled with React compiler
  • You can now run DB migrations in production (vs. just build process)
  • SQLite (Turso) is now in beta
Coming soon:
  • Upload hasMany + Bulk uploads
  • Bi-directional relationships
  • Locking Documents while editing them
  • New serverless DB adapters -> Payload will be edge compatible
You can watch the entire call on Youtube:
https://www.youtube.com/watch?v=VWMLYb-3n1s

New Admin UI design

The admin UI now comes with less whitespace + rounded corners. While design is always subjective, you can now fit a lot more input fields on the screen which is great.
If you haven't checked out our theme generator for Payload, you can find it here:
https://10xmedia.de/theme
Apart from customizing colors, borders, fonts etc. we'll extend it to add padding. That way, you can bring back whitespace if you want to.

Upload files from link

Since beta-61 you can now upload files from a link within the admin panel. While this feature has been available through the local API for ages, it’s very convenient to use it from the graphical user interface.

Migrate SlateJS to Lexical Richtext

Lexical is the new rich text format introduced back in V2. To be able to edit & migrate slateJS rich text in project that has lexical enabled, you have to add the “editor” prop to all relevant richText fields configured like this:
import { SlateToLexicalFeature, lexicalEditor } from '@payloadcms/richtext-lexical'

...
editor: lexicalEditor({
  features: ({ defaultFeatures }) => [...defaultFeatures, SlateToLexicalFeature({})],
}),
This however requires you to actively open up every document you want to migrate in the admin panel, edit the content and save.
To automate migration of your entire project, Payload now offers a one liner migration script that converts all slate fields into lexical.
To run it, use this code snippet.
import { migrateSlateToLexical } from '@payloadcms/richtext-lexical'

await migrateSlateToLexical({ payload })
Important: Make sure to still add the SlateToLexicalFeature() to the field as shown above. Otherwise, the script will skip the field.

Payload Auth Plugin

Lastly, we wanted to feature an interesting plugin that we just discovered. It aims to make implementing O-auth flows into payload easy.
We haven’t tested it thoroughly, but are planning to make a video about it soon (O-Auth is a pretty important topic)
And that’s it for now! We’re grateful for any constructive feedback, so please reach out to info@10xmedia.de if you’re missing something