-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix: adds enableStatusLocalization option to reflects current locale across UI #13207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📦 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.
|
}), | ||
for (let i = 0; i < result.docs.length; i++) { | ||
const id = result.docs[i].parent | ||
console.log(result.docs[i]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log
name: code, | ||
type: 'select', | ||
options: [ | ||
{ label: 'Draft', value: 'draft' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use translations for the labels. We have a function for this.
disabled: true, | ||
}, | ||
fields: localeStatusFields, | ||
index: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indexing on the group itself won't do much. We likely want the subfields to be index: true
instead.
@@ -56,6 +56,35 @@ export const buildVersionGlobalFields = <T extends boolean = false>( | |||
return locale.code | |||
}), | |||
}) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference here vs the collection version fields added in this change? Can we write once and import or get the field from one function?
What?
Adds a new
enableStatusLocalization
config option. When enabled, the admin panel will display the document status based on the current locale instead of the latest overall status. Also updates the edit view to only show achanged
status whenautosave
is enabled.Why?
Showing the status for the current locale is more accurate and useful in multi-locale setups. While this would make sense as the default, it's opt-in to avoid breaking changes for existing users.
How?
When
enableStatusLocalization
istrue
, we store per-locale status in a newlocaleStatus
field group within version data. The admin panel then reads from this field to display the correct status for the current locale.