You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(ui): move unpublish actions into document controls dropdown (#15417)
### What / Why
This PR updates and fixes aspects of the `unpublish` UI:
1. **Button location**: The **unpublish** button update in
[v3.72.0](https://github.com/payloadcms/payload/releases/tag/v3.72.0)
was reported as too prominent by the community. We have moved it into
the additional document actions dropdown.
2. **Bug**: The `Unpublish in [locale]` option should only be displayed
when `localizeStatus` is enabled.
3. **Performance**: In the `unpublish` component, several variables were
recalculating on every render, causing unnecessary load and causing
ESLint warnings.
### Where
1. In `DocumentControls`, the `unpublish` button has been moved from the
top level into the additional document actions dropdown.
2. Within the `unpublish` button component, the conditional logic for
`canUnpublishCurrentLocale` has been corrected so it will only show when
`localizeStatus` is enabled.
3. Lastly, the variables `canUnpublish` and `canUnpublishCurrentLocale`
have been wrapped in `useMemo` to prevent excessive recalculating
#### Fixes#15291
<img width="1013" height="409" alt="Screenshot 2026-01-29 at 11 51
47 AM"
src="https://github.com/user-attachments/assets/a630406d-e444-4ecd-ab69-ba84f85d4b3e"
/>
---------
Co-authored-by: Patrik Kozak <35232443+PatrikKozak@users.noreply.github.com>
0 commit comments