Repository navigation
fix: preserve nav preference key with content branching - #18833
Merged
DanRibbens merged 2 commits intoOct 20, 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.
|
DanRibbens
marked this pull request as ready for review
October 19, 2026 18:28
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review: 1
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
DanRibbens
added a commit
that referenced
this pull request
Oct 23, 2026
Written with AI ## Description Content branching moves navigation preferences from `nav` to `admin`, leaving saved sidebar and group choices unread and removing the exported `PREFERENCE_KEYS.NAV` constant. Keep `NAV: 'nav'` and store branch selection alongside the existing navigation values, so existing preference records remain in use without a migration. ## Changes - Restore `PREFERENCE_KEYS.NAV` and update branch and navigation readers/writers to use it. - Retain the shared request-cached preference lookup and merged writes, preserving the existing `open` and `groups` values. - Update comments and add regression coverage for existing navigation values, branch selection, and branching disabled. This PR targets `feat/content-branching` and addresses Q03 of the API review. ## Test Plan - Focused unit tests: 3 passed (`pnpm exec vitest run --project unit packages/payload/src/admin/getAdminPreferences.spec.ts`). - ESLint on changed production files: no errors; one existing React effect/ref warning in Nav context. - `git diff --check`: passed. - Repository oxfmt check could not run because oxfmt is absent from the installed dependencies. Formatted the added test with the available Prettier using the repository's existing quote, semicolon, trailing-comma, and width conventions. - Browser verification not run. Before merge, verify saved sidebar/group state after reload and branch switching with branching enabled and disabled. ## Accessibility assessment The affected state is persisted sidebar visibility and navigation-group expansion. Source review considered WCAG 2.2 A criteria 2.1.1 (Keyboard), 2.4.3 (Focus Order), and 4.1.2 (Name, Role, Value); this change alters persistence keys without altering control markup, event handlers, focus behavior, or ARIA state wiring. Unit evidence verifies stored values only; it is not rendered accessibility evidence. Browser keyboard and expanded-state verification remains outstanding; no screen-reader or conformance claim is made.
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.
Written with AI
Description
Content branching moves navigation preferences from
navtoadmin, leaving saved sidebar and group choices unread and removing the exportedPREFERENCE_KEYS.NAVconstant. KeepNAV: 'nav'and store branch selection alongside the existing navigation values, so existing preference records remain in use without a migration.Changes
PREFERENCE_KEYS.NAVand update branch and navigation readers/writers to use it.openandgroupsvalues.This PR targets
feat/content-branchingand addresses Q03 of the API review.Test Plan
pnpm exec vitest run --project unit packages/payload/src/admin/getAdminPreferences.spec.ts).git diff --check: passed.Accessibility assessment
The affected state is persisted sidebar visibility and navigation-group expansion. Source review considered WCAG 2.2 A criteria 2.1.1 (Keyboard), 2.4.3 (Focus Order), and 4.1.2 (Name, Role, Value); this change alters persistence keys without altering control markup, event handlers, focus behavior, or ARIA state wiring. Unit evidence verifies stored values only; it is not rendered accessibility evidence. Browser keyboard and expanded-state verification remains outstanding; no screen-reader or conformance claim is made.