feat: allow publish and publish specific locale buttons to be swapped
What?
Adds new feature to change the default behavior of the Publish button.
When localization is enabled, you can now choose whether to publish all locales (default) or publish the active locale only.
Why?
Since implementing the ability to publish a specific locale, users have reported that having this option as the default button would be preferred in some cases.
How?
Add defaultLocalePublishOption to your localization config and set it to 'active':
localization: {
defaultLocalePublishOption: 'active',
// the rest of your localization config
},
This is great! Thanks @JessChowdhury
Hmm I'm not sure we should add a new property for this. I think the less configuration the better. Imo whatever the default behavior is currently should continue to be the default, and we should just add the drop-down for everyone with the secondary behavior. What do you think?
@jacobsfletch I think the Sanity Actions API is very nice for expressing those things and in case you want to make it configurable I'd love to see this (or something like it) instead of a a new property too.
This could also be used elsewhere in the admin ui and allow plugins to customize the UI even further.
🚀 This is included in version v3.20.0