-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable the Publish button if there is nothing to publish #1791
Comments
I've confirmed that Keen to get @clarkepaul UX feedback on this. |
I think it would be good to disable the buttons but only if we are certain that our change detection is working every time for every scenario. That would be the most frustrating thing to have changes that you can't save or publish because we don't allow it. The way it is designed is to give the actions more of a disabled look but not too much to make users think they can't click it again. |
@Firesphere Can you add some more detail on the context of this issue here? Did you expect the extension to have an effect on publish, even though core didn't think a publish needed to happen? |
Can we, perhaps, add a "onAfterSkippedPublish" just like we doe for |
This was discussed in the CMS-users channel in the users Slack. Several developers found it confusing that when clicking the publish button (regardless of it's state) did not consistently invoke onBefore/After publish. |
@Firesphere Do you want to send a PR for |
I can have a look at it, sure. |
Just to add another thought on this - I don't think that disabling the publish/save buttons is a good idea even if our change detection is good because there are instances where you might want to force a publish/save event even if the current page has no explicit changes... perhaps you need to force a static publish action or some other onAfterSave hook that's needed |
Yeah ... change detections could be a bit difficult here. The current page might not have any change to publish, but their could be related owned objects that do. Unless we have a full proof way of communicating back to the UI to decide if we should disable the button, disabling the button could be difficult. Should point out that the publish button doesn't currently use its "dirty" state when a child object has draft changes. e.g.: You edit a form field on a UserForm page, save your changes and go back the main page. The "Publish" button comes back with it's green border (as opposed to the green background when its dirty). |
Experience shows that users expect
onBefore|AfterPublish
to be called when they hit thePublish
Button.This doesn't happen, because there is nothing to publish when no changes are made. It would add value to disable the publish button unless there are changes to publish.
The text was updated successfully, but these errors were encountered: