Repository navigation
fix: preserve shared localized draft changes - #17367
Conversation
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
📦 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.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. ℹ️ Recent review info
Walkthrough
Merge Risk:
|
…#17394) Backport of #17367 to `3.x`. ## What this includes - localized draft status handling fixes for collections and globals - shared/non-localized draft change detection logic - localization test coverage updates ## Preview Both recordings start with English and Spanish published, save a shared-field draft in English, then switch to Spanish in the global edit view. Before: Spanish incorrectly remains `Published` and shows the old shared text. https://github.com/user-attachments/assets/635ff895-d0e0-4ea2-af0c-cd7a4fa84779 After: Spanish shows `Draft` and the updated shared text. https://github.com/user-attachments/assets/6d633f86-0bef-43e5-a016-3209c267de19 --------- Co-authored-by: Copilot <[email protected]>
|
🚀 This is included in version v4.0.0-beta.7 |
Fixes localized draft status handling when draft saves change non-localized/shared fields. With
localizeStatus, shared draft changes now mark every locale asdraft, while localized-only draft saves preserve the other locale statuses.The bug had three contributing factors:
published.Adds schema-aware shared-field comparison for draft saves and applies the invariant in collection and global update paths.
Preview
Before:
payload-pr-demo-pr17367-before-oct23-take-1.mp4
After:
payload-pr-demo-pr17367-after-oct23-take-1.mp4