payloadcms / payloadcms/payload
Standalone collapsible field persists "collapsed" state across record reloads instead of resetting to expanded
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 44.8k
- Forks
- 4.2k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 53
Description
Describe the Bug
Issue
There is a layout consistency issue in Payload v3.80 where a presentational collapsible field retains its collapsed state via the User Preferences API. If an editor collapses this field and leaves the page, reopening that exact same record preserves the minimized state.For many workflows, we require important presentational fields to always default to fully expanded whenever an admin revisits a record so that crucial fields are immediately visible, regardless of what the user did during their last editing session.Currently, standalone collapsible fields lack an explicit initCollapsed: false or a breakout setting to disable state tracking entirely, forcing the Admin UI to cache the collapsed view permanently.
Environment Info
- Payload Version: 3.80
- Area affected: Admin UI / Collapsible Field Layout
Reproduction Steps
- Create a collection schema utilizing a standalone collapsible field.
- Open the Admin UI panel and select an existing document record.
- Click the collapsible header to manually collapse the layout panel.
- Navigate away from the record or do a hard browser refresh.
- Re-enter the same record. The panel remains hidden/collapsed.
Expected Behavior
Every time an editor opens or refreshes a record page, presentational collapsible fields should default to an expanded state by default to ensure content visibility. Alternatively, a config property like "admin.initCollapsed: false" (or a way to flag user preferences tracking to false for specific layouts) should be exposed in the admin config block to allow developers to force an always-expanded state upon page mount.
Actual Behavior
The admin panel remembers that the user collapsed the field and keeps it hidden on subsequent record visits, forcing editors to manually click to expand it every single time they reopen the document.
Link to the code that reproduces this issue
https://github.com/MeghaPurohit306/payload
Reproduction Steps
- Create a collection schema utilizing a standalone collapsible field.
- Open the Admin UI panel and select an existing document record.
- Click the collapsible header to manually collapse the layout panel.
- Navigate away from the record or do a hard browser refresh.
- Re-enter the same record. The panel remains hidden/collapsed.
Which area(s) are affected?
area: ui
Environment Info
"payload": "3.80.0",
"@payloadcms/db-postgres": "3.80.0",
"@payloadcms/next": "3.80.0",
"@payloadcms/plugin-cloud-storage": "3.80.0",
"@payloadcms/plugin-nested-docs": "3.80.0",
"@payloadcms/richtext-lexical": "3.80.0",
"@payloadcms/storage-azure": "3.80.0",
"@payloadcms/ui": "3.80.0",
"next": "15.4.11",
"react": "19.2.1",
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in the Payload Admin UI with a standalone collapsible field, then trace how its collapsed state is persisted through the User Preferences API. Done means the field resets to expanded on record reload, or an explicit configuration lets developers disable preference tracking for that layout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100