Skip to content
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

FR: Config to disable auto draft saving #4500

Closed
blackstalk opened this issue Jul 8, 2019 · 7 comments
Closed

FR: Config to disable auto draft saving #4500

blackstalk opened this issue Jul 8, 2019 · 7 comments
Labels
enhancement improvements to existing features ux 😄 features related to user experience

Comments

@blackstalk
Copy link

Description

Feature request to disable auto saving of entries to a draft in background. When making changes to an entry i now notice a draft gets produced in the background and a spinner indicates changes are being saved. Would like a config option to disable this.

I notice that in some environments the "Update Entry" button does not always disable when a draft is saving in the background and causes issues if the user clicks on "Update Entry" before the draft finishes saving.

Steps to reproduce

  1. Make changes to an entry
  2. A spinner appears indicating changes are saving in the background
  3. Click "Update Entry" before the spinner disappears
  4. This causes issues with content not getting saved properly

Additional info

  • Craft version: 3.2.0-RC3
@brandonkelly brandonkelly added ux 😄 features related to user experience enhancement improvements to existing features labels Jul 8, 2019
@jan-dh
Copy link

jan-dh commented Jul 11, 2019

The auto save also triggers Elements::EVENT_BEFORE_SAVE_ELEMENT regularly. I have some data-conversion going on in a plugin attached to that event that now gets triggered with a very high frequency. A config setting to disable this would be great. Would argue that this goes beyond ux enhancement.

@brandonkelly
Copy link
Member

You can check if an element is a draft or revision from your event with this condition:

if (!\craft\helpers\ElementHelper::isDraftOrRevision($element)) {
    // ... 
}

@minyan-gu
Copy link

minyan-gu commented Jul 16, 2019

Can't agree more. Please simply add an option to disable the current auto-saving so we can upgrade to 3.2 and use other features. The current auto-saving implementation creates too many unnecessary wastes.

  1. The Auto-Saving should listen on content change and should NOT create a DRAFT if nothing is changed.
    Currently, when create/update an entry, the title input box get auto focused-in by default, as soon as we focus-out the title input box, CRAFT just creates a draft regardless if we made any change or not. The better approach would be, when focus-in, the javascript should capture the current value, and when focus-out, it compares the value inside the box with previous captured value and see if there is any change made. If yes, create a Draft, if currently not in draft mode; otherwise, DO NOT CREATE DRAFT!!!

  2. When exit the entry page w/o saving, please prompt a dialogue box with option to delete current draft. (If a draft was created by this edit attempt)

  3. We also use Craft webhook official plugin. Please provide a way to filter out DRAFT saving events. We only want to monitor if the current entry get updated and disregard any draft saving events in the webhook configuration. Likewise, when deleting a draft, we also want to filter out the deletion of drafts.

Craft Version: 3.2.2

@amityweb
Copy link

amityweb commented Jul 16, 2019

Personally I don't mind draft saving, if it was fast/instant. But the issue we face is often the page could take something like 20 or more seconds to save the draft, I dont know why, but the actual Update button does not appear until thats complete for us to actually save the live version, at which point its another 20 seconds or so. So for us the draft is causing frustrating delays and so we would like to disable it.

Sometimes the draft saves quick, maybe a few seconds, and so its not so bad. If our long saving continues I may look into the reasons for that as opposed to disabling draft, but until then, disabling draft would speed up our process. Our customer also wants it disable. He, like us, have a habit of saving often so we are OK to not have it whilst it has a visible and time impact.

@minyan-gu
Copy link

minyan-gu commented Jul 16, 2019

See here, they are changing the code to disable the auto draft saving. Hope they can make a release soon.

a658ad4

@brandonkelly
Copy link
Member

Yeah we’ve removed draft auto-creation in Craft 3.2.3 (just released). See more details here: #4535 (comment)

Drafts can still be manually created, and drafts do still get autosaved, but I assume this request is more about wishing to disable the draft auto-creation than ongoing draft autosave, so going to close it.

@minyan-gu
Copy link

@brandonkelly you rock!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improvements to existing features ux 😄 features related to user experience
Projects
None yet
Development

No branches or pull requests

5 participants