feat(ui): experimental localize metadata UI#14699
Merged
JessRynkar merged 56 commits intoJan 14, 2026
Merged
Conversation
Contributor
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖
Largest pathsThese visualization shows top 20 largest paths in the bundle.Meta file: packages/next/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_shared.json, Out file: esbuild/exports/shared.js
Meta file: packages/richtext-lexical/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_shared.json, Out file: esbuild/exports/shared_optimized/index.js
DetailsNext to the size is how much the size has increased or decreased compared with the base branch of this PR.
|
…ntal-localize-metadata-ui
…ocalize-metadata-ui' into feat/experimental-localize-metadata-ui
…ntal-localize-metadata-ui
…ata' into feat/experimental-localize-metadata-ui
…ntal-localize-metadata-ui
…ntal-localize-metadata-ui
…ntal-localize-metadata-ui
…ntal-localize-metadata-ui
…ntal-localize-metadata-ui
4c0e67c to
ea6f9a4
Compare
…ntal-localize-metadata-ui
…ntal-localize-metadata-ui
…ntal-localize-metadata-ui
DanRibbens
requested changes
Jan 13, 2026
DanRibbens
left a comment
Contributor
There was a problem hiding this comment.
One TODO to clean up it seems, looks good otherwise.
Adds migration logic.
### 1. Create blank migration file
```bash
payload migrate:create localize_status
```
### 2. Add the migration code
**PostgreSQL / SQLite:**
```typescript
import type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/db-postgres'
import { sql } from '@payloadcms/db-postgres'
import { localizeStatus } from 'payload/migrations'
export async function up({ db, payload }: MigrateUpArgs): Promise<void> {
await localizeStatus.up({
collectionSlug: 'posts', // 👈 Change to your collection
db,
payload,
sql,
})
}
export async function down({ db, payload }: MigrateDownArgs): Promise<void> {
await localizeStatus.down({
collectionSlug: 'posts',
db,
payload,
sql,
})
}
```
**MongoDB:**
```typescript
import type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/db-mongodb'
import { localizeStatus } from 'payload/migrations'
export async function up({ payload }: MigrateUpArgs): Promise<void> {
await localizeStatus.up({
collectionSlug: 'posts', // 👈 Change to your collection
payload,
})
}
export async function down({ payload }: MigrateDownArgs): Promise<void> {
await localizeStatus.down({
collectionSlug: 'posts',
payload,
})
}
```
##### Related PRs in this feature
- [feat: adds versions.drafts.localizeStatus and allows unpublish
per‑locale #14667](#14667)
- [feat(ui): experimental localize metadata UI
#14699](#14699)
- [chore: localize status migration work
#14862](#14862)
---------
Co-authored-by: Jessica Chowdhury <jessica@trbl.design>
95743f6
into
feat/experimental-localize-metadata
3 checks passed
JessRynkar
added a commit
that referenced
this pull request
Jan 16, 2026
…r-locale functionality (#14667) ## Localized Status (Experimental) This PR introduces a new **experimental** option that allows each locale to track and manage its own publication status independently, for collection docs and globals. ### Configuration To enable this feature, you need **two** configurations: 1. Enable the experimental flag in your `payload.config`: ```ts experimental: { localizeStatus: true, // default: `false` } ``` 2. Enable it on specific collections/globals: ```ts export const Posts: CollectionConfig = { slug: 'posts', versions: { drafts: { localizeStatus: true, // default: false }, }, // ... } ``` ## Key Changes When enabled: - **Per-locale status tracking** - Each locale maintains its own published/draft status - **Independent publishing** - Publish or unpublish individual locales without affecting others - **Locale-aware UI** - Admin panel shows status for the currently active locale - **Localized version history** - Versions list reflects the current locale's status ## Improved Behavior - Creating a document in one locale sets that locale to the specified status and other locales default to draft - You can publish/unpublish specific locales independently - Collection list views show status for the currently active locale - Document edit view displays the current locale's status ## Migration Required (If you already have version data) > If this is a new project then you only need to enable the flags. If you have existing data you will want to continue with the migration guide below.⚠️ Breaking Change: When `localizeStatus` is enabled, existing `_status` fields will need to be migrated from strings to locale objects. ### ➡️ Step 1 Before doing anything, **take a backup of your current database**. ### ➡️ Step 2 Stop your dev server if it is running ### ➡️ Step 3 **Create migration file** ```ts // run the following to create a blank // migration file named `localize_status` payload migrate:create localize_status ``` **Add migration code** 🔵 **PostgreSQL / SQLite**: ```ts import type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/db-postgres' import { sql } from '@payloadcms/db-postgres' import { localizeStatus } from 'payload/migrations' export async function up({ db, payload }: MigrateUpArgs): Promise<void> { await localizeStatus.up({ collectionSlug: 'posts', // 👈 Change to your collection db, payload, sql, }) } export async function down({ db, payload }: MigrateDownArgs): Promise<void> { await localizeStatus.down({ collectionSlug: 'posts', // 👈 Change to your collection db, payload, sql, }) } ``` 🟢 **MongoDB**: ```ts import type { MigrateDownArgs, MigrateUpArgs } from '@payloadcms/db-mongodb' import { localizeStatus } from 'payload/migrations' export async function up({ payload }: MigrateUpArgs): Promise<void> { await localizeStatus.up({ collectionSlug: 'posts', // 👈 Change to your collection payload, }) } export async function down({ payload }: MigrateDownArgs): Promise<void> { await localizeStatus.down({ collectionSlug: 'posts', // 👈 Change to your collection payload, }) } ``` ### ➡️ Step 4 Run the migration ```ts payload migrate ``` ### ➡️ Step 5 Set `localizeStatus: true` **Payload Config** ```ts // payload config file experimental: { localizeStatus: true, // <-- add this } ``` **Collection Config** ```ts // collection you want to migrate export const Posts: CollectionConfig = { slug: 'posts', versions: { drafts: { localizeStatus: true, // <-- add this }, }, // ... } ``` ### ➡️ Step 6 Run `pnpm dev` and test out the feature. ## Related PRs in this feature - [feat: adds versions.drafts.localizeStatus and allows unpublish per‑locale #14667](#14667) - [feat(ui): experimental localize metadata UI #14699](#14699) - [chore: localize status migration work #14862](#14862) --------- Co-authored-by: Jessica Chowdhury <jessica@trbl.design> Co-authored-by: Sasha <64744993+r1tsuu@users.noreply.github.com> Co-authored-by: Jessica Rynkar <67977755+jessrynkar@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds ui changes necessary for the localized status to display correctly in the edit view and versions view.
Related PRs in this feature